# Get Interaction By Id


# Usage

Retrieve the interaction details for any open interaction.

# Syntax

webclient.getInteractionById(payload: Object): Promise

# Arguments

Name Type Description
agentInteractionId number The interactionId of the target interaction.

# Sample Javascript

import IpscapeWebClient from '@ipscape/web-client';

// Create a new instance of the IpSCAPE Web Client
const webClient = new IpscapeWebClient();

let agentInteractionId = 101010;
webclient.getInteractionById(agentInteractionId).then((response) => {
    if(response.success) {
    else {

# Response

This method returns a promise. The resolved response is returned in an object and contains the following:

Example success Response

Returns this object if the API method call was invoked successfully, false otherwise.

    success: boolean;
    result: {
        agentInteractionId: number;
        interaction: {
            activity: ActivityData;
            callQuality: number;
            campaign: CampaignData;
            interactionType: string;
            leadData: LeadData;
            recovered: boolean;
            totalTime: number; // in seconds
            transfer: boolean;
            transferInformation: TransferData | null;
            wrapCodeList: Array<WrapCodes>;
            wrapNote: string | null;
        timestamp: number;