#
Preview Allocated
#
Usage
Fired when a preview lead has been presented to the agent (note: no call has been made at this point in the interaction).
#
Syntax
webClient.onPreviewAllocated(listener: Function);
#
Arguments
#
Sample Javascript
const callback = (response) => {
if (response.error) console.error(response.error);
if (response.result)
alert(response.result);
}
webClient.onPreviewAllocated(callback);
#
Response
This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields.
Result
Example
success
Response
Returns this object if the API method call was invoked successfully, false otherwise.
{
agentInteractionId: number;
callType: string;
interaction: {
activity: ActivityData;
callQuality: number
campaign: CampaignData;
interactionType: string;
leadData: LeadData;
recovered: boolean;
totalTime: number;
transfer: boolean;
transferInformation: TransferData;
wrapCodeList: WrapcodeData[];
wrapNote: string | null;
},
timestamp: number; // Unix timestamp
}