Chat engagement.

Accessors

  • get createdAt(): Date
  • Date-time when the engagement was created.

    Returns Date

    Date when the engagement was created

  • get dialogId(): String
  • The unique 36 character internal id that represents the chat dialog in the engagement.

    Returns String

    Id of the dialog

  • get engagementId(): String
  • The unique 36 character internal id that represents the engagement.

    Returns String

    Id of engagement

  • get lastUpdatedAt(): Date
  • Date-time when the engagement was last updated.

    Returns Date

    Date when the engagement was last updated.

Methods

  • Leave the engagement. This not only removes the subscription to events for this engagement but also remove the user from the engagement

    Parameters

    Returns Promise<void>

    Promise which when resolved indicates the engagement was left successfully.

  • Get older chat messages exchanged in the engagement.

    Parameters

    • pageSize: number

      Size of the page in the PageIterator. Default page size is 10 with a maximum size of 50.

    Returns Promise<PageIterator<Message>>

    Promise which resolves to a PageIterator object.

  • Get the details of a specific participant joined to this engagement.

    Parameters

    • participantId: string

      Id of the requested participant.

    Returns Participant

    Details of participant.

  • Join the engagement and subscribe to its events.

    Returns Promise<Engagement>

    Promise which when resolved indicates the engagement was joined successfully.

  • Send message to contact center (agent/bot/supervisor).

    Parameters

    • message: string

      Message to send. Max length is 4096. Min length should be 1.

    • Optional parentMessageId: string

      ID of the message’s parent message. Should be an UUID.

    Returns Promise<Message>

    Receipt of the sent message.