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

Enter the name of the variable that holds the configuration ID. Format it with curly braces ( { } ). For example, {integrationConfigId}.

Workflow Id

Enter the name of the variable that holds the workflow ID. Format it with curly braces ( { } ). For example, {searchWorkflowId}. You can find the workflow ID on the Agent Integrations Configurations page in CXone.

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

This is a snippet

Dynamic Data Mapping ID

This is a snippet

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.
InternalError

The path to take when the action encounters an error.

InvalidWorkflow

The path taken when the specified workflow is invalid.

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.

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.

Required SNIPPET Action Code

This action requires Snippet actions with custom code: 

Information about adding these snippets to your script is available in the online help page about integrating your CRM with a CXone Agent application.

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.