---
title: Omni Toolbar
slug: harmony/omni-toolbar
docTags: OuVYxKFVbPwY3g9aAvgkQ,TszuH3bpVwDJ3vwm11p6n
createdAt: 2025-10-29T06:42:48.217Z
---

# Overview

The **Omni Toolbar** is Exotel’s unified agent workspace that embeds directly into customer CRMs or internal tools to handle **voice, chat, WhatsApp, and future channels** from a single, consistent interface.

From a customer’s point of view, the Omni Toolbar:

- Replaces fragmented CTI and channel-specific widgets&#x20;
- Preserves **context across channels**&#x20;
- Reduces agent training and handling time&#x20;
- Acts as the **single control surface** for all interactions&#x20;

If you’ve previously used the **Generic Toolbar Integration**, think of Omni Toolbar as:

:::BlockQuote
*The same CTI foundation, evolved for omnichannel, scale, and future extensibility.*
:::

## Who Should Use Omni Toolbar

The Omni Toolbar is designed for:

- Customers embedding Exotel into **CRMs.**&#x20;
- Customers building **custom agent desktops**&#x20;
- Customers migrating from **voice-only CTI** to omnichannel&#x20;
- Enterprises that want **one integration** instead of per-channel integrations&#x20;

If your agents switch tabs, windows, or tools to manage calls, chats, and WhatsApp today — Omni Toolbar is meant for you.

## Core Capabilities

- Embeds as a **floating or docked toolbar** inside your application&#x20;
- Manages **agent login, presence, and state**&#x20;
- Handles **inbound and outbound interactions**&#x20;
- Supports **voice, chat, WhatsApp** (channel-aware UI)&#x20;
- Triggers **screen pops** and contextual actions&#x20;
- Maintains **interaction lifecycle events**&#x20;
- Supports **future extensibility** without reintegration

## Setup for CRM Integration (Iframe Model)

The Ameyo Omni Web Toolbar is designed to be embedded within an **iframe** on the third-party CRM's web page.

1. **Iframe Container:** The third-party CRM must have a \<div> element with the ID **ameyoIframeDiv** to contain the toolbar iframe. <font color="#4338CA">Sample URL :- https://&lt;**yourECCDomainName**&gt;/omniapp/toolbar/index.html</font>

:::hint{type="info" indent="3"}
Currently, we support a minimum size equivalent to the iPhone SE dimensions i.e., 375 (width) × 667 (height).
:::

2. **Initialization Script:** The integration requires importing the SDK JavaScript file and initializing the SDK with the **crm context**:JavaScript


- Omni Toolbar is embedded into your application UI&#x20;
- It runs independently but communicates via defined events&#x20;
- Your application remains the **source of truth for navigation and data**&#x20;

:::BlockQuote
const sdkConfig = \{
&#x20; context: "crm",
&#x20; origin: "https\://\<your\_crm\_domain>",
&#x20; instanceId: "ameyoIframe" // The iframeId embedding the CRM&#x20;
};

// After loading SDK module...
sdk.initialize(sdkConfig);
:::

![](https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/iX5LKivTN3SR_rOGoAq_R_image.png)

### Event-Driven Interaction Model

Omni Toolbar communicates via **events**, not tight coupling.

Typical lifecycle:

1. Toolbar initializes&#x20;
2. Agent logs in&#x20;
3. Interaction arrives (call/chat/WhatsApp)&#x20;
4. Toolbar emits interaction event&#x20;
5. Host app reacts (screen pop, fetch data)&#x20;
6. Agent completes interaction&#x20;
7. Toolbar emits wrap-up event&#x20;

This model keeps integrations stable even as channels evolve.

### Screenshots of a sample integration and how events are passed



![](https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/fKxGMUZQJyPAK1NnScazb_image.png)



![](https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/8LKyGCltcNDjHtlaEBOXK_image.png)

![](https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/B2E_jj-JnDaUKntH9-7g8_image.png)



![](https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/n1Rv908jCgQj210fFntk2_image.png)

## Core Integration Usecases & SDK Mapping

The following table maps the actions required for standard Generic Toolbar Integration to the **Omni SDK APIs** and **Events**:

| **Generic Toolbar Action**            | **SDK Interaction Flow**                                                                                                            | **Omni SDK API / Event** | **Category**           |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ---------------------- |
| CRM to Ameyo (e.g., Single Sign-On)   | The CRM system initiates a request to authenticate and log in the agent into the Omni Toolbar.                                      | login / forceLogin       | Session Management     |
| CRM to Ameyo (e.g., Click-to-Dial)    | The CRM initiates an action (e.g., clicking a phone number) to start a new outbound interaction.                                    | initiateInteraction      | Interaction Management |
| Ameyo to CRM (e.g., Screen Pop)       | The Ameyo platform (on call arrival or connection) sends a real-time notification to the CRM to fetch and display customer details. | showCrm (Event)          | CRM & Record Handling  |
| CRM to Ameyo (e.g., Call Disposition) | The CRM collects wrap-up data and sends it back to the Omni Toolbar to officially end the interaction in the Ameyo system.          | disposeInteraction       | Interaction Management |

