Spawn

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

Fires off a one-time "wake-up call" for a different script. Spawned scripts run parallel to the calling script. You can use them to perform actions that must occur at the same time. When a calling script triggers a Spawn, the spawned script begins immediately while the calling script continues processing, unless the StartDate parameter is used to schedule the spawn.

Dependencies

  • All scripts called by RunScript , Spawn, Runsub, or similar scripts must be valid and active. During the save process, Studio validates all scripts called by actions. If any of them are invalid or inactive, Studio displays an error and you won't be able to save.

  • For a script to spawn successfully, the ACD skillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge associated with the to-be-spawned script must:

    • Be active.
    • Match the script media type. For example, phone scripts must correlate with phone call skills. You can find the skill type on the Details tab of a skill. Scripts with the Generic type work with any active skill.

Supported Script Types

A square with a line branching from it that goes to three other squares.

Generic

Email Chat Phone Voicemail Work Item SMS

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.

Script Name The script you want to spawn. You can click the Choose Script link at the top of the action's properties box to select a script from your business unit.
Spawn ID Variable The name of a variable to receive the unique identifier of the spawned script. The default variable is SPAWNID. Typically, the identifier is the master ID of the parent script. However, if the parent script is a subscript or a spawned script, the ID is the contact IDClosed A unique numerical identifier assigned to each contact. The master ID and contact ID are a pre-defined variables that are automatically created for the contact.
Skill Select an ACD skillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge. If you select Default, the script uses the default skill set in the script when this action fires. If no skill is set in the script, it uses the skill assigned to the associated point of contactClosed The entry point that an inbound contact uses to initiate an interaction, such as a phone number or email address.. You can use a variable in this property.
StartDate

The start date for the spawned script. Enter a date/time string, using a format such as MM/dd/yyyy hh:mm:ss tt.To have a Spawn action create a one-time script schedule, simply specify a start date at least 10 minutes in the future. If a start date is not specified, the targeted script is immediately spawned. The action and the to-be-spawned script both use the business unit's time zone.

Parameters

Add values to pass to the child script. Enter up to nine values, one per line in the editor window. These values are passed as parameter variables p1 - p9.

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.
OnLinked Path taken if the spawned script issues a voice Link action with the calling voice script. The Spawn action will not suspend the script waiting for the OnLinked branch condition to trigger. Instead, the Default branch condition will be triggered and the OnLinked branch condition will be remembered. This is an Interrupt event.

Later, when the child script executes Link, the parent script will stop processing and jump to the action attached to the On Linked branch.

OnTerminated Path taken when the spawned script finishes. The Spawn action will not suspend the script waiting for the OnTerminated branch condition to trigger. Instead, the Default branch condition will be triggered and the OnTerminated branch condition will be remembered. This is an Interrupt event.

Later, when the child script terminates, the parent script will stop processing and jump to the action attached to the OnTerminated branch condition.

Error Path taken when the action fails to execute properly. For example, when there is an unexpected problem such as poor connectivity, syntax errors, and so on. The _ERR variable, with a single underscore character, should be populated with a condensed explanation of the problem.