Overview

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. Editing the Omilia_miniApps script.

In particular, the parameters are as follows:

  • host_type - OCP® instances.

    Available OCP® instances:

    • eastus-z

    • us1

  • pseudo_number - NICE inContact Virtual Number

    Virtual number (also pseudo or internal number) is used to enable SIP connectivity between NICE inContact and OCP. This is the number you get during the Telephony Integration step.

  • app_id - OCP miniAppId

    miniAppId is unique for each miniApp.

    To find your miniAppId go to your miniApp, then click on General: there you will see the miniAppId of the current application.

  • language - OCP miniApps® locale

    Available locales depend on the miniApp.

    To find supported locales, go to your miniApp, then click on Manage Languages: there you will see available locales.

  • 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 (extValue3==closed){ do something }

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

After you’ve edited and saved the Omilia_miniApps.xml file, you can import all the scripts into NICE inContact studio to complete the integration.

Importing NICE inContact 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 inContact Studio:

  1. Open NICE inContact Studio.

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

Importing scripts into NiC

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.


miniApp Session Responses

When a miniApp ends, it will post back the results to NICE inContact 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 section miniAppResult.