Configure Kustomer Workflows for Agent

This is the final step of integrating Kustomer with Agent.

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

Workflow Type

Description

Workflows

Search Search workflows scan Kustomer for records that are applicable to the interactionClosed The full conversation with an agent through a channel. For example, an interaction can be a voice call, email, chat, or social media conversation. the agent is handling. Search for ANI
Standard Create Standard Create workflows create standard Kustomer records with their standard data fields. The SNIPPET payload of these workflows must include the standard fields and only those fields. Create Customer

Workflows run using the system user's roles and permissions. This is the Kustomer user account you created specifically for CXone Mpower configuration. When records are created, they use the system user's name and time zone.

Before you begin, review the CRM integration diagram, the CRM workflow diagram, and the CRM integration terminology list.

Also, download this folder of template scripts. It contains voice and digital scripts for CXone Mpower Studio and Desktop Studio.

Configure Search Workflows

There is one Search workflow: Search for ANI.

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 Standard Create Workflows

Standard Create workflows create standard Kustomer records with the fields specified in the 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.

Configure the Create Customer Workflow

  1. In Studio, open the script where you want to configure the Create Customer 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 createCustomer
    createCustomer.name = "[customer name]"
    createCustomer.phone = "[phone number, no dashes]"
    createCustomer.email = "[email address]"
    
    createCustomer.pinnedRecord = "[true or false]"
    createCustomer.screenPop = "[true or false]"
    
    DYNAMIC customerPayload
    customerPayload.workflowInput = createCustomer
    
    ASSIGN workflowJson = "{customerPayload.asjson()}"		
    		

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

  5. Change the value of the createCustomer.name attribute to the customer's name. For example, createCustomer.name= "Edward Ferrars". 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 createCustomer.phone attribute to the customer's phone number. Do not include any dashes (-). For example, createCustomer.phone = "1234567890" or createCustomer.phone = "{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. No two customer records can have the same phone number.

  7. Change the value of the createCustomer.email attribute to the customer's email address. For example, createCustomer.email = "edward.ferrars@classics.com". 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. No two customer records can have the same email address.

  8. Change the value of the createCustomer.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 createCustomer.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Kustomer. If set to false, it does not. If you do not include this attribute in the payload, it will be assumed as false.

  10. Click the Workflow Execute action that comes after this workflow's SNIPPET. Set that action's workflowPayload property to {workflowJson}. Be sure to include the curly braces.

  11. Save your script.

  12. 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 information by default. This means that data memorialization and timeline information will be added to the 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"					
    		
  3. Make sure that createPayload matches the earlier lines in your workflow.

  4. Save your script.

Configure Records for Screen Pop

You can configure records to automatically appear as screen popsClosed A pop-up window with information about the contact that appears on an agent's screen after an event such as connecting to a contact. in Kustomer. This is done by editing the workflow payload. In Agent Embedded for Kustomer and all ServiceNow integrations, only one record can appear as a screen pop:

In Search Workflows

By default, single match recordsClosed Occurs when a Search workflow returns only one record. appear as screen pops. You can change this by setting the screenPop attribute to false.

Multiple match records do not appear as screen pops, even if you set the screenPop attribute to true.

  1. Open the workflow's SNIPPET action in your Studio script.

  2. In the workflow payload, copy this line of code and paste it before ASSIGN searchJson = "{searchInput.asjson()}":

    						
    searchPayload.screenPop = "[true or false]"				
    		
  3. Configure the pasted code.

    1. Make sure searchPayload matches the earlier lines in your workflow.

    2. Change the value of the screenPop attribute:

      • Set it to true to show the record as a screen pop.

      • Set it to false to not show it.

  4. Save your script.

In Create Workflows

By default, created records do not appear as screen pops. You can change this by setting the screenPop attribute to true.

  1. Open the workflow's SNIPPET action in your Studio script.

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

    						
    createPayload.screenPop = "[true or false]"				
    		
  3. Configure the pasted code.

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

    2. Change the value of the screenPop attribute:

      • Set it to true to show the record as a screen pop.

      • Set it to false to not show it.

  4. Save your script.