## Initialise SDK

| **API Name**  | **Params**                                                                                                            | **Description**                                     | **Sample Response** |
| ------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | ------------------- |
| initialize    | config = \{<br />context: string (“crm” )<br />origin: string<br />instanceId: string (default is ameyoIframe)<br />} | To initialise the SDK                               | --                  |
| setBaseUrl    | url: string                                                                                                           |                                                     | --                  |
| getBaseUrl    | no params required                                                                                                    |                                                     | --                  |
| onLoadHandler | isLoaded: boolean                                                                                                     | To inform the toolbar/UI that the App/CRM is loaded | --                  |

## Session and Authentication APIs

### Session

SSO in Ameyo requires the user ID to be the same in both Ameyo and the CRM. The CRM calls the login API.

| API Name             | Params                                                                    | Description                                                            | Sample response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| login                | username: string<br />password: string<br />authPolicy: string (optional) | Login a user                                                           | Result Successfully Logged In                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| forceLogin           | username: string<br />password: string<br />authPolicy: string (optional) | ForceLogin a user                                                      | Result Successfully Logged In                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| getSelectedExtension | no params required                                                        | Get extension data while extension selection or while change selection | \{  callContextId:  phone: "1234567890" }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| logout               | no params required                                                        | Logout user                                                            | Result Logout successful                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| getCurrentUser       | no params required                                                        | Get current logged in user data                                        | \{  "userId": "executive",  "userType": "Executive",  "userName": "executive" }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| getSelectedCampaigns | no params required                                                        | Get campaign data while campaign selection or while changing campaign  | \[  \{  "campaignId": 47,  "campaignName": "whatsapp\_chat",  "campaignType": "Omni Campaign",  "processId": 5  } ]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| getAgentSession      | no params required                                                        | Get all agent session data                                             | \{  "userId": "executive",  "userType": "Executive",  "terminalInfo": null,  "userName": "executive",  "breakStatuses": \[  "Coffee-break",  "Dinner-Break",  "Lunch-Break"  ],  "readStatuses": \[  "Available"  ],  "campaignInfos": \[  \{  "campaignName": "whatsapp\_chat",  "campaignId": 47,  "campaignType": "Omni Campaign",  "dialTimeOut": 30,  "blendGroupId": null,  "defaultWorking": false,  "primaryCampaign": false,  "processId": 5,  "wrapTimeout": 10,  "acwConnected": 30,  "acwNotConnected": 30,  "isAcwConnectedEnabled": false,  "localIVRInfos": \[],  "campaignTPVBean": \{  "campaignId": 47,  "tpvName": \[],  "tpvPhone": \[]  },  "acwConnectedEnabled": false  }  ],  "telephonyChannel": null,  "knowledgeBaseURL": "https\://www\.ameyo.com/",  "pingInterval": 20000,  "pingNotificationTimeout": 60000,  "sessoinTimeout": 180000,  "commandTimeout": 20000,  "maxPhoneLengthAllowed": 20,  "transferConfiguration": null,  "conferConfiguration": null,  "maxNumberOfCharactersToDisplayInCampaign": 999,  "preContextId": null,  "prePhone": null,  "maskedPrivileges": \[],  "defaultReady": false,  "addCustomerToDial": true,  "dialPhoneEnable": true,  "allowInternalChat": true,  "allowLocalIVR": true,  "allowSuccessiveCalls": true,  "overrideSelfCallBack": true,  "shouldHoldBeforeConfer": false,  "shouldUnholdBeforeTransfer": false,  "holdAllOnConferEnable": false,  "shouldAllowTransferToAssignedCampaignsOnly": false,  "shouldDisableOnVrDown": true,  "allowScreenRecord": false,  "autoSelectSingleAssignedCampaign": true,  "webUrl": "http\://www\.ameyosuite.com",  "campaignMaskedPrivilegeMap": \{  "campaignId\_127": \[],  "campaignId\_47": \[],  "campaignId\_172": \[]  },  "viewPrivileges": null,  "loginProperties": \{},  "preferences": \{},  "srsIp": "localhost",  "srsPort": "8889",  "agentBreakTimeThreshold": "", } |

### Session Events

| Event Name                    | Description                                                          | Sample Response                                                                                                                                                                                                                     |
| ----------------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| loginStatus                   | Gets the data for login status of the user                           | Login status event received Successfully logged in                                                                                                                                                                                  |
| userAvailabilityStatusChanged | Gets the data for change in user availability                        | User availability status changed: \{  "isAvailable": true,  "autoCallStatus": true,  "statusDescription": "Available",  "autoCallStateChangeCause": "agent\_set\_ready" }                                                           |
| campaignSelected              | Gets the selected campaign details, including campaign id and name   | Campaign selected: \[\{  "campaignId": 172,  "campaignName": "mohit\_omni\_camp",  "campaignType": "Omni Campaign",  "processId": 78  }]                                                                                            |
| extensionSelected             | Gets the selected extension details, including extension id and name | Extension selected: \{ "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-mGaqeOT4CAaxYr1nqW1FaKjcL0gztSuLcfl3ZcCBXM3O2ut6iumdbSoeke0EOosCaaRlWZHdbaGlflgOqKnznhg0RLVX86n0YdVM2mEotM7hp2M1hx7C-6-uce-16" } |



