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

    Wrap-up and closure

    This guide covers the post-conversation phase - reacting to the wrap-up event, extending wrap-up time when needed, closing the interaction with a resolution status, and finalizing it to remove it from the agent's active list.

    Personas: Agent - dispositions and closes the interaction after the conversation ends.

    After the customer-facing part of an interaction ends (call disconnected), the interaction enters wrap-up automatically. The SDK signals this via InteractionEventType.INTERACTION_WRAP_UP. During wrap-up the agent completes disposition tasks - classification codes, notes, and customer details (see Interaction Metadata) - before closing and finalising.

    If wrap-up timer is configured, the platform auto wrap-up after the configured timeout. If the agent needs more time, Interaction.extendWrapUp requests an extension. When done, Interaction.close sets the outcome, and Interaction.complete removes the interaction from the active list.

    • An active Interaction in, or transitioning to, wrap-up state.

    Subscribe to InteractionEventType.INTERACTION_WRAP_UP to drive the wrap-up UI:

    interaction.subscribe(InteractionEventType.INTERACTION_WRAP_UP, () => {
    showWrapUpPanel();
    });

    If the auto-complete timer is running and the agent needs more time, check Interaction.canExtendWrapUp and call Interaction.extendWrapUp. The InteractionEventType.INTERACTION_WRAP_UP_EXTENDED event confirms the extension:

    if (interaction.canExtendWrapUp()) {
    await interaction.extendWrapUp();
    }

    interaction.subscribe(InteractionEventType.INTERACTION_WRAP_UP_EXTENDED, () => {
    resetWrapUpTimer();
    });

    Close the interaction with ResolutionStatus.RESOLVED (issue handled) or ResolutionStatus.UNRESOLVED (needs follow-up), then call Interaction.complete to finalise. Gate each action on its capability check:

    // Close as resolved
    if (interaction.canClose()) {
    await interaction.close(ResolutionStatus.RESOLVED);
    }

    // Or close as unresolved if follow-up is needed
    if (interaction.canClose()) {
    await interaction.close(ResolutionStatus.UNRESOLVED);
    }

    // Finalize - removes the interaction from the active list
    if (interaction.canComplete()) {
    await interaction.complete();
    }

    interaction.subscribe(InteractionEventType.INTERACTION_COMPLETED, () => {
    removeFromInteractionList();
    });

    Gate close() on canClose(). Use canResolve() and canUnresolve() independently to decide which resolution options to surface in the UI.

    Failures surface as typed AvayaInfinityAgentSdkErrors with stable codes from AvayaInfinityAgentSdkErrorCodes. Errors that occur on the wrap-up path belong to the ASE_4xxx family - match error.code against AvayaInfinityAgentSdkErrorCodes to identify the specific failure. If no specific code applies, the SDK falls back to ASE_4000.