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

    Contract implemented by Customer that describes the API surface for the customer involved in an interaction. Consume this interface when you need to reference the Customer API shape without coupling to the concrete class (e.g. in test doubles).

    interface CustomerTrait {
        name: string;
        phone: string;
        email: string;
        languageCode?: string;
        canEdit(): boolean;
        setName(name: string): Promise<void>;
        setPhone(phone: string): Promise<void>;
        setEmail(email: string): Promise<void>;
        setLanguageCode(code: string): Promise<void>;
    }

    Implemented by

    Index

    Properties

    name: string

    The customer's display name.

    phone: string

    The customer's phone number.

    email: string

    The customer's email address.

    languageCode?: string

    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.

    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