This articles allows to add customized features to Rainbow applications using a set of actions configurable from a custo-manifest.json file.
The available actions are:
- Actions automatically triggered following events:
- on-incoming-pbx-call-actions: to execute an action when an incoming call occurs
- on-answering-incoming-pbx-call-actions: to execute an action when an incoming call is answered
- on-releasing-incoming-pbx-call-actions: to execute an action when an incoming call is ended
On incoming calls, actions can launch a script, application or web page with information on the incoming call.
- Actions triggered via button use:
- on-incoming-pbx-call-button-actions: to execute an action by clicking a button added in the incoming call pop-up window
- on-call-log-list-actions: to execute an action by clicking a button inserted in each item of call log
- on-contact-list-actions: to execute an action by clicking a button inserted in each item of contacts
- on-contact-detail-actions: to execute an action by clicking a button inserted in the contact detailed area
- on-communication-card-actions: to execute an action by clicking a menu inserted in the call manager bar.
By clicking buttons, actions can open pop-up windows with possibility to join contacts or services by e-mail.
- Actions with automatic information display:
- on-incoming-pbx-call-display-actions: to insert information in the incoming call pop-up
- on-contact-card-display-actions: to insert information in the contact detailed area
These actions are configured from the custo-manifest.json file available from the Rainbow application.
Configuration consists in:
- Exporting the custo-manifest.json file on computer
- Editing and completing the custo-manifest.json file
- Importing the custo-manifest.json on Rainbow application
Configuration only applies to Rainbow applications running on computer only.
Configuration must be performed for each Rainbow application.
Prerequisite
- The custo-manifest.json file configuration requires at least a Business, Enterprise or Attendant license.
Custo-manifest file overview
The custo-manifest file consists of two parts:
- The first part lists all the available actions, and provides for each action, a template with the main parameters to complete.
Example:
- The second part provides a help guide to be read for configuration.
An action is defined by the following parameters:
- "name": is a text used to identify action or the label of button for actions using button
- For actions using button:
- "icon": is the access path to the button icon
- "tooltip": is the access path to the tooltip displayed when the mouse is moved over the button
- "command": defines the action to be executed
-
"url": is the path or URL to access local application, web page or REST API
Note: The backslash must be double in access path to local application (e.g. C:\\MicroCRM\\MicroCRM.exe).
- "params": is a string with variables ${xx} which will be replaced by their value in action execution
-
"commandType": specifies action type:
- "none": launches a local application or a web page (if url starts with 'http' or 'https')
- "rest": executes a REST API call
- "file": fetches the file content to fetch (mainly for debugger tuning)
-
"responseType: defines the type of content returned by action: "markdown", "json" or "adaptiveCard".
If set to "json", then:
- "displayJsonField": defines the field which value is the content to be displayed
- "firstNameJsonField": defines the field which value must substitute to the caller first name
- "lastNameJsonField": defines the field which value must substitute to the caller last name
- "companyJsonField": defines the field which value must substitute to the caller's company name
If set to "adaptiveCard", then:
- "adaptiveCardTemplateJsonField": defines the template of the adaptive card to be displayed
- "adaptiveCardContentJsonField": defines the content of the adaptive card to be displayed
Additional parameters are available:
- "AnswerOnClick": when set to true, executes the action and answers the incoming call at the same time (for action on-incoming-pbx-call-button-actions only)
- "filter": if set to "NoShortNumber", it will not trigger event if caller number is a short number
-
"RaiseChangeCall": allows to configure the behavior when receiving a transferred call:
- false: only direct calls to the user will trigger the event
- true: the event is triggered for direct calls to the user and also for calls that have been transferred to this user
- only: only transferred calls to the user trigger the event
The action template can include variables ${xx} configured in the "url", "params" and "bodyParameters" (for REST API) parameters. They are replaced by their value when the action is executed.
Exporting the custo-manifest file on computer
- From the Rainbow administration interface, click on the avatar in the left panel, then Settings menu.
- In the left-hand menu, select Telephony.
The Settings - Telephony configuration window opens. - Expand the window up to the CUSTOMIZATION section.
- Click on Export file and use the browser to export the custo-manifest file on the computer.
- Click on Close to exit the telephony settings window.
Configuring the custo-manifest file locally
- Open the custo-manifest file using a text editor.
- Configure the parameters of the actions to be used.
Warning: do not delete the space between the double quotation marks for the unused parameters ("name": " ", "url": " ", "params": " "), otherwise the imported file will not be taken into account.
- Remove the parameters of all the unused actions.
- Save the custo-manifest file.
Importing the custo-manifest file on Rainbow application
- From the Rainbow administration interface, click on the avatar in the left panel, then Settings menu.
- In the left-hand menu, select Telephony.
The Settings - Telephony configuration window opens. - Expand the window up to the CUSTOMIZATION section.
- Click on Import file and use the browser to select and import the custo-manifest file on the Rainbow application.
- Click on Close to exit the telephony settings window.
Examples of configuration
Execute an application or script with parameters
Example 1:
The action on-incoming-pbx-call-actions executes an application (e.g. MicroCrm) with a parameter from 'params' (no return).
"version": "2",
"extension-points": {
"on-incoming-pbx-call-actions": [ { "name": "Exec CRM", "command": { "url": "C:\\MyApp\\CustoApp\\MicroCRM.exe", "params": "-number ${caller.phoneNumber}" } } ],
Example 2:
The action on-incoming-pbx-call-actions executes a script (*.bat) with parameters from 'params' (no return).
"version": "2",
"extension-points": {
"on-incoming-pbx-call-actions": [ { "name": "BatScript", "command": { "url": "C:\\MyApp\\MyApp.bat", "params": "IN-COMING canNr:${localUser.canonicalNumber} userIntNr:$"{localUser.internalNumber} caller[Nr:${calle.phoneNumber} FN:${caller.firstName} LN:${caller.lastName} .... CorData:[${call.correlatorData Hex:${call.hexCorrelatorData]" }
} ],
Open a web page with parameters
Example 1:
The action on-incoming-pbx-call-actions opens a web page with parameters from 'params' (no return).
"version": "2",
"extension-points": {
"on-incoming-pbx-call-actions": [ { "name": "Yellow pages", "command": { "url": "https://www.pagesjaunes.fr/annuaireinverse/recherche",
"params": "quoiqui=${caller.phoneNumber}&proximite=0"
}
}
],
Example 2:
The action on-incoming-pbx-call-actions opens a web page with parameters directly in URL (no return).
"version": "2",
"extension-points": {
"on-incoming-pbx-call-actions": [ { "name": "Contact popup", "command": { "url": "http://localhost:3000/contactShow?phone=${caller.phoneNumber}",
"params": " "
}
}
],
Execute a REST API call with parameters
Example 1:
When incoming call is released, the action on-releasing-incoming-pbx-call-actions creates an END call log in REST using GET method and parameters from "params" (no return).
"version": "2",
"extension-points": {
"on-releasing-incoming-pbx-call-actions": [ { "name": "GetRestApi", "command": {
"commandType": "rest",
"method": "GET", "url": "http://localhost:3000/IncidentManager/CreateCallLog",
"params": "byEmail=${localUser.email}&CustomerContact=${caller.phonenumber}"
}
}
],
Example 2:
When incoming call is released, the action on-releasing-incoming-pbx-call-actions creates an END call log in REST using POST method and parameters from "bodyParameters" (no return).
"version": "2",
"extension-points": {
"on-releasing-incoming-pbx-call-actions": [
{
"name": "PostRestApi",
"command": {
"commandType": "rest",
"method": "POST",
"url": "http://localhost:3000/IncidentManager/EndCallLog",
"params": " "
},
"bodyParameters": {
"caller": "${contact.phoneNumber}",
"user": "${localUser.email}",
}
],