## Interaction and Call Management APIs

These APIs cover the telephony operations initiated from the CRM (e.g., Click-to-Dial) or the subsequent call management functions.

### Dialing and Interaction APIs&#xA;

| API Name                                                         | Params                                                                                                                                                                                                                                                                                                                                                                                                               | Description                                                                                                                                                                                                      | Sample response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| initiateInteraction                                              | channelType: string (“voice” \| “chat”)<br />channelDetails: \{<br />phone: string (optional)<br />name: string (optional)<br />appId: string (optional)<br />\[key: string]: any<br />}<br />campaignId: number<br />customerId: number (optional)<br />searchables: string\[] (optional)<br />interactionRelationId?: string (optional)<br />channelSubType: string (optional)<br />additionalInfo: any (optional) | Initiates an interaction                                                                                                                                                                                         | \{  "result": "success",  "reason": "success" }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| disposeInteraction                                               | channelType: string (“voice” \| “chat”)<br />interactionId: string<br />dispositionCodeId: number<br />notes: string (optional)<br />additionalParams: \{<br />callbackTime: string<br />phone: string<br />isSelfCallback: boolean<br />} (optional)<br />callback time example: "2025-07-06T09:56:40+0530"<br />(ISO 8601)                                                                                         | Disposes an interaction                                                                                                                                                                                          | Result ok                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| disposeAndInitiateNewInteraction<br />This API is for voice only | interactionId: string<br />dispositionCodeId: number<br />phone: string<br />notes: string (optional)                                                                                                                                                                                                                                                                                                                | Disposes and initiates a new interaction                                                                                                                                                                         | Result ok                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| getAllLiveInteractionsForAgent                                   | no params required                                                                                                                                                                                                                                                                                                                                                                                                   | Fetches the details of all live interactions of the agent                                                                                                                                                        | \[  \{  "data": \{  "id": "f57fe43b-bd7a-4c31-8498-5724ee2507",  "title": null,  "customer\_id": -1,  "last\_assigned\_user\_id": "anshika\_agent",  "last\_assigned\_user\_name": "anshika\_agent",  "contact\_center\_id": 5,  "process\_id": 78,  "last\_campaign\_id": 172,  "last\_campaign\_name": "mohit\_omni\_camp",  "last\_queue\_id": 134,  "last\_queue\_name": "dev\_queue",  "last\_disposition": null,  "interaction\_media\_id": "d764-6879fb2e-vchat-70",  "channel\_name": "CHAT",  "sub\_channel": "WebChat",  "direction": "INCOMING",  "date\_added": "2025-07-18T11:13:36.753+00:00",  "date\_modified": "2025-07-18T11:13:37.116+00:00",  "date\_disposed": null,  "interaction\_relation\_id": "f57fe43b-bd7a-4c31-8498-5724ee2507",  "status": "OPEN",  "reopen\_count": 0,  "last\_reopen\_time": null,  "first\_assigned\_date": "2025-07-18T11:13:37.085+00:00",  "last\_assigned\_date": "2025-07-18T11:13:37.085+00:00",  "linked\_objects": \[],  "channel\_data": null,  "related\_interactions": null,  "linked\_connector\_id": 23,  "last\_application\_instance\_id": "App-Server-fWG2MYiupg",  "additional\_info": \{  "XMPP\_METADATA": \{  "users": \[  \{  "id": "anshika\_agent",  "name": "anshika\_agent",  "xmppId": "xmpp\_user\_4qlt4tvgcb\@chat-service-7ccd544c55-h4nvc"  }  ],  "customer": \{  "name": "test",  "xmppId": "xmpp\_customer\_conference\_j6tncvidns"  },  "xmppChatRoomId": "xmpp\_chatroom\_conference\_jpmxwvgq34\@conference.chat-service-7ccd544c55-h4nvc"  },  "CHAT\_CUSTOMER\_CRT\_OBJECT\_ID": "d764-6879fb2e-dccf-37"  }  },  "http\_code": 200,  "error\_data": null  } ] |
| getCurrentInteraction                                            | no params requires                                                                                                                                                                                                                                                                                                                                                                                                   | Fetches the details of the interaction that the agent is currently on                                                                                                                                            | \{  "data": \{  "id": "87b41b89-8a79-44dd-a8d1-2ba7882507",  "title": null,  "customer\_id": 735076692678909,  "customer\_name": "anshika",  "last\_assigned\_user\_id": "anshika\_agent",  "last\_assigned\_user\_name": "anshika\_agent",  "contact\_center\_id": 5,  "process\_id": 78,  "last\_campaign\_id": 172,  "last\_campaign\_name": "mohit\_omni\_camp",  "last\_queue\_id": 0,  "last\_disposition": null,  "interaction\_media\_id": "d764-6879fb2e-vcall-105",  "channel\_name": "VOICE",  "sub\_channel": null,  "direction": "OUTGOING",  "date\_added": "2025-07-18T11:12:34.898+00:00",  "date\_modified": "2025-07-18T11:13:04.457+00:00",  "date\_disposed": null,  "interaction\_relation\_id": "87b41b89-8a79-44dd-a8d1-2ba7882507",  "status": "OPEN",  "reopen\_count": 0,  "last\_reopen\_time": null,  "first\_assigned\_date": "2025-07-18T11:12:34.898+00:00",  "last\_assigned\_date": "2025-07-18T11:13:04.457+00:00",  "linked\_objects": \[],  "channel\_data": null,  "related\_interactions": null,  "linked\_connector\_id": 23,  "last\_application\_instance\_id": "App-Server-fWG2MYiupg",  "additional\_info": \{  "VOICE\_CUSTOMER\_CRT\_OBJECT\_ID": "d764-6879fb2e-vce-91"  }  },  "http\_code": 200,  "error\_data": null  }                                                                                                                                                                                                                                                                                                                                                                             |
| getIsInteractionOwnedByUser                                      | no params required                                                                                                                                                                                                                                                                                                                                                                                                   | Will get the ownership status of the interaction, for example, in case of confer, the call lands on agent A and then agent B is added in conference, if we check ownership status at agent B it will show false. | TRUE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

