Runapp

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

Initiates custom functionality from the script, specifically launching a form, webpage, or application. Any URLs targeted to a contact panel must be configured to allow being displayed in an iframe. Agents must have their Panels setting in MAX set to On. Salesforce Agent and Salesforce Agent Lightning support this action.

This action submits information through the Ondata branch.

A common use of Runapp is to pop a standard form or custom URL for agents with the ONANSWER event (managed with the Onanswer action).

You can use PAGE action to pop simple HTML pages to an agent. Page is useful for creating a sequence of items that follow separate branches, whereas any time you submit information with Runapp, the information goes through the Ondata branch.

Supported Script Types

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

Generic

Email Chat Phone Work Item SMS

Comparison of Similar Actions

The following actions have similar functions, but with some key differences: 

  • Runapp: Initiates custom functionality from the script, specifically launching a form, webpage, or application.
  • PopURL: Opens webpage URLs and provides options for the location and styling of the panel that pops the webpage.
  • Indicate : Extends the agent interface with custom functionality, specifically an icon that the agent clicks to initiate the custom function. This is similar to Runapp, except that with Indicate, the ActionType is initiated by the script rather than the agent.

Input Properties

These properties define data that the action uses when executing.

Property

Description

Caption

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

AgentID

The agent ID. You can use a variable for this field, such as {agentId}.

Outbound skills have a custom script assigned, therefore when Runapp fires in the outbound custom script, it uses the Begin action since it already "knows" who the agent is (the one making the outbound call). Therefore, a screen pop will only work if {__agentID} is used as the variable name. For inbound scripts, the script does not "know" who the agent is until Onanswer fires, which sets the agent ID variable to AGENTID.

You can use the RunApp Property editor to configure this property by double-clicking the action.

ActionType

  • RunExeCXone does not support. This requires a local executable which resides in the Windows path or with the full path entered in the ActionValue field. The file path must include double back slashes (\\) in the path. For example, C:\\Program Files\\CXone\\studio.exe. Most modern browsers do not support running executable programs. If you want to use this type, ensure that your agents use a compatible browser.
  • OpenURL: Opens a default web browser to the URL specified in the ActionValue field.
  • ShowCustomForm: Launches a custom HTML form created in Studio. The captured data from the custom form will trigger the ONDATA event in the script.

You can use the RunApp Property editor to configure this property by double-clicking the action.

ActionValue

The value needed by the specified ActionType. Variables are supported in this property by encapsulating the variable in {braces}.

  • RunExe: The name or path to a windows executable file. The file path must include double back slashes (\\) in the path. For example, C:\\Program Files\\MyCompany\\myApp.exe -h {ANI}.
  • OpenURL: Must be fully qualified domain name and URL. Query string parameters are supported. For example, http://www.example.com/file.asp?ANI={ANI}. You can also customize the title of the tab that pops up in the MAX interface by appending the icAgentPanelTitle= parameter to the URL.
  • ShowCustomForm: This field offers the ability to build a custom HTML form. Any standard form input fields may be used, including Input, Textarea, Password, Checkbox, Radio, Select, Button, and Submit. Don't include the <form> tags.

    Each input field must contain a name. Fields without a name will be ignored. Example, <input type="text" name="phone">.

    The script must contain one of these things for your custom form to work: 

    • Ondataaction: Names and values are returned to the script as variables using this action.
    • WaitForSubmit property: When included and set to True, field names become variables in the script. Field values become the contents of the variables.

    Form fields that support multiple values, for example Checkbox and Select, will contain a comma-separated array.

    Multiple submit buttons can be used using the same or different names, but any submit button will submit the data and close the window. If you want a button that doesn't submit, then use a button rather than a submit.

    Linked stylesheets are not supported, you can use inline styles. For example, <div style="position: absolute: left: 10px: top: 100px:">.

    Javascript will work when linked to an external Javascript, but content must be HTTPS to avoid errors. For example:

    <script type="text/javascript" src="https://www.example.com/test.js"></script>

    <INPUT TYPE="button" NAME="button" Value="Click" onClick="MyFunction(this.form)">

You can use the RunApp Property Editor to configure this property by double clicking the action.

WaitForSubmit

True or False. True means that the system will wait for a submit action by the agent. Additionally, field names become variables in the script, with the field values as the variable contents. WaitForSubmit is only applicable if the Action Type is ShowCustomForm. It works in conjunction with WaitTimeout. When WaitForSubmit is set to False, you must include the Ondata action in the script, which returns the field names and values to the script as variables.

Determines whether the system waits for a submit action by the agent. When enabled, the system waits for the agent's submit action. Field names become variables in the script with the field value as the variable's value. When disabled, you must include the Ondata action in the script, which returns the field names and values to the script as variables. Set to True to enable or False to disable.

This option is only applicable if the Action Type is ShowCustomForm. It works in conjunction with WaitTimeout.

WaitTimeout

The number of seconds that will trigger the OnTimeout branch if the Action Type is ShowCustomForm.

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.
Submit Path taken if WaitForSubmit is set to True.
Timeout Path taken if there is no response for the number of seconds specified.

OnError

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.

Runapp Wizard

You can also configure the action directly in the action's properties.

  1. Double click the Runapp action to open the RunApp Property Editor wizard.
  2. Enter the agent ID for the agent to receive the Runapp action. For outbound scripts, use {__agentID} as the variable name, for all other scripts use {AGENTID}.
  3. Select the action type.
    FieldDescription
    Run an executable program

    Runs a local executable. This option uses a Java plugin that is only functional with Internet Explorer, which CXone does not support. This requires a local executable which resides in the Windows path or with the full path entered in the ActionValue field. The file path must include double back slashes (\\) in the path. For example, C:\\Program Files\\CXone\\studio.exe. Most modern browsers do not support running executable programs. If you want to use this type, ensure that your agents use a compatible browser.

    Pop open a web page

    Enter the full URL of the webpage in the Action Command field. The page will be opened with the default browser on the agent's local computer.

    Prompt the user with a web page like form
    1. Enter the HTML code to generate a form in the Action Command field. You do not need to include the opening and closing <form> tags.
    2. Click Preview to see the form.
  4. Click OK.