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

Terminates a script.

There are some differences in how this action functions depending on script media type. It's important to use this action with supported media types only. See the Dependencies and Similar Actions sections for more information.


  • If you use End in a script with an unsupported media type, it may not end all processes properly or the contact. Ending background processes is a key function of terminating actions. For this reason, it's important to use the action best suited for the media type of your script:
    • For inbound phone scripts, you can use End as long as the call hasn't connected. After a call connects, use the Hangup action to terminate the script.
    • For outbound phone scripts, you can use End until the Placecall action executes. After the call connects, use the Hangup action to terminate the script.
    • For chat scripts, use Exit to terminate the script.
    • For email scripts, use Discard to terminate the script.
    • For digital scripts, End only terminates the script. It doesn't terminate the contact. Digital contacts continue to exist in Digital Experience. For all other script types, End terminates both the script and the contact.
  • If you use End in a subscript, it terminates both the subscript and the originating script. Use the Return action if you want to terminate the subscript but for the originating script to continue.
  • End should be used to terminate the logic flow of an active script and invoke the OnRelease event action. For this reason, it shouldn't be used after the OnRelease event logic.

Supported Script Types

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


Phone Voicemail Work Item SMS Digital

Comparison of Similar Actions

  • Discard: Terminates an email script.
  • End: Terminates a phone, voicemail, SMS, or digital script. Does not terminate a digital contact, but terminates contacts in scripts with other media types.
  • End a Contact: Terminates the active contact. Does not terminate the current script.
  • EndText: Terminates an SMS workflow that doesn't include a Regagent action (for digitalClosed Any channel, contact, or skill associated with Digital Experience. channels only).
  • EndWi: Terminates a work item with a cause code. Does not terminate the current script.
  • Exit: Terminates a chat session and disconnects the chat contact.
  • Hangup: Terminates a phone script.
  • Return: Terminates a subscript and returns control to the originating script.

Do not use the Stop action to end a script. It does not terminate the script and leaves contacts running. This has a negative impact on the CXone servers.

Input Properties


Result Branch Conditions


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.

This script shows a very simple example in which End is used in a phone script, but the outbound call was never placed because an error occurred. If the error had not occurred, Placecall would have been triggered, and you would have used Hangup in a different branch. Refer to Placecall to see an example of using Hangup in a phone script.

Would you like to download this script?