Configure Zendesk Workflows for CXone Agent Integrated

You can configure Search, Custom Create, and Standard Create workflows for Zendesk and CXone Agent Integrated. These workflows search or create Zendesk records, also called entities or objects. This is the back end configuration of dynamic data mapping.

Workflow Type

Description

Workflows

Search Search workflows scan Zendesk for records that are applicable to the interaction the agent is handling. Search for ANI
Custom Search
Custom Create Custom Create workflows create any record type with both standard and custom fields. Create Custom Record
Standard Create Standard Create workflows create standard Zendesk records with their standard data fields. The SNIPPET payload of these workflows must include the standard fields and only those fields. Create Ticket
Create User

Download this folder of template scripts. It contains voice and digital scripts for Desktop Studio and CXone Studio.

Configure Search Workflows

There are two Search workflows: Search for ANI and Custom Search.

Configure the Search for ANI Workflow

The Search for ANI workflow uses the ANIClosed Also known as caller ID. Listed phone number of an incoming voice call. from the ACD to search all standard phone fields for matching records.

Do not include the timeoutMilliSec property in your workflow code. It may cause multiple of the same interaction to be delivered to your agents.

  1. In Studio, open the script where you want to configure the Search for ANI workflow.

  2. If you haven't already, add a SNIPPET action after BEGIN and before the Workflow Execute action.

  3. Double-click the SNIPPET action on the script canvas.

  4. Copy each of the following lines of code and paste them into the Text View tab of the Editor window.

    
    DYNAMIC searchInput
    searchInput.workflowInput.phoneNumber = "{ANI}"
    						
    ASSIGN searchJson = "{searchInput.asjson()}"
    		
  5. Save your script.

  6. You can test your script by simulating an interaction in Studio.

Configure the Custom Search Workflow

The Custom Search workflow allows you to search for one or more Zendesk records. They also allow you to search multiple fields and variables within a specified record. You can connect different search requirements using Zendesk operators.

This workflow supports these Zendesk records:

  • Ticket

  • User

Do not include the timeoutMilliSec property in your workflow code. It may cause multiple of the same interaction to be delivered to your agents.

  1. In Studio, open the script where you want to configure the Custom Search workflow.

  2. If you haven't already, add a SNIPPET action after BEGIN and before the Workflow Execute action.

  3. Double-click the SNIPPET action on the script canvas.

  4. Copy each of the following lines of code and paste them into the Text View tab of the Editor window.

    
    DYNAMIC searchInput
    DYNAMIC payload
    payload.entity = "[API name]"
    payload.filter = "[operator]"
    searchInput.workflowInput.search = payload
    						
    ASSIGN searchJson = "{searchInput.asjson()}"
    		
  5. Change the value of the payload.entity attribute to the API name for the record you want to search. For example, payload.entity = "user". This is case-sensitive.

  6. Change the value of the payload.filter attribute to the Zendesk operator you want to use. A full list of Zendesk operators can be found in the Zendesk documentation Box with arrow indicating navigation to external site.. They are case-sensitive.

  7. Save your script.

  8. You can test your script by simulating an interaction in Studio.

Configure Custom Create Workflows

Custom Create workflows allow you to configure a SNIPPET payload to create any type of Zendesk record, standard or custom. They also allow you to populate any field type, standard or custom. For example, you could create a Ticket record with some of the standard fields from that record type, as well as your own custom fields.

This is the recommended method to create Zendesk records.

Configure the Create Custom Record Workflow (Previously Create Entity)

The Create Custom Record workflow creates any type of Zendesk record, standard or custom. This record can display standard and custom data fields. The fields must contain text, numbers, or variables. Binded fields are most often populated by search results or lists of options, but you can configure this workflow to add hard-coded data to a binded field.

If you use the older version of this workflow, called the Create Entity workflow, you need to configure your Studio script with two additional actions: a SNIPPET called Snippet for Send Workflow Response, and a CUSTOMEVENT called Send Workflow Response. Use this template script for Desktop Studio or this template script for CXone Studio.

  1. In Studio, open the script where you want to configure the Create Custom Record workflow.

  2. If you haven't already, add a SNIPPET action after ONANSWER or ONASSIGNMENT.

  3. Double-click the SNIPPET action on the script canvas.

  4. Copy each of the following lines of code and paste them into the Text View tab of the Editor window.

    
    DYNAMIC create[Record]
    create[Record].table = "[tickets or users]"
    create[Record].data.[ticket or user].[fieldName] = "[field value]"
    create[Record].data.[ticket or user].[fieldName] = "[field value]"
    
    createPayload.pinnedRecord = "[true or false]"
    createPayload.screenPop = "[true or false]"
    						
    DYNAMIC create[Record]Payload
    create[Record]Payload.workflowInput = create[Record]
    						
    ASSIGN createCustomJson = "{create[Record]Payload.asjson()}"
    		

    You must include each of those lines.

  5. Replace the [Record] placeholder in every instance of create[Record] with either Ticket or User, depending on the type of record you're creating. For example, createTicket.
  6. Change the value of the createRecord.table attribute to either tickets or users, depending on the type of record you're creating. For example, if you're creating a ticket, this line should becreateRecord.table = "tickets".
  7. In the next two attributes, change [ticket or user] to either ticket or user, depending on the type of record you're creating. For example, if you're creating a ticket, these lines should start with createRecord.data.ticket.
  8. In those same attributes, change [fieldName] to the name of the field you want to include in the record. For example, createRecord.data.ticket.description. Change [field value] to the value you want to display in the field. For example, createRecord.data.ticket.description = "This ticket is new."
  9. To add additional fields, create additional attributes that follow the same format:

    
    createRecord.data.[ticket or user].[fieldName] = "[field value]"
    		

    For example:

    createRecord.data.ticket.group_id = "12345678910112"
    				
  10. Change the value of the createPayload.pinnedRecord attribute to either true or false. When set to true, the created record displays to agents in the Current Interactions section of the customer card. When set to false, it displays in the Recent Interactions section of the customer card. If you do not include this attribute in the payload, it will be assumed as false.
  11. Change the value of the createPayload.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Zendesk. If set to false, it does not. If you do not include this attribute in the payload, it will be assumed as false.

  12. Save your script.

  13. You can test your script by simulating an interaction in Studio.

