Create a Current Interaction Record for CXone Agent Integrated

You can create a current interaction record for CXone Agent Integrated and your CRM. Current interaction records store information about the contact the agent is currently handling. They appear to agents in the Current Interaction section of the customer card. Current interaction records connect to both CXone Agent Integrated and your CRM, so if the record is updated in one app, it automatically updates in the other.

Create a CRM Integration in CXone

If you haven't already, integrate Kustomer, Microsoft Dynamics, Oracle, ServiceNow, or Zendesk with CXone Agent Integrated.

Create a Studio Script

Creating a current interaction record requires a Studio script. The script connects CXone Agent Integrated and the CRM. It's how you specify the CRM record type, or entity, that's used as the current interaction record.

This task may require coordination with your organization's Studio scripter.

Create the Script

  1. In Studio, create a phone script.
  2. Add the following actions and connect them in the order given using the Default branch condition. The script has two parts. The first part starts the interaction and requests an agent. It contains these actions: 

    • Begin: The required starting action for every script. This action doesn't require any configuration.
    • Reqagent: This action requests an agent who has a specific ACD skill.

    The second part of the script starts when the agent answers the interaction. It creates the current interaction record. It contains these actions: 

    • Onanswer: This event action triggers when an agent answers the interaction. This action doesn't require any configuration unless you need to change the name of one or more of the variables in the action properties.
    • Snippet: This action contains custom code that creates the current interaction record.
    • Workflow Execute: This action executes a create workflow. It can only execute one create workflow. Only one current interaction record can be created.
  3. Configure each Studio action as described in the remaining sections on this page:

  4. Connect the other branches of the Workflow Execute action. That link describes the branches.

  5. Add other scripting logic as needed.

  6. Save your script often as you make changes.

  7. When the script is complete and thoroughly tested, put it into production.

Configure the REQAGENT Action

  1. Select the Reqagent action on the script canvas and click the Properties tab in Studio.

  2. Configure the ACD Skill property with the skill you want the script to route interactions to. Configure the other properties of this action as needed.

Configure the SNIPPET Action (Create Record)

  1. Double-click the Snippet action on the script canvas.
  2. In the Editor window, add the following lines of code:

    
    DYNAMIC create[Record]
    create[Record].subject="{CONTACTID}-{SKLNAME}"
    create[Record].phoneNumber="{ANI}"
    create[Record].directionCode="incoming"
    create[Record].pinnedRecord="true" // set as true for pinning this record in the CXone Agent app, string variable
    
    DYNAMIC create[Record]Payload
    create[Record]Payload.workflowInput=create[Record]
    
    ASSIGN create[Record]Json= "{create[Record]Payload.asjson()}"			
    			
  3. Replace [Record] with the CRM record type, or entity, you want to use as the current interaction record. For example, createPhonecall creates a current interaction record for the phone call entity.
  4. Right-click the action. Enter Create Record in the field for the Caption property. This changes the label of the action on the script canvas.

Configure the WORKFLOW EXECUTE Action

  1. Double-click the Workflow Execute action in your script to launch the Workflow Execute wizard.

  2. In the Configuration Name field, select the CRM integration you want this Workflow Execute action to use. The drop-down displays the names of all configured integrations in your CXone system.
  3. In the Actions field, select Create.

  4. In the Workflow Mapping section, select the create workflow you want this script to execute. You can only select one.

  5. Click Next.
  6. Verify your selections in the pop-up window. If you need to change a selection, click No and make your change.
  7. Click Yes in the pop-up window to apply your selections to the Workflow Execute properties.