This document provides an overview of what’s required to successfully integrate OCP miniApps® into the NICE inContact studio.

When you go to the miniAppsIntegrate tab in your OCP Console® account, you will see the following:

The part highlighted in red refers to NICE inContact integration with OCP miniApps®.

All steps in the integration process are sequential - you should not start with Telephony integration without having created an API Profile.

API integration

Add API profile

This step is needed to build the bridge between the NICE inContact API and OCP miniApps®. Here we essentially tie your NICE inContact profile to OCP miniApps® to be able to establish a two-way connection and successfully integrate your pre-existing NICE inContact Studio setup and OCP®.

  1. To add your NICE inContact profile select the API integration option, click + API Profile.

  2. Fill in the fields.

  • Group: Select the OCP miniApps® group for which you want to enable the integration with NiC.

  • Account Type: There are two options: User Hub or Central. The details you need to fill in for either one of them do not differ, but the authentication endpoints do. Thus, having this information available is paramount.

  • Platform Region: Select the region of your NiC account.

    • na1 refers to North America

    • eu1 refers to Europe

    • au1 refers to Australia

  • Access Key Id: Insert your access key. Check this article to find out how to generate the Access Key ID.

  • Access Key Secret: Insert your secret key. Check this article to find out how to generate the Access Key Secret.

For a detailed step-by-step description on how to do the above, read NiC API integration with OCP miniApps ®.

If the provided data is correct, you will see that the authorization process was successful and you are now Verified. In case the verification fails, you will see a red cross as shown below:

This indicates some data is not valid or does not correspond to the specified account. In this case you should double-check your details.

After finalizing the API integration, you can move on to Telephony Integration.

Telephony integration

During this step, you need to get a virtual number to connect to your API profile. This is needed because the SIP connections between NICE inContact and OCP® are established by using a NICE inContact virtual number. In order to see how you can get a virtual number, check how to set up NiC telephony integration with OCP miniApps®.

However, as getting the number from NICE inContact might take up to a few weeks, OCP miniApps® offer an intermediate solution: a trial virtual number that gets assigned to you upon API profile creation, one per each business unit number.

If, for some reason, you have not been assigned a trial virtual number, contact our Support and we will assist you.

After you get your NICE inContact number, you will be able to see both your trial virtual number and the active virtual number:

However, soon after you will be notified via email that your trial number is going to be detached from your account and you will only be able to see and use the NICE inContact virtual number.

NICE inContact Studio 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 3 XML studio scripts:

  • Omilia_Main

  • Omilia_miniApps

  • Omilia_Spawn

Omilia_Main and Omilia_Spawn should always be kept within the same relative path (i.e. within the same folder) as one refers to the other at runtime, and they should not be edited. The Omilia_miniApps should be edited to provide the relevant parameters.

Editing the Omilia_miniApps script

In particular, the parameters are as follows:

  • host_url - OCP miniApps® endpoint

    Available OCP miniApps® endpoints: .

  • 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 }

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>.

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.

Detailed integration into NICE in Contact Studio

To learn more about OCP miniApps® integration into NICE inContact Studio read the below articles