### Interaction Lifecycle Events

These events are crucial for synchronizing the state of a call between the Ameyo toolbar and the external CRM:

| interactionInitiated          | Gets the data for the interaction, the channel, the user and the customer for which the interaction has been initiated                                                 | Integration interactionInitiated event received \{ "interactionId": "cd787e9a-fac0-4f1e-b823-a998532507", "campaignId": 172, "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5", "channelDetails": \{ "channelType": "voice", "associationType": "manualdial.association", "callId": "d279-6874b064-vcall-20" }, "customerCrtObjectId": "d279-6874b064-vce-6", "customerDetails": \{ "customerId": 735076692678909, "name": "anshika", "phone": "1234567890" } }                                                                             |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| callRinging                   | Fetches information about the call, the user and the customer to whom it was made while the call is in ringing state                                                   | callRinging event received \{ "interactionId": "7ea1bd1b-5983-4f23-970a-0d99642507", "campaignId": 172, "queueId": null, "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-rrtuxJxpN7ecoIjPtfSj2ubCbmGbWT4PfcAuG03kNDQFXKjfbL7GX0DHRQduSlvEYA7vA4AzPQhlTSSmX8Z6fNw44P8Iwuk5bdjknZL4WXi0cLjIyj8J-78-uce-1234567890\@5", "channelDetails": \{ "channelType": "voice", "associationType": "manualdial.association", "callId": "d279-6874b064-vcall-35" }, "customerCrtObjectId": "d279-6874b064-vce-19", "customerDetails": \{ "customerId": 735076692678909, "name": "anshika", "phone": "1234567890" } }                                                                                |
| interactionConnected          | Gets the data for the interaction, the channel, the user, and the customer to which the interaction is connected to                                                    | interactionConnected event received \{ "interactionId": "c15a278d-66ff-47ed-a0c0-cba5492507", "campaignId": 172, "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5", "channelDetails": \{ "channelType": "voice", "associationType": "manualdial.association", "callId": "d279-6874b064-vcall-21" }, "customerCrtObjectId": "d279-6874b064-vce-7", "customerDetails": \{ "customerId": 735076692678909, "name": "anshika", "phone": "1234567890" } }                                                                                         |
| interactionDisconnected       | Gets the data for the interaction, the channel, the user, and the customer from which the interaction is disconnected                                                  | interactionDisconnected event received \{ "interactionId": "cd787e9a-fac0-4f1e-b823-a998532507", "campaignId": 172, "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5", "channelDetails": \{ "channelType": "voice", "associationType": "manualdial.association", "callId": "d279-6874b064-vcall-20" }, "customerCrtObjectId": "d279-6874b064-vce-6", "customerDetails": \{ "customerId": 735076692678909, "name": "anshika", "phone": "1234567890" } }                                                                                      |
| interactionDisposed           | Gets the data for the interaction, the channel, the user, and the customer for which the interaction is disposed along with the disposition details of the interaction | interactionDisposed event received \{ "interactionId": "c15a278d-66ff-47ed-a0c0-cba5492507", "campaignId": 172, "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5", "channelDetails": \{ "channelType": "VOICE", "associationType": "manualdial.association", "callId": "d279-6874b064-vcall-21" }, "dispositionDetails": \{ "dispositionClass": "Closed", "dispositionCode": 588, "callNotes": "" } }                                                                                                                                       |
| interactionEnded              | Gets the data for the interaction, the channel, the user, and the customer for which the interaction is ended                                                          | interactionEnded event received \{ "campaignId": 172, "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5", "channelDetails": \{ "channelType": "voice" }, "customerCrtObjectId": "d279-6874b064-vce-6", "customerDetails": \{} }                                                                                                                                                                                                                                                                                                              |
| customerLinkedToInteraction   | Gets the data for the interaction and the channel to which the customer is linked to along with the linked customer details                                            | interactionLinked event received \{ "interactionId": "cd787e9a-fac0-4f1e-b823-a998532507", "campaignId": 172, "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5", "channelDetails": \{ "channelType": "voice", "associationType": "manualdial.association", "callId": "d279-6874b064-vcall-20" }, "customerCrtObjectId": "d279-6874b064-vce-6", "customerDetails": \{ "customerId": 735076692678909, "name": "anshika", "phone": "1234567890" } }                                                                                            |
| customerUnlinkedToInteraction | Gets the data for the interaction and the channel from which the customer is unlinked from along with the unlinked customer details                                    | \{ "interactionId": "83937022-6ddd-4194-9395-4bc7c72507", "campaignId": 172, "queueId": null, "userCrtObjectId": "d279-68786f8d-ses-executive-appId-App-Server-pHnEm4nGW4-IpuUJTau5NwCQc4keOWJiogD6JtHDZlfvqD2gi4lwtBk5ApW5T8ULxL8dVwFUi6AZVOB5hxY4ITuO1VT80k9aYcExjpcgpVwOY8w6qpq5VGullWInaS7-940-uce-1234567890\@5", "channelDetails": \{ "channelType": "VOICE", "associationType": "manualdial.association", "callId": "d279-68786f8d-vcall-362" }, "customerCrtObjectId": "d279-68786f8d-vce-329", "customerDetails": \{ "customerId": null, "name": null, "phone": "1234567890" } }                                                                                                                        |
| interactionTransferred        | Gets the data for the interaction, the user and the channel for which the interaction has been transferred along with the transfer details                             | interactionTransferred event received \{ "interactionId": "c15a278d-66ff-47ed-a0c0-cba5492507", "transferType": "transferToUser", "transferContextId": "moh5", "channelType": "VOICE", "channelDetails": \{ "callId": "d279-6874b064-vcall-21", "crtObjectId": "d279-6874b064-ses-moh5-appId-App-Server-WBOSWo8hqn-mbns0GzYPxAjBULswJQoTSNn7likTcaj8qmjqxrzBvwaL2lisgAw70A48bvDjlbDsj4PZNpo40HUAKxF5Zd4wa7keO8V0dcN2STUW1vqMt6wHA5DuXd0-22-uce-moh5cRJkUZ5Z\@6", "memberCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5" }, "campaignId": 172 } |
| interactionConferred          | Gets the data for the interaction, the user and the channel for which the interaction has been conferred along with the confer details                                 | Interaction conferred \{ "interactionId": "0c431e04-e78d-454b-a0ec-bc2aa72507", "conferedType": "conferToPhone", "status": "initialized", "conferedContextId": "8368941654", "channelType": "VOICE", "channelDetails": \{ "callId": "d279-6874b064-vcall-23", "crtObjectId": "d279-6874b064-vce-11", "memberCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5" }, "campaignId": 172 }                                                                                                                                                             |
| getIsInteractionOwnedByUser   | Automatically checks ownership status for current interaction, ie, interaction on which agent’s screen is                                                              | FALSE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## CRM & Record Handling

