The entry function of the plugin always receives a context object which contains essential information like phone number, user id, etc.
The context object always (in case of every event) contains the following properties:
Name | Type | Notes |
---|---|---|
eventId | string | Name of event being handled. A few example values (including but not limited to):
|
callStarted | boolean |
|
callInProgress | boolean |
Is changed to |
customer | object | If a customer was picked by phone number (either automatically or manually by the agent) then it contains the details of that. The object has the following properties:
The property can also be set by a plugin. As a result, the value set to the property will be used as the context of the current call. |
direction | int |
|
userId | string | Enreach Cloud user id of agent |
crmUserId | string | CRM user id of agent |
phoneNumber | string | Phone number the call is engaged to |
isDirty | boolean | True if the currently displayed form is dirty |
callInitiatedFrom | object | Object reference of entity where the call was initiated from, in case of Click-to-dial event. The object has the following properties:
|
customerSearchResults | object | An object storing account and contact search results by phone number. Can be used to customize multiple matches grid. For additional information, see the relevant page. |