Configure Zendesk Workflows for CXone Agent

You can configure Search, Custom Create, and Standard Create workflows for Zendesk and CXone Agent. 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

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.

Use this example script.

  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

Use this example script.

  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 . 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.

This was previously called the Create Entity workflow.

  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 createPayload
    DYNAMIC createDataArray
    						
    DYNAMIC item1
    item1.field = "subject"
    item1.value = "New Record - {CONTACTID}"
    DYNAMIC item2
    item2.field = "phonenumber"
    item2.value = "{ANI}"
    						
    createPayload.entity = "ticket"
    		ASSIGN createDataArray[1] = item1
    		ASSIGN createDataArray[2] = item2
    CreatePayload.data = createDataArray
    
    createPayload.pinnedRecord = "[true or false]"	
    						
    DYNAMIC createTicketPayload
    createTicketPayload.workflowInput = createPayload
    						
    ASSIGN createTicketJson = "{createTicketPayload.asjson()}"
    		

    You must include each of those lines.

  5. Change the value of the createPayload.pinnedRecord attribute to either true or false. When set to true, the created record will display to agents in the Current Interactions section of the customer card. If set to false, it will display 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.
  6. To add additional fields:

    1. Create additional dynamic data objects under item2.value = "{ANI}". Follow this format:

      
      DYNAMIC item#
      item#.field = "[fieldname]"
      item#.value = "{variable}"
      		
    2. Then create additional data arrays under createPayload.entity = "ticket". Follow this format:

      
      ASSIGN createDataArray[#] = item#
      		

      The number (#) needs to increment by one with each additional item you add to the array.

  7. Save your script.

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

Configure Standard Create Workflows

Standard Create workflows allow users to search standard Zendesk records inside Zendesk.

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}"
    
    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= "Elinor's Ticket - {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.requester_id attribute to the name of the variable you want to use. For example, createTicket.requester_id = "{userRecord.id}".

  7. Save your script.

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

Configure the Create User Workflow

Use this example script.

  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 {ANI}"
    
    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. Save your script.

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