### Screen Pop and Customer Information

The **Screen Pop** functionality is a core use case, where the CRM displays customer information upon a call's arrival or initiation.


| API Name                          | Params                                                                                                                                                                                                                    | Description                                                                                                           | Sample response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| setRecordInfoForInteraction       | interactionId: string<br />recordId: string<br />recordType: string<br />recordName: string<br />additionalInfo: any (optional)                                                                                           | Stores the resolved customer details for the current interaction                                                      | \{  "data": "\{\\"crtObjectId\\":\\"d279-68786f8d-vce-49\\",\\"info\\":\{\\"recordId\\":\\"1\\",\\"recordName\\":\\"recordName\\",\\"recordType\\":\\"contact\\"},\\"campaignContextId\\":172,\\"actionType\\":\\"Add or Update\\"}" }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| showMultipleRecordsForInteraction | interactionId: string,<br />recordsInfo: CRMRecordInfo\[]<br /><br /><br /><br /><br /><br /><br /><br />CRMRecordInfo = \{  recordId: string,  recordType: string,  recordName: string,  additionalInfo: any(optional) } | Displays all identified customers and their associated information on the user interface during a live interaction.   | //customer info will be displayed on UI                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| showMultipleRecordsForPreview     | phone: string,<br />recordsInfo: CRMRecordInfo\[]<br /><br /><br /><br /><br /><br /><br /><br />CRMRecordInfo = \{  recordId: string,  recordType: string,  recordName: string,  additionalInfo: any(optional) }         | Displays all customers and their associated information when customer details are previewed for a given phone number. | //customer info will be displayed on UI                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| sendCurrentCRMRecordOpened        | CRMRecordInfo = \{<br />recordId: string,<br />recordType: string,<br />recordName: string,<br />additionalInfo: any(optional)<br />}                                                                                     | sends currently opened object information to UI                                                                       | //displays currently opened object's info on UI                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| getAllContacts                    | connectorId: string,<br />objectId: string                                                                                                                                                                                | Fetches all contacts for a connector Id and object Id                                                                 | \[  \[  \{  "field": "Id",  "value": "003dL000000Pun1QAC",  "type": "id"  },  \{  "field": "FirstName",  "value": "Jack",  "type": "string"  },  \{  "field": "LastName",  "value": "Rogers",  "type": "string"  },  \{  "field": "Phone",  "value": "(336) 222-7000",  "type": "phone"  },  \{  "field": "OtherPhone",  "value": null,  "type": "phone"  }  ],  \[  \{  "field": "Id",  "value": "003dL000000Pun3QAC",  "type": "id"  },  \{  "field": "FirstName",  "value": "Andy",  "type": "string"  },  \{  "field": "LastName",  "value": "Young",  "type": "string"  },  \{  "field": "Phone",  "value": "(785) 241-6200",  "type": "phone"  },  \{  "field": "OtherPhone",  "value": null,  "type": "phone"  }  ] ] |
| getAllCases                       | connectorId: string,<br />objectId: string                                                                                                                                                                                | Fetches all cases for a connector Id and object Id                                                                    | \[  \[  \{  "field": "Id",  "value": "500dL000001oNEhQAM",  "type": "id"  },  \{  "field": "Subject",  "value": "Performance inadequate for second consecutive week",  "type": "string"  },  \{  "field": "Description",  "value": null,  "type": "textarea"  }  ],  \[  \{  "field": "Id",  "value": "500dL000001oNEiQAM",  "type": "id"  },  \{  "field": "Subject",  "value": "Starting generator after electrical failure",  "type": "string"  },  \{  "field": "Description",  "value": null,  "type": "textarea"  }  ] ]                                                                                                                                                                                               |
| createCase                        | objectType: string,<br />data: any,<br />connectorId: string                                                                                                                                                              | Creates a new case                                                                                                    | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| updateObject                      | objectType: string,<br />data: any,<br />connectorId: string,<br />objectId: string                                                                                                                                       | Updates the attached object                                                                                           | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| searchCase                        | connectorId: string,<br />objectType: string,<br />search: string,<br />searchField: string,<br />limit: number,<br />offset: number                                                                                      | Searches the case based on fields                                                                                     | \[  \[  \{  "field": "Id",  "value": "500dL000001oNEhQAM",  "type": "id"  },  \{  "field": "Subject",  "value": "Performance inadequate for second consecutive week",  "type": "string"  },  \{  "field": "Description",  "value": null,  "type": "textarea"  }  ] ]                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| sendDataToCRM                     | contextData: any                                                                                                                                                                                                          | Sends data from the app to CRM                                                                                        | //shows whatever data is sent in the API                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| sendDataToApp                     | contextData: any                                                                                                                                                                                                          | Sends data from CRM to app                                                                                            | //shows whatever data is sent in the API                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