Configure Standard Create Workflows

Standard Create workflows create standard Zendesk records. Agents can use the customer card in CXone Agent Integrated to manually create new Zendesk records during interactions. If they select one of these workflows, the record is created with the fields specified in that workflow's payload.

You cannot add or delete fields in the SNIPPET payload of Standard Create workflows. If you add or delete fields, the record won't be created. To create a standard or custom record with the fields you want, use the Create Custom Record workflow.

Configure the Create Ticket Workflow

  1. In Studio, open the script where you want to configure the Create Ticket workflow.

  2. If you haven't already, add a SNIPPET action after BEGIN and before the Workflow Execute action.

  3. Double-click the SNIPPET action on the script canvas.

  4. Copy each of the following lines of code and paste them into the Text View tab of the Editor window.

    
    DYNAMIC createTicket
    createTicket.subject = "[Ticket Name] - {ANI}"
    createTicket.description = "{ANI}"
    createTicket.requester_id = "{variable}"
    						
    createTicket.pinnedRecord = "[true or false]"
    createTicket.screenPop = "[true or false]"
    
    DYNAMIC createTicketPayload
    createTicketPayload.workflowInput = createTicket
    						
    ASSIGN createTicketJson = "{createTicketPayload.asjson()}"
    		

    You must include each of those lines. If you want a field to stay blank, you can use a null value (""). For example, createTicket.description = "".

  5. Change the value of the createTicket.subject attribute to the ticket's name. For example, createTicket.subject= "Auto Created Ticket for {ANI}". This value can be hard-coded, a variable, or a combination of these. Use a variable if you want this value to update for each interaction.

  6. Change the value of the createTicket.description attribute to a description of the ticket. For example, createTicket.data.ticket.description = "Ticket created for {ANI}". This value can be hard-coded, a variable, or a combination of these. Use a variable if you want this value to update for each interaction.

  7. Change the value of the createTicket.requester_id attribute to the name of the variable you want to use. For example, createTicket.requester_id = "{userRecord.id}".
  8. Change the value of the createTicket.pinnedRecord attribute to either true or false. When set to true, the created record displays to agents in the Current Interactions section of the customer card. When set to false, it displays in the Recent Interactions section of the customer card. If you do not include this attribute in the payload, it will be assumed as false.
  9. Change the value of the createTicket.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Zendesk. If set to false, it does not. If you do not include this attribute in the payload, it will be assumed as false.

  10. Save your script.

  11. You can test your script by simulating an interaction in Studio.

Configure the Create User Workflow

  1. In Studio, open the script where you want to configure the Create User workflow.

  2. If you haven't already, add a SNIPPET action after BEGIN and before the Workflow Execute action.

  3. Double-click the SNIPPET action on the script canvas.

  4. Copy each of the following lines of code and paste them into the Text View tab of the Editor window.

    
    DYNAMIC createUser
    createUser.phoneNumber = "{ANI}"
    createUser.name = "Auto Created User for {ANI}"
    						
    createUser.pinnedRecord = "[true or false]"
    createUser.screenPop = "[true or false]"
    
    DYNAMIC createUserPayload
    createUserPayload.workflowInput = createUser
    						
    ASSIGN createUserJson = "{createUserPayload.asjson()}"
    		

    You must include each of those lines. If you want a field to stay blank, you can use a null value (""). For example, createUser.name = "".

  5. Change the values of the createUser.phoneNumber and createUser.name attributes to fit your needs. For example, createUser.name = "Caller {ANI} to Billing".

  6. Change the value of the createUser.pinnedRecord attribute to either true or false. When set to true, the created record displays to agents in the Current Interactions section of the customer card. When set to false, it displays in the Recent Interactions section of the customer card. If you do not include this attribute in the payload, it will be assumed as false.
  7. Change the value of the createUser.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Zendesk. If set to false, it does not. If you do not include this attribute in the payload, it will be assumed as false.

  8. Save your script.

  9. You can test your script by simulating an interaction in Studio.

Pin Records

You can pin a record to the Current Interaction section of the customer card. When a record is pinned, it is linked icon of a check mark in a green box. for data memorialization and timeline by default. This means that data memorialization and timeline information will be added to the Zendesk record when the interaction is completed. If the agent does not want the information to be mapped, they can unlink the record.

  1. Open the Snippet for Create Workflow SNIPPET action in your script.

  2. In the workflow payload, copy this line of code and paste it before DYNAMIC create[RecordType]Payload:

    						
    createPayload.pinnedRecord = "true"					
    		

    Make sure that createPayload matches the earlier lines in your workflow.

  3. Save your script.

Configure Records for Screen Pop

You can configure created records to automatically appear as screen pops in Zendesk.

  1. Open the Snippet for Create Workflow SNIPPET action in your script.

  2. In the workflow payload, copy this line of code and paste it before DYNAMIC create[Record]Payload:

    						
    createPayload.screenPop = "true"				
    		

    Make sure that createPayload matches the earlier lines in your workflow. For example, if you're using the standard Create Ticket workflow, this line should be createTicket.screenPop = "true".

  3. Save your script.