Runapp

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. Agent for Salesforce and Agent for Salesforce Lightning support this action.

This action submits information through the Ondata branch.

Supported Script Types

Generic Email Chat Phone Work Item SMS

Properties

Property Details
AgentID The agent ID variable name. Outbound skills have a custom script assigned, therefore when the 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
    RunExe—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\\inContact\\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: 

    • Ondata action—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/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.

WaitTimeout

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

Branches

Branch Details

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 (for example, poor connectivity, syntax errors, and so forth). The _ERR variable (with a single underscore character) should be populated with a condensed explanation of the problem.

Tips & Tricks

Runapp is similar to Indicate, except that the ActionType is initiated by the script rather than the agent.

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

Similar Solutions

You can use Page 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.

Runapp Wizard

  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\\inContact\\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 the Preview button to see the form.
  4. Click OK.

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