Trendsic Platform Service

<back to all web services

ContactVisitsRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/contact/{ContactId}/visits
"use strict";
export class ContactQueueVisit {
    /** @param {{CheckinId?:string,BranchId?:string,BranchName?:string,LineId?:string,ServiceName?:string,Outcome?:number,OutcomeLabel?:string,IsAppointment?:boolean,SignInUtc?:string,CalledUtc?:string,FirstStartUtc?:string,CompletedTime?:string,WaitMinutes?:number,ServiceMinutes?:number,WindowName?:string,TicketLabel?:string,HoldReason?:string,ReturnedTime?:string,PausedMinutes?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    CheckinId;
    /** @type {string} */
    BranchId;
    /** @type {string} */
    BranchName;
    /** @type {string} */
    LineId;
    /** @type {string} */
    ServiceName;
    /** @type {number} */
    Outcome;
    /** @type {string} */
    OutcomeLabel;
    /** @type {boolean} */
    IsAppointment;
    /** @type {?string} */
    SignInUtc;
    /** @type {?string} */
    CalledUtc;
    /** @type {?string} */
    FirstStartUtc;
    /** @type {?string} */
    CompletedTime;
    /** @type {?number} */
    WaitMinutes;
    /** @type {?number} */
    ServiceMinutes;
    /** @type {string} */
    WindowName;
    /** @type {string} */
    TicketLabel;
    /** @type {string} */
    HoldReason;
    /** @type {?string} */
    ReturnedTime;
    /** @type {number} */
    PausedMinutes;
}
export class ContactQueueVisitSummary {
    /** @param {{Visits?:number,Completed?:number,NoShows?:number,NoShows90d?:number,Cancelled?:number,Unfulfilled?:number,Appointments?:number,LastVisitUtc?:string,LastNoShowUtc?:string,AvgWaitMinutes?:number,SmsOptIn?:boolean,TextsSent90d?:number,SayNameAs?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Visits;
    /** @type {number} */
    Completed;
    /** @type {number} */
    NoShows;
    /** @type {number} */
    NoShows90d;
    /** @type {number} */
    Cancelled;
    /** @type {number} */
    Unfulfilled;
    /** @type {number} */
    Appointments;
    /** @type {?string} */
    LastVisitUtc;
    /** @type {?string} */
    LastNoShowUtc;
    /** @type {?number} */
    AvgWaitMinutes;
    /** @type {boolean} */
    SmsOptIn;
    /** @type {number} */
    TextsSent90d;
    /** @type {string} */
    SayNameAs;
}
export class ContactVisitsResponse {
    /** @param {{ResponseStatus?:ResponseStatus,Visits?:ContactQueueVisit[],Summary?:ContactQueueVisitSummary}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {ContactQueueVisit[]} */
    Visits = [];
    /** @type {ContactQueueVisitSummary} */
    Summary;
}
export class ContactVisitsRequest {
    /** @param {{ContactId?:number,Take?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {number} */
    Take;
}

JavaScript ContactVisitsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/contact/{ContactId}/visits HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Visits":[{"CheckinId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","BranchName":"String","LineId":"00000000000000000000000000000000","ServiceName":"String","Outcome":0,"OutcomeLabel":"String","IsAppointment":false,"SignInUtc":"0001-01-01T00:00:00.0000000","CalledUtc":"0001-01-01T00:00:00.0000000","FirstStartUtc":"0001-01-01T00:00:00.0000000","CompletedTime":"0001-01-01T00:00:00.0000000","WaitMinutes":0,"ServiceMinutes":0,"WindowName":"String","TicketLabel":"String","HoldReason":"String","ReturnedTime":"0001-01-01T00:00:00.0000000","PausedMinutes":0}],"Summary":{"Visits":0,"Completed":0,"NoShows":0,"NoShows90d":0,"Cancelled":0,"Unfulfilled":0,"Appointments":0,"LastVisitUtc":"0001-01-01T00:00:00.0000000","LastNoShowUtc":"0001-01-01T00:00:00.0000000","AvgWaitMinutes":0,"SmsOptIn":false,"TextsSent90d":0,"SayNameAs":"String"}}