Configure Oracle Workflows for CXone Agent for Microsoft Teams

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

Workflow Type

Description

Workflows

Search Search workflows scan Oracle 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 Oracle records with their standard data fields. The SNIPPET payload of these workflows must include the standard fields and only those fields. Create Asset
Create Contact
Create Incident
Create Opportunity
Create Organization
Create Task

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 Oracle records. They also allow you to search multiple fields and variables within a specified record. You can connect different search requirements using Oracle operators.

This workflow supports these Oracle records:

  • Asset

  • Contact

  • Incident

  • Opportunity

  • Organization

  • Task

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 = "[fieldName] [operator] {variable}"
    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 use. For example, payload.entity = "asset". This is case-sensitive.

  6. Change the value of the payload.filter attribute. This determines the search filter criteria for the record. For example, payload.filter = "phone='{ANI}'".

    1. Change [fieldName] to the name of the field you want to use to search, such as ticketNumber. This is case-sensitive.

    2. Change [operator] to the Oracle operator you want to use. A full list of Oracle operators can be found in the Oracle documentation Box with arrow indicating navigation to external site.. This is case-sensitive.

    3. Change {variable} to the variable you want assign to the field. This is case-sensitive.

  7. To add additional search filters, use an Oracle operator between the filters. For example:

    
    payload.filter = "phone='{ANI}'AND customer_number_c='{CustomerNumber}'"
    		
  8. Save your script.

  9. 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 Oracle record, standard or custom. They also allow you to populate any field type, standard or custom. For example, you could create an Asset 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 Oracle records.

Configure the Create Custom Record Workflow (Previously Create Entity)

The Create Custom Record workflow creates any type of Oracle 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 createPayload
    DYNAMIC createDataArray
    						
    DYNAMIC item1
    item1.field = "subject"
    item1.value = "New Record - {CONTACTID}"
    DYNAMIC item2
    item2.field = "phonenumber"
    item2.value = "{ANI}"
    DYNAMIC item3
    item3.field = "new_contactid"
    item3.value = "{CONTACTID}"
    						
    createPayload.entity = "incident"
    		ASSIGN createDataArray[1] = item1
    		ASSIGN createDataArray[2] = item2
    		ASSIGN createDataArray[3] = item3
    CreatePayload.data = createDataArray
    
    createPayload.pinnedRecord = "[true or false]"
    createPayload.screenPop = "[true or false]"
    						
    DYNAMIC create[RecordName]Payload
    create[RecordName]Payload.workflowInput = createPayload
    						
    ASSIGN create[RecordName]Json = "{create[RecordName]Payload.asjson()}"
    		
  5. To add additional fields:

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

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

      
      ASSIGN createDataArray[#] = item#
      		

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

  6. 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.
  7. 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 Oracle. When set to false, it does not. If you do not include this attribute in the payload, it will be assumed as false.
  8. Change all the instances of [RecordName] in the last three lines of the code to the name of the record you created. Capitalize the name to match the camel case of the attribute. For example, if the name of the record you created is incident, your code would be:

    
    DYNAMIC createIncidentPayload
    createIncidentPayload.workflowInput = createPayload
    						
    ASSIGN createIncidentJson = "{createIncidentPayload.asjson()}"
    		
  9. Save your script.

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

Configure Standard Create Workflows

Standard Create workflows create standard Oracle records. Agents can use the customer card in CXone Agent for Microsoft Teams to manually create new Oracle 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 Asset Workflow

  1. In Studio, open the script where you want to configure the Create Asset 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 createPayload
    createPayload.table="assets"
    createPayload.data.name ="[asset name]"
    createPayload.data.serialNumber ="[serial number]"
    createPayload.data.contact.id = "[contact ID number]"
    DYNAMIC product1
    product1.lookupName = "[product name]"
    DYNAMIC productArr
    productArr[1] = product1
    createPayload.data.product = productArr
    						
    createPayload.pinnedRecord = "[true or false]"
    createPayload.screenPop = "[true or false]"
    
    DYNAMIC createAssetsPayload
    createAssetsPayload.workflowInput=createPayload
    ASSIGN createAssetJson="{createAssetsPayload.asjson()}"
    		

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

  5. Change the values of the attributes. Any of these can be hard-coded, a variable, or a combination of these. Use a variable if you want the value to update for each interaction.

    1. Change the value of the createPayload.data.name attribute to the name of the asset. For example, createPayload.data.name = "Asset 2".

    2. Change the value of the createPayload.data.serialNumber attribute to the product's serial number. For example, createPayload.data.serialNumber = "SN0002301-2".

    3. Change the value of the createPayload.data.contact.id attribute to the contact's ID number. For example, createPayload.data.contact.id = "1234567890".

    4. Change the value of the product1.lookupName attribute to the name of the product. For example, product1.lookupName = "Smart Thermostat Z".

  6. 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.
  7. 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 Oracle. When 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.

Configure the Create Contact Workflow

  1. In Studio, open the script where you want to configure the Create Contact 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 createContact
    createContact.phoneNumber = "{ANI}"
    createContact.firstName = "[first name]"
    createContact.lastName = "[last name]"
    createContact.email = "[email address]"
    						
    createContact.pinnedRecord = "[true or false]"
    createContact.screenPop = "[true or false]"
    
    DYNAMIC createContactPayload
    createContactPayload.workflowInput = createContact
    						
    ASSIGN createContactJson = "{createContactPayload.asjson()}"
    		

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

  5. Change the value of the createContact.firstName attribute to the contact's first name. For example, createContact.firstName = "Elinor". 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 createContact.lastName attribute to the contact's last name. For example, createContact.lastName = "Dashwood". 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 createContact.email attribute to the contact's email address. For example, createContact.email = "elinor.dashwood@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.

  8. Change the value of the createContact.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 createContact.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Oracle. When 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 Incident Workflow

  1. In Studio, open the script where you want to configure the Create Incident 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 createIncident
    createIncident.subject = "[Incident Name]"
    createIncident.primaryContactID = "{CONTACTID}"
    						
    createIncident.pinnedRecord = "[true or false]"
    createIncident.screenPop = "[true or false]"
    
    DYNAMIC createIncidentPayload
    createIncidentPayload.workflowInput = createIncident
    						
    ASSIGN createIncidentJson = "{createIncidentPayload.asjson()}"
    		

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

  5. Change the value of the createIncident.subject attribute to the incident's name. For example, createIncident.subject = "Elinor's Incident". 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 createIncident.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 createIncident.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Oracle. When 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.

Configure the Create Opportunity Workflow

  1. In Studio, open the script where you want to configure the Create Opportunity 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 createOpportunity
    createOpportunity.subject = "[Opportunity Name]"
    createOpportunity.primaryContactID = "{CONTACTID}"
    						
    createOpportunity.pinnedRecord = "[true or false]"\
    createOpportunity.screenPop = "[true or false]"
    
    DYNAMIC createOpportunityPayload
    createOpportunityPayload.workflowInput = createOpportunity
    						
    ASSIGN createOpportunityJson = "{createOpportunityPayload.asjson()}"
    		

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

  5. Change the value of the createOpportunity.subject attribute to the opportunity's name. For example, createOpportunity.subject = "Elinor's Opportunity". 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 createOpportunity.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 createOpportunity.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Oracle. When 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.

Configure the Create Organization Workflow

  1. In Studio, open the script where you want to configure the Create Organization 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 createOrganization
    createOrganization.name = "[Organization Name]"
    						
    createOrganization.pinnedRecord = "[true or false]"
    createOrganization.screenPop = "[true or false]"
    
    DYNAMIC createOrganizationPayload
    createOrganizationPayload.workflowInput = createOrganization
    						
    ASSIGN createOrganizationJson = "{createOrganizationPayload.asjson()}"
    		

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

  5. Change the value of the createOrganization.name attribute to the organization's name. For example, createOrganization.name = "Elinor's Organization". 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 createOrganization.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 createOrganization.screenPop attribute to either true or false. When set to true, the created record automatically appears to the agent as a screen pop in Oracle. When 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.

Configure the Create Task Workflow

  1. In Studio, open the script where you want to configure the Create Task 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 createPayload
    createPayload.table="tasks"
    createPayload.data.name ="[task name]"
    createPayload.data.notes.text ="[notes for task]"
    createPayload.data.statusWithType.status.lookupName = "[Not Started, In Progress, Completed, Waiting, or Deferred]"
    createPayload.data.percentComplete = [#]
    createPayload.data.priority.id = [1, 2, or 3]
    createPayload.data.organization.id = [#]
    						
    createPayload.pinnedRecord = "[true or false]"
    createPayload.screenPop = "[true or false]"
    
    DYNAMIC createTasksPayload
    createTasksPayload.workflowInput=createPayload
    ASSIGN createTaskJson="{createTasksPayload.asjson()}"
    
    		

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

  5. Change the values of the attributes. Any of these can be hard-coded, a variable, or a combination of these. Use a variable if you want the value to update for each interaction.

    1. Change the value of the createPayload.data.name attribute to the name of the task. For example, createPayload.data.name = "Task 2".

    2. Change the value of the createPayload.data.notes.text attribute to notes about the task. For example, createPayload.data.notes.text = "This is a test task".

    3. Change the value of the createPayload.data.statusWithType.status.lookupName attribute to the status of the task: Not Started, In Progress, Completed, Waiting, or Deferred. For example, createPayload.data.statusWithType.status.lookupName = "In Progress".

    4. Change the value of the createPayload.data.percentComplete attribute to the percent complete the task is, without the percent sign (%). For example, createPayload.data.percentComplete = 80 marks the task as 80% complete.

    5. Change the value of the createPayload.data.priority.id attribute to the task's priority:

      • 1: Low

      • 2: Normal

      • 3: High

      For example, createPayload.data.priority.id = 1 marks the task as low priority.

    6. Change the value of the createPayload.data.organization.id attribute to the ID number of the organization the task belongs to. For example, createPayload.data.organization.id = 18.

  6. 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.
  7. 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 Oracle. When 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 Oracle 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 Oracle.

  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 :

    						
    createPayload.screenPop = "true"				
    		

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

  3. Save your script.