Represents the core functionality of an Axp Conversation.

Implements

Properties

conversationId: string

The unique identifier of the conversation.

Accessors

Methods

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

    Parameters

    Returns string

    string Unique event handler id that was generated by SDK when the event handler was attached.

    const participantAddedHandlerId = conversation.addParticipantAddedListener((eventPayload) => {
    console.log("Participant added: ", eventPayload);
    });
  • Attach event handler callback that needs to be invoked when a participant is disconnected from the conversation.

    Returns string

    string Unique EventHandlerId that was generated by SDK when the event handler was attached.

    const participantDisconnectedHandlerId = conversation.addParticipantDisconnectedListener((eventPayload) => {
    console.log("Participant disconnected: ", eventPayload);
    });
  • 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"});