Interface: ISDEUtil

Table of contents

Methods

Methods

addSDEs

Please be aware that the underlying Messaging Interactions API is not meant for real-time decisions, as the API has a delay of up to 1 minute.

addSDEs(sdes, visitorId, sessionId): Promise<void>

Will set or update SDEs to/of an Engagement via the Engagement Attributes API.

Parameters

Name Type Description
sdes ISDE[] Array with the SDEs that should be set/ updated. See Engagement Attributes API-Documentation for more Information on how to structure it.
visitorId string The ID of the visitor.
sessionId string The ID of the session.

Returns

Promise<void>


getSDEsFromConv

getSDEsFromConv(conversation): Object

Will extract all SDEs (authenticated and unauthenticated if existing) from a provided conversation and order its events by the server-timestamp. The last event is the most recent one.

Parameters

Name Type Description
conversation IConversation the conversation of which the SDEs should be extracted.

Returns

Object

Name Type
sdes ISDEsResponse
unAuthSdes ISDEsResponse

Interface: ISDEsResponse

  • events: any[]

Interface: ISDE

  • type: string
  • [key: string]: any