### CRM events

| Event Name                | Description                                                                        | Sample Response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| showCrm                   | Gets the configured CRM data along with the interaction, user and customer details | showCrm event received \{  "interactionId": "cd787e9a-fac0-4f1e-b823-a998532507",  "userId": "executive",  "campaignId": 172,  "queueId": null,  "userCrtObjectId": "d279-6874b064-ses-executive-appId-App-Server-WBOSWo8hqn-s0qX4novCTO6XZ1JkT54lF7ZKZsX8YysJYDp3iQlNfZLUXCG22OIMkuD4l7coVcm70oA5lKbvMNuAm2tWloo0cVUU79WCCCIhDGFsSKQmgc1M2RkHa5y-53-uce-1234567890\@5",  "channelDetails": \{  "channelType": "VOICE",  "associationType": "manualdial.association",  "callId": "d279-6874b064-vcall-20"  },  "customerCrtObjectId": "d279-6874b064-vce-6",  "customerDetails": \{  "customerId": 735076692678909,  "name": "anshika",  "phone": "1234567890"  } } |
| openRecord                | Opens the record on the CRM                                                        | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| onAttachButtonClick       | Links current interaction with CRM customer                                        | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| onUnAttachButtonClick     | Unlinks current interaction with CRM customer                                      | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| onCreateButtonClick       | To create object on CRM                                                            | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| getCurrentCRMRecordOpened | Fetches current CRM record                                                         | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| handlePreview             | Searches customer on CRM on preview click                                          | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| handleInteractionDisposed | Sends interaction disposition related information to CRM for activity dumping      | --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| receiveDataFromApp        | CRM receives data from app                                                         | //data sent from app is seen in CRM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| receiveDataFromCRM        | App receives data from CRM                                                         | //data sent from CRM is shown in App                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

### Disposition Code Retrieval

The CRM can retrieve the two-level disposition codes (Disposition Class and Disposition Code) from Ameyo to display a custom disposition screen.

