...
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. |
eventData object
The value of context.eventData
object depends on the use case. For call-related cases, the object sent by WebRTC is passed here, containing all kind of call information.
Exceptions:
beforeCreateInboundCallSession event: besides call information, two additional piece of data is stored here:
context.eventData.sessionParameters
: Session parameters of the CIF2 session which is being opened. By hooking up a plugin and amending this parameter, any custom session template can be used.context.eventData.sessionTemplateId
: By default it contains the id of the configured session template to be used. A custom plugin can update it before opening the session, so default session template can be overridden on the fly.