Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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

evenId

string

Name of event being handled.

A few example values (including but not limited to):

  • call-incoming

  • call-ended

  • onclicktoact

callStarted

boolean

true if the call has engaged (call was answered)

callInProgress

boolean

true if a call is about to start:

  • Inbound call is ringing

  • User is dialing an outbound call

Is changed to false when call ends, regardless of call result (answered or unanswered)

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:

  • logicalName: entity name (account or contact)

  • id: primary key

  • name: display name

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

  • 0: inbound

  • 1: outbound

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:

  • logicalName: entity name (account or contact)

  • id: primary key of entity

  • name: display name

  • fieldName: the field where the user clicked the phone icon

  • format: data format

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.

  • No labels