Configure Oracle Workflows for CXone Agent Integrated

You can configure Search, Standard Create, and Custom Create workflows for Oracle and CXone Agent Integrated.

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
Standard Create Standard Create workflows create records for the standard Oracle entity types, with the standard data fields. Create Asset
Create Contact
Create Incident
Create Opportunity
Create Organization
Create Task
Custom Create Custom Create workflows create custom records. Custom records can have standard and custom data fields. Create Custom Record

Configure Search Workflows

Configure the Search for ANI Workflow

  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

This workflow supports these Oracle entities:

  • Asset

  • Contact

  • Incident

  • Opportunity

  • Organization

  • Task

  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 entity you want to use. For example, payload.entity = "asset". This is case-sensitive.

  6. Change the value of the payload.filter attribute.

    1. Change [fieldName] to the name of the entity field name, 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 . This is case-sensitive.

    3. Change {variable} to the variable you want to be searched. This is case-sensitive.

  7. Save your script.

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

Configure Standard Create Workflows

You cannot add fields to Standard Create workflows. If you add fields, the record won't be created. To create a custom record with the fields you want, use the Create Custom Record workflow.

Configure the Create Asset Workflow

Use this example script.

  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
    
    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. Save your script.

  7. 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]"
    
    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. Save your script.

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

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

  7. 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]"
    
    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. Save your script.

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

Configure the Create Task Workflow

Use this example script.

  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 = [#]
    
    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. Save your script.

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

Configure Custom Create Workflows

Configure the Create Custom Record Workflow (Previously Create Entity)

The Create Custom Record workflow creates a custom CRM record. These custom records 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}"
    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
    						
    DYNAMIC createIncidentPayload
    createIncidentPayload.workflowInput = createPayload
    						
    ASSIGN createIncidentJson = "{createIncidentPayload.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. Save your script.

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