Workflow Execute

This help page is for CXone Studio. This information is also available for Desktop Studio.

Workflow Execute allows you to integrate a CRMClosed Third-party systems that manage such things as contacts, sales information, support details, and case histories. with CXone Agent or CXone Agent Integrated. This action triggers a workflow. Workflows include things such as displaying data about a contact or creating a ticket. Other actions used in the script send the results and relevant data to the agent application when the agent answers the call. The other actions also pass any necessary information back to the CRM when the call completes.

You can define a music file or other audio sequence to play for the contact while the script executes the workflow.

Dependencies

  • Before you can configure this action, you must add a CRMClosed Third-party systems that manage such things as contacts, sales information, support details, and case histories. integration to CXone and enable the workflows you want to use. You can integrate CRMs with CXone Agent, CXone Agent Embedded, and CXone Agent Integrated.
  • You must use a separate Workflow Execute action for each workflow you want to use in your script. You can include more than one Workflow Execute action in your script.
  • To use the configuration wizard in this action, you must be logged in to CXone or log in to Studio using the Login button with your CXone user name and password. If you log in with the Login with Session ID button when you are not logged in to CXone, the wizard will not appear. This is because access to the wizard depends on Global Authentication, which is only used when you log in with your CXone user name and password.
  • To send results of the workflow to the agent application, you must include a Custom Event action in the script. The Custom Event action must call specific events. The events are described in the online help about creating a script to integrate CRMs with CXone Agent, CXone Agent Embedded, and CXone Agent Integrated.
  • This action must be used with the Agent Workflow Configuration action. It can only be used in CRM integration scripts.

Supported Script Types

Phone Digital

Input Properties

These properties define data that the action uses when executing.

Property

Description

Add Caption

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon.

Configuration Id

The configuration ID of the CRM you use. This field is completed automatically by the action's configuration wizard. If you use a variable in this field instead, format it with curly braces ( { } ). For example, {integrationConfigId}.

Workflow Id

The ID of the workflow this action handles. This field is completed automatically by the action's configuration wizard. If you use a variable in this field instead, format it with curly braces ( { } ). For example, {searchWorkflowId}.

Workflow Payload

Enter the name of the variable that holds the workflow payload that this action handles. Format the name with curly braces ( { } ). The payload must be converted into JSON. For example, {searchInput.asjson()}.

Sequence

Define the prompt that the action plays. If the prompt is an audio file, enter the file name enclosed in double quotes. For example, "greeting.wav".

If the prompt is text-to-speech, click the ellipsis button and enter the text you want the TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. service to read. Each segment must be enclosed in double quotes and include a string reference character to identify the type of information it is. For example: 

"%Your account balance is" "silence.wav"  "${accountBalance}"

For more information about formatting prompts in this property, see the Manage Prompts page.

You can use the Sequence Editor from an action that supports it, such as Play, then copy and paste the sequence text from the Sequence field in that action into this action.

Playing a prompt is optional for this action.

Phrase

Use this property to document the text that the prompt contains. The script doesn't use the text in this property. Because some prompts can be complex and contain multiple segments, it can be helpful to include the full text written without the formatting required by the Sequence property.

ActionType
Dynamic Data Mapping ID

Output Properties

These properties contain variables that hold data returned from executing the action. They're available for reference and use when the action completes.

Condition

Description

errorArgs

Enter the name of the variable to hold information about the error. The default variable is workflowErrorOutput. You don't need to format the variable name with curly braces.

resultSet

Enter the name of the variable that you want to hold the result of the specified workflow. The default variable is workflowResultOutput. This field does not require curly braces.

cacheKey

This is a snippet

Result Branch Conditions

Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.

Condition

Description

Default Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined.
Success

Path taken if the action completes without errors and any API calls or data returns were successful (2xx response codes).

Timeout

The path taken when the workflow execution exceeds the timeout value specified in the input. Add the timeoutMilliSec = "6000" variable to the Workflow Input snippet if you want this workflow to have a timeout. Change the number of seconds if needed.

ValidationError

The path taken when any input cannot be validated. This includes:

  • Configuration ID: Must be a valid configuration ID from the Agent Integrations > Configurations page in CXone.
  • Workflow ID: Must be a valid workflow ID from the the Agent Integrations > Configurations page in CXone.
  • Workflow payload: Must be a valid JSON string.
InvalidWorkflow

The path taken when the specified workflow is invalid.

InternalError

The path to take when the action encounters an error.

NotConfigured

The path taken if Agent Integrations are not enabled for your tenantClosed High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment. Contact your CXone Account Representative to have the feature enabled.

Required SNIPPET Action Code

This action requires Snippet actions with custom code. Information about the required snippets is available in the online help page about integrating your CRM with a CXone Agent application.

Select Actions and Workflows

  1. Select the Workflow Execute action in your script and click Open Editor in the action's properties.

  2. Select the Custom CRM Configuration you want this Workflow Execute action to use. If the drop-down list is empty, you must set up a configuration before continuing. You must choose the same configuration in both the Agent Workflow Configuration and Workflow Execute actions in this script.
  3. Select one or more Actions that you want agents to be able to perform when this script runs.

  4. In the Workflow Mapping section, select the workflows that you want to assign to the Actions you selected. You can only select one workflow per action. The Action column shows which action each workflow option corresponds to.

    The following example image shows the workflows available for ServiceNow. If you use a different CRM, the options will be different.

  5. If you want to change a workflow mapping, clear the first selection before choosing a new workflow. If you want to remove all selected mappings, select the checkbox in the column header.
  6. Click Next.
  7. Verify your selections on the Custom CRM Configurations Updated window. If you need to change a selection, close the window and make your change.
  8. Click Save on the Custom CRM Configurations Updated window to apply your selections to the Workflow Execute properties.

Script Example

This is an example to show how this action can be used in scripts. It is not intended to be a complete script. Additional scripting may be required.

The following example shows the Workflow Execute action being used to integrate a CRM application with CXone Agent, CXone Agent Embedded, or CXone Agent Integrated. You can find more information about using the action, including a sample script to download, on the help page about the integration process.