@avaya/infinity-agent-sdk - v1.0.0
    Preparing search index...

    Represents the customer involved in an interaction. Returned by InteractionTrait.customer.

    if (interaction.customer.canEdit()) {
    await interaction.customer.setName("Jane Doe");
    }

    Implements

    Index

    Accessors

    • get name(): string

      The customer's display name.

      Returns string

    • get phone(): string

      The customer's phone number.

      Returns string

    • get email(): string

      The customer's email address.

      Returns string

    • get languageCode(): string | undefined

      The customer's preferred language code (e.g. "en-US", "fr-CA").

      Sourced from the top-level customerLanguageCode field on the interaction. The SDK does not validate the value — the server is the authority for accepted formats (typically BCP-47). undefined when the server has no language code stored.

      Returns string | undefined

    Methods

    • Updates the customer's display name. Fires INTERACTION_CUSTOMER_INFO_UPDATED on success. Check canEdit before calling.

      Parameters

      • name: string

        The display name to associate with the customer

      Returns Promise<void>

      Promise that resolves when the server confirms the update.

    • Updates the customer's phone number. Fires INTERACTION_CUSTOMER_INFO_UPDATED on success. Check canEdit before calling.

      Parameters

      • phone: string

        The phone number to associate with the customer

      Returns Promise<void>

      Promise that resolves when the server confirms the update.

    • Updates the customer's email address. Fires INTERACTION_CUSTOMER_INFO_UPDATED on success. Check canEdit before calling.

      Parameters

      • email: string

        The email address to associate with the customer

      Returns Promise<void>

      Promise that resolves when the server confirms the update.

    • Updates the customer's preferred language code. Fires INTERACTION_CUSTOMER_INFO_UPDATED on success. Check canEdit before calling.

      Parameters

      • code: string

        The language code to associate with the customer (e.g. "en-US", "fr-CA")

      Returns Promise<void>

      Promise that resolves when the server confirms the update.

    Capability Guards

    • Whether the agent can update this customer's information right now.

      Returns boolean