| **API Name**                            | **Params**          | **Description**                                                           | **Sample response**                                                                                                                                                                                                                                                      |
| --------------------------------------- | ------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| getDispositionCodesWithDispositionClass | campaignId : number | Gets the disposition class and corresponding codes for a given campaignId | \[ \{ "classId": 588, "className": "Status", "dispositionCodeBean": \[ \{ "dispositionCodeId": 1344, "dispositionCodeName": "Open" }, \{ "dispositionCodeId": 1345, "dispositionCodeName": "Closed" }, \{ "dispositionCodeId": 820, "dispositionCodeName": "New" } ] } ] |

### Get Configurations

| **API Name**                  | **Params**         | **Description**                                                          | **Sample response**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------- | ------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| getOmniCrmObjectConfiguration | no params required | Gets the details of all the objects for the crm                          | \[ \{ "id": 33, "crm\_connector\_id": 23, "object\_type": "Case", "objects\_metadata": \{ "Case": \{ "is\_visible": true, "field\_metadata": \[ \{ "field\_name": "Id", "label": "Case ID", "crm\_field\_type": "String", "field\_type": "id", "should\_show\_on\_preview": true, "is\_required\_in\_object\_creation": false, "is\_searchable": true, "standard\_field\_name": "", "priority": 1, "should\_hide\_on\_object\_creation": true, "complex\_fields": null, "required\_in\_object\_creation": false, "searchable": true }, \{ "field\_name": "Subject", "label": "Subject", "crm\_field\_type": "String", "field\_type": "string", "should\_show\_on\_preview": true, "is\_required\_in\_object\_creation": true, "is\_searchable": true, "standard\_field\_name": "", "priority": 2, "should\_hide\_on\_object\_creation": false, "complex\_fields": null, "required\_in\_object\_creation": true, "searchable": true }, \{ "field\_name": "Description", "label": "Description", "crm\_field\_type": "String", "field\_type": "textarea", "should\_show\_on\_preview": true, "is\_required\_in\_object\_creation": false, "is\_searchable": false, "standard\_field\_name": "", "priority": 3, "should\_hide\_on\_object\_creation": false, "complex\_fields": null, "required\_in\_object\_creation": false, "searchable": false } ], "visible": true } }, "date\_added": "2024-08-13T10:48:33.862+00:00", "date\_modified": "2024-08-13T10:48:33.862+00:00", "ref": 1, "version": 1 } ] |
| getOmniCrmConfiguration       | no params required | Fetches the details of the crm configuration                             | \{ "crm\_connector\_id": 23, "process\_id": 78, "crm\_type": "salesforce", "crm\_domain": "https\://exotel88-dev-ed.develop.my.salesforce.com", "crm\_version": "", "syncing\_enabled": false, "syncing\_mode": "PERIODIC", "record\_syncing\_interval": 3600000, "record\_syncing\_complete": true, "batch\_size": 1000, "max\_number\_of\_distinct\_recordings": 3, "date\_added": "2024-08-13T10:46:39.613+00:00", "date\_modified": "2025-01-15T10:30:53.334+00:00", "ref": 1, "version": 5 }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| getPhoneNumberForSearch       | no params required | Fetches the customer phone that is added on the start interaction screen | //will get the phone number entered                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| getPrimaryColumnName          | no params required | Fetches the primary column name                                          | "id"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

### &#xA;HTTP Communication

| **API Name**        | **Params**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | **Description**                                                                                                                                | **Sample Response**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| invokeECCApi        | microservice: Microservices url: string method: string (“get” \| “post” \| “put” \| “delete”) queryParams: Record\<string, any> (optional) data: Record\<string, any> \| FormData (optional) isMultipart: boolean (optional) url is api path here Microservices\{ APPSERVER = 'appserver', CMS = 'cms', CFS = 'cfs', DATA\_ENGINE = 'data-engine', CALLBACK\_SERVER = 'callback-server', CUSTOMER\_MANAGER = 'customer-manager', CHAT\_SERVICE = 'chat-service', INTERACTION\_SERVICE = 'interaction-service', CHAT\_BOSCH\_SERVICE = 'chat-bosch-service' } | This API is used to invoke appserver/cms/cfs/data-engine/callback-server/customer-manager/ chat-service/interaction-service/chat-bosch-service | \{"searchables": \["id","first\_name","phone1"] } //this is a sample response from one Appserver API                                                                                                                                                                                                                                                                                                                                                                                                  |
| invokeThirdPartyApi | url: string method: string (“get” \| “post” \| “put” \| “delete” \| “patch”) headers: Record\<string, string> (optional) queryParams: Record\<string, any> (optional) data: Record\<string, any> \| FormData (optional) isMultipart: boolean (optional)                                                                                                                                                                                                                                                                                                      | This API is used to invoke any third party API                                                                                                 | \{ "status": 200, "data": \{ "page": 2, "per\_page": 6, "total": 12, "total\_pages": 2, "data": \[ \{ "id": 7, "email": "michael.lawson\@reqres.in", "first\_name": "Michael", "last\_name": "Lawson", "avatar": "https\://reqres.in/img/faces/7-image.jpg" } ], "support": \{ "url": "https\://contentcaddy.io?utm\_source=reqres\&utm\_medium=json\&utm\_campaign=referral", "text": "Tired of writing endless social media content? Let Content Caddy generate it for you." } }, "statusText": ""  |

### UI Methods

| **API Name**                            | **Params**                                                                                                                                                       | **Description**                                                                      | **Sample Response**                                                |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
| setLoginInfo                            | username: string<br />token: string                                                                                                                              | Populates login info on UI                                                           | //data will be visible on login screen UI                          |
| populateChannelDetailsForNewInteraction | channelType: string<br />channelSubType: string<br />channelDetails: \{<br />campaignId: string<br />appName: string<br />phone: string<br />name: string<br />} | Populates the details to set details to start an interaction                         | //data will be visible on the start interaction screen on UI       |
| setExtensionInfo                        | callcontextId: number<br />phone: string                                                                                                                         | Populates the extension info on the select extension and the change extension screen | //data will be visible on the select/change extension screen on UI |
| triggerToastNotification                | message: string<br />variant: string ('success' \| 'error' \| 'warning' \| 'info')                                                                               | Triggers a toast notification for the user                                           | //A toast notification will be visible on user screen              |
| triggerDesktopNotification              | notificationType: string<br />notificationSubtype: string<br />subject: string<br />message: string                                                              | Triggers a desktop notification for the user                                         | //A desktop notification will be visible on user screen            |

**UI Events**

| **Event Name**          | **Description**                                                               | **Sample Response**                           |
| ----------------------- | ----------------------------------------------------------------------------- | --------------------------------------------- |
| windowVisibilityChanged | Checks if the current window is visible or not                                | \{ isWindowVisible: true }                    |
| sendLifecycleEvent      | Gets details like app is focused or not, loaded or not, when it is registered | "focused"                                     |
| receiveData             | Receives data from other apps                                                 | //Can see whatever is sent from the other app |

**Notification Events**

| **Event Name** | **Description**                                                                                          | **Sample Response**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| notification   | Triggers all the details regarding a bell notification including notification severity, type and message | Notification \{  "notificationId": "d279-6874b064-notify-2441",  "displayMessage": "Call missed!! Customer Name: anshika Contact Number: 01234567890 Missed Call Time: Mon Jul 14 14:01:45 IST 2025",  "severity": 2,  "type": "application.notification.type",  "subType": "notification.missed.call.type",  "specificInfo": \{  "contextId": 52,  "context": "MISSED\_CALL",  "campaignId": 172,  "customerId": 735076692678909,  "name": "anshika",  "contact": "01234567890",  "dateAdded": "2025-07-14 14:01:45.899",  "phoneInfo": \{  "phone": "01234567890",  "displayPhone": "01234567890"  },  "additionalParams": \{  "notificationId": "d279-6874b064-notify-2441",  "context": "MISSED\_CALL"  }  },  "consolidationCount": 0,  "dateAdded": "2025-07-14T08:31:48.925Z" } |

# Internal Communication

For custom logic and data synchronization between the embedded toolbar app and the main CRM page:

### Srore Apps Data

| **API Name** | **Params**                     | **Description**                                                | **Sample Response**                                                                         |
| ------------ | ------------------------------ | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| get          | key: string                    | Gets the value of a key from the local storage                 | Result "qwerty"                                                                             |
| set          | key: string<br />value: string | Sets the key and it’s corresponding value in the local storage | Result successfully set store item //the key can be checked in local storage                |
| delete       | key: string                    | Deletes a key from the local storage                           | Result successfully deleted store item //the key will now be removed from the local storage |

### AppInstance

| **API Name**  | **Params**                                | **Description**                                              | **Sample Response**              |
| ------------- | ----------------------------------------- | ------------------------------------------------------------ | -------------------------------- |
| getAllInfo    | appId: string                             | Fetches information for all loaded apps                      |                                  |
| getInfo       | instanceId: string                        | Fetches information for app based on instanceId              |                                  |
| sendDataToApp | instanceId: string,<br />contextData: any | Sends data from one app to the other app based on instanceId | //shows data sent in contextData |

### Events

| **Event Name** | **Description**               | **Sample Response**                           |
| -------------- | ----------------------------- | --------------------------------------------- |
| receiveData    | Receives data from other apps | //Can see whatever is sent from the other app |



### Error Handling

The SDK provides explicit error codes to aid in debugging integration issues.

| Error Type <br />            | Error Code | Description <br />                                                       |
| ---------------------------- | ---------- | ------------------------------------------------------------------------ |
| **TIMEOUT**                  | 1000       | Request took too long and timed out.                                     |
| **REQUIRED\_FIELD\_MISSING** | 2001       | A mandatory field (e.g., phone in initiateInteraction) was not provided. |
| **HTTP\_ERROR**              | 3000       | An HTTP-related issue occurred (e.g., 404, 500).                         |
| **DATA\_NOT\_FOUND**         | 4000       | Requested data could not be located or does not exist.                   |
| **INVALID\_ORIGIN**          | 1003       | Request came from an unauthorized or untrusted source.                   |

