Skip to main content
Skip table of contents

NICE CXone Integration


After finishing the API and telephony integration, you can download the provided scripts:

  1. Open NiC Studio Integration Tab.

  2. Click NICE inContact scripts. The script download starts.


NICE inContact Studio scripts

NICE inContact scripts file is an archive that contains three XML studio scripts:

  • Omilia_mainScript_DEV.xml

  • Omilia_masterScript_DEV.xml

  • Omilia_spawnScript_DEV.xml

The Omilia_masterScript_DEV.xml should be edited to provide the relevant parameters.

Omilia_mainScript_DEV.xml and Omilia_spawnScript_DEV.xml should always be kept within the same relative path (for example, within the same folder) as one refers to the other at runtime, and they should not be edited.

Import all the scripts into NICE CXone Studio to complete the integration. Edit the Omilia_masterScript_DEV.xml file with the proper project data in NICE CXone Studio to complete the integration.

Importing NICE inContact Studio scripts

When importing the scripts, make sure they are connected to the right flow, and the parameters have correct values.

To import your scripts into NICE CXone Studio:

  1. Open NICE CXone Studio.

  2. Click File Import File in the top left corner. Or you can press the following hotkeys combination: <Ctrl>+<I>.

    Importing scripts into NICE CXone Studio

  3. Choose the folder with these scripts or a specific script that you need to add.

  4. Click Open. Now the scripts will be displayed on the right in the Browse section, and you will be able to see your whole miniApps flow.

Editing the Omilia_masterScript

  1. Select the corresponding element in the CXone flow diagram.

  2. Edit the Snippet properties.

In particular, the parameters are as follows:

  • app_id - OCP miniAppID

    miniAppID is unique for each miniApp.

    To find your miniAppID go to your miniApp, in the General tab. There you can see and copy the OCPminiAppID of the current application.

  • pseudo_number - NICE CXone Virtual Number

    Virtual number (also pseudo or internal number) is used to enable SIP connectivity between NICE CXone and OCP®. This number is provided by NICE when purchasing SIP trunks.

  • host_type - OCP® instances.

    Available OCP® instances:

    • us1

  • language - OCP miniApps® locale

    Available locales depend on the miniApp.

    To find supported locales, go to your miniApp, on the Manage Languages tab. There you will see available locales (For example, de-DE, en-US, el-GR).

  • log_ani, log_dnis - OCP ANI/DNIS

    1. log_ani - ANI (Automatic Number Identification), allows or disallows you to log the phone number of call originator.

    2. log_dnis - DNIS (Dialed Number Identification), allows or disallows you to log the dialed phone number.

      true - allow, false - disallow

  • extValue - pass variables you want to use in different miniApps.

    You can add up to 10 different values (they have to be separated by pipes |), like this:

    ASSIGN extValue = "{storeLocation}|{openingTime}|{status}"

    This way, if the store location is NYC, it will be assigned to extValue1. If the opening time is 8AM, it will be assigned to extValue2, and so on. You can also pass a JSON object with multiple key-value pairs. After that, you will be able to use this inside any of the miniApps or JS functions. For example, in the Announcement miniApp, you will be able to do the following:

    Welcome to {{extValue1}}. The store opens at {{extValue2}}.

    Or in a JS function you can write it like this:

    if (params.extValue3==closed){ do something }

  • errorEmail - defines to which email to send a notification when a call fails to reach Omilia.

miniApp Session Responses

When a miniApp ends, it will post back the results to NICE CXone in JSON format. The miniAppResult object can be parsed on the NICE inContact script and the data can be used to decide on the flow of the call.

The specification of the miniAppResult output can be found in the miniAppResult section.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.