| POST,OPTIONS | /v1/dashboard/kpiv2/visits |
|---|
"use strict";
export class SvcVisitRow {
/** @param {{CheckinId?:string,TicketLabel?:string,LocalDate?:string,LineId?:string,ServiceName?:string,StationId?:string,StationName?:string,EmployeeId?:string,EmployeeName?:string,CustomerName?:string,ContactId?:number,ContactAgentId?:number,CustomerId?:string,IsAppointment?:boolean,LocalHere?:string,LocalCalled?:string,LocalStart?:string,LocalEnd?:string,WaitSec?:number,ServeSec?:number,Outcome?:string,Fee?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
CheckinId;
/** @type {string} */
TicketLabel;
/** @type {string} */
LocalDate;
/** @type {string} */
LineId;
/** @type {string} */
ServiceName;
/** @type {?string} */
StationId;
/** @type {string} */
StationName;
/** @type {?string} */
EmployeeId;
/** @type {string} */
EmployeeName;
/** @type {string} */
CustomerName;
/** @type {?number} */
ContactId;
/** @type {?number} */
ContactAgentId;
/** @type {string} */
CustomerId;
/** @type {boolean} */
IsAppointment;
/** @type {?string} */
LocalHere;
/** @type {?string} */
LocalCalled;
/** @type {?string} */
LocalStart;
/** @type {?string} */
LocalEnd;
/** @type {?number} */
WaitSec;
/** @type {?number} */
ServeSec;
/** @type {string} */
Outcome;
/** @type {?number} */
Fee;
}
export class SvcChip {
/** @param {{LineId?:string,Name?:string,N?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
LineId;
/** @type {string} */
Name;
/** @type {number} */
N;
}
export class SvcVisitPage {
/** @param {{Rows?:SvcVisitRow[],TotalRows?:number,Page?:number,PageSize?:number,OutcomeCounts?:{ [index:string]: number; },Services?:SvcChip[],CanSeeStaff?:boolean,CanSeeFinancial?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {SvcVisitRow[]} */
Rows = [];
/** @type {number} */
TotalRows;
/** @type {number} */
Page;
/** @type {number} */
PageSize;
/** @type {{ [index:string]: number; }} */
OutcomeCounts = {};
/** @type {SvcChip[]} */
Services = [];
/** @type {boolean} */
CanSeeStaff;
/** @type {boolean} */
CanSeeFinancial;
}
export class KpiV2VisitsResponse {
/** @param {{ResponseStatus?:ResponseStatus,Visits?:SvcVisitPage}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {SvcVisitPage} */
Visits;
}
export class KpiV2VisitsRequest {
/** @param {{BranchId?:string,FromDate?:string,ToDate?:string,StationId?:string,EmployeeId?:string,Outcome?:string,LineId?:string,Page?:number,PageSize?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
BranchId;
/** @type {string} */
FromDate;
/** @type {string} */
ToDate;
/** @type {?string} */
StationId;
/** @type {?string} */
EmployeeId;
/** @type {string} */
Outcome;
/** @type {?string} */
LineId;
/** @type {number} */
Page;
/** @type {number} */
PageSize;
}
JavaScript KpiV2VisitsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dashboard/kpiv2/visits HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<KpiV2VisitsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<EmployeeId>00000000-0000-0000-0000-000000000000</EmployeeId>
<FromDate>0001-01-01T00:00:00</FromDate>
<LineId>00000000-0000-0000-0000-000000000000</LineId>
<Outcome>String</Outcome>
<Page>0</Page>
<PageSize>0</PageSize>
<StationId>00000000-0000-0000-0000-000000000000</StationId>
<ToDate>0001-01-01T00:00:00</ToDate>
</KpiV2VisitsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<KpiV2VisitsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Visits>
<CanSeeFinancial>false</CanSeeFinancial>
<CanSeeStaff>false</CanSeeStaff>
<OutcomeCounts xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringint>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>0</d3p1:Value>
</d3p1:KeyValueOfstringint>
</OutcomeCounts>
<Page>0</Page>
<PageSize>0</PageSize>
<Rows>
<SvcVisitRow>
<CheckinId>00000000-0000-0000-0000-000000000000</CheckinId>
<ContactAgentId>0</ContactAgentId>
<ContactId>0</ContactId>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<CustomerName>String</CustomerName>
<EmployeeId>00000000-0000-0000-0000-000000000000</EmployeeId>
<EmployeeName>String</EmployeeName>
<Fee>0</Fee>
<IsAppointment>false</IsAppointment>
<LineId>00000000-0000-0000-0000-000000000000</LineId>
<LocalCalled>0001-01-01T00:00:00</LocalCalled>
<LocalDate>0001-01-01T00:00:00</LocalDate>
<LocalEnd>0001-01-01T00:00:00</LocalEnd>
<LocalHere>0001-01-01T00:00:00</LocalHere>
<LocalStart>0001-01-01T00:00:00</LocalStart>
<Outcome>String</Outcome>
<ServeSec>0</ServeSec>
<ServiceName>String</ServiceName>
<StationId>00000000-0000-0000-0000-000000000000</StationId>
<StationName>String</StationName>
<TicketLabel>String</TicketLabel>
<WaitSec>0</WaitSec>
</SvcVisitRow>
</Rows>
<Services>
<SvcChip>
<LineId>00000000-0000-0000-0000-000000000000</LineId>
<N>0</N>
<Name>String</Name>
</SvcChip>
</Services>
<TotalRows>0</TotalRows>
</Visits>
</KpiV2VisitsResponse>