Represents the traits of the AXP Core Conversation.

interface AxpConversationCoreTrait {
    participants: readonly Participant[];
    addParticipantAddedListener(handler: EventHandler<ParticipantAdded>): string;
    addParticipantDisconnectedListener(handler: EventHandler<ParticipantDisconnected>): string;
    removeParticipantAddedListener(eventHandlerId: string): void;
    removeParticipantDisconnectedListener(eventHandlerId: string): void;
    setContextParameters(parameters: Record<string, string>): void;
}

Implemented by

Properties

participants: readonly Participant[]

Gets the list of participants in the conversation.

Methods

  • Attach event handler callback that needs to be invoked when a participant is added to the conversation.

    Parameters

    Returns string

    A unique identifier for the event handler.

  • Attach event handler callback that needs to be invoked when a participant is disconnected from the conversation.

    Parameters

    Returns string

    A unique identifier for the event handler.

  • Removes a event handler attached to the "participantAdded" event.

    Parameters

    • eventHandlerId: string

      The unique identifier of the event handler to be removed.

    Returns void

  • Removes a event handler attached to the "participantDisconnected" event.

    Parameters

    • eventHandlerId: string

      The unique identifier of the event handler to be removed.

    Returns void

  • The key value pairs that are passed as context parameters for the conversation to AXP. AXP uses this information to make business decisions on how the engagement is treated. For example, the client application might want to send hints about customer's interest based on the customer's searches or FAQ browsing.

    Parameters

    • parameters: Record<string, string>

      The context parameters to set.

    Returns void

    conversation.setContextParameters({"availableBalance": "1000"});