| GET | /v1/workforce/planning |
|---|
"use strict";
export class OtRow {
/** @param {{ContactID?:number,WorkerName?:string,ClassCode?:string,Crew?:string,Job?:string,PatternLabel?:string,ProjHours?:number,OtHours?:number,DtHours?:number,OtCost?:number,State?:string,Tone?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ContactID;
/** @type {string} */
WorkerName;
/** @type {string} */
ClassCode;
/** @type {string} */
Crew;
/** @type {string} */
Job;
/** @type {string} */
PatternLabel;
/** @type {number} */
ProjHours;
/** @type {number} */
OtHours;
/** @type {number} */
DtHours;
/** @type {?number} */
OtCost;
/** @type {string} */
State;
/** @type {string} */
Tone;
}
export class OtExposureBoard {
/** @param {{TotalOtCost?:number,TotalOtHours?:number,OverCount?:number,WorkerCount?:number,Rows?:OtRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
TotalOtCost;
/** @type {number} */
TotalOtHours;
/** @type {number} */
OverCount;
/** @type {number} */
WorkerCount;
/** @type {OtRow[]} */
Rows = [];
}
export class PerDiemJobRow {
/** @param {{Job?:string,Total?:number,NonTax?:number,Tax?:number,Days?:number,AwayCount?:number,DayRateFlag?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Job;
/** @type {number} */
Total;
/** @type {number} */
NonTax;
/** @type {number} */
Tax;
/** @type {number} */
Days;
/** @type {number} */
AwayCount;
/** @type {boolean} */
DayRateFlag;
}
export class PerDiemBoard {
/** @param {{TotalCost?:number,NonTaxable?:number,Taxable?:number,AwayCount?:number,Jobs?:PerDiemJobRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
TotalCost;
/** @type {number} */
NonTaxable;
/** @type {number} */
Taxable;
/** @type {number} */
AwayCount;
/** @type {PerDiemJobRow[]} */
Jobs = [];
}
export class MarginJobRow {
/** @param {{Job?:string,BasePct?:number,ProjPct?:number,FadePts?:number,Severity?:string,OtCost?:number,PerDiem?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Job;
/** @type {number} */
BasePct;
/** @type {number} */
ProjPct;
/** @type {number} */
FadePts;
/** @type {string} */
Severity;
/** @type {?number} */
OtCost;
/** @type {number} */
PerDiem;
}
export class MarginBoard {
/** @param {{JobCount?:number,TotalFade?:number,Jobs?:MarginJobRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
JobCount;
/** @type {?number} */
TotalFade;
/** @type {MarginJobRow[]} */
Jobs = [];
}
export class UtilRow {
/** @param {{ContactID?:number,WorkerName?:string,Crew?:string,ProjHours?:number,BaselineHours?:number,Pct?:number,Band?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ContactID;
/** @type {string} */
WorkerName;
/** @type {string} */
Crew;
/** @type {number} */
ProjHours;
/** @type {number} */
BaselineHours;
/** @type {number} */
Pct;
/** @type {string} */
Band;
}
export class UtilizationBoard {
/** @param {{UnderCount?:number,OverCount?:number,Rows?:UtilRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
UnderCount;
/** @type {number} */
OverCount;
/** @type {UtilRow[]} */
Rows = [];
}
export class PlanningSuggestion {
/** @param {{Id?:string,Kind?:string,Title?:string,Detail?:string,SaveText?:string,Effect?:string,RuleId?:string,LegalNote?:string,ApplyLabel?:string,Severity?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Kind;
/** @type {string} */
Title;
/** @type {string} */
Detail;
/** @type {string} */
SaveText;
/** @type {string} */
Effect;
/** @type {string} */
RuleId;
/** @type {string} */
LegalNote;
/** @type {string} */
ApplyLabel;
/** @type {string} */
Severity;
}
export class PlanningSurface {
/** @param {{WeekLabel?:string,WeekStart?:string,WorkerCount?:number,Ot?:OtExposureBoard,PerDiem?:PerDiemBoard,Margin?:MarginBoard,Utilization?:UtilizationBoard,Suggestions?:PlanningSuggestion[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
WeekLabel;
/** @type {string} */
WeekStart;
/** @type {number} */
WorkerCount;
/** @type {OtExposureBoard} */
Ot;
/** @type {PerDiemBoard} */
PerDiem;
/** @type {MarginBoard} */
Margin;
/** @type {UtilizationBoard} */
Utilization;
/** @type {PlanningSuggestion[]} */
Suggestions = [];
}
export class PlanningResponse {
/** @param {{Surface?:PlanningSurface,CanSeePay?:boolean,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {PlanningSurface} */
Surface;
/** @type {boolean} */
CanSeePay;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class PlanningRequest {
/** @param {{AsOf?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
AsOf;
}
JavaScript PlanningRequest 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.
GET /v1/workforce/planning HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PlanningResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CanSeePay>false</CanSeePay>
<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>
<Surface>
<Margin>
<JobCount>0</JobCount>
<Jobs>
<MarginJobRow>
<BasePct>0</BasePct>
<FadePts>0</FadePts>
<Job>String</Job>
<OtCost>0</OtCost>
<PerDiem>0</PerDiem>
<ProjPct>0</ProjPct>
<Severity>String</Severity>
</MarginJobRow>
</Jobs>
<TotalFade>0</TotalFade>
</Margin>
<Ot>
<OverCount>0</OverCount>
<Rows>
<OtRow>
<ClassCode>String</ClassCode>
<ContactID>0</ContactID>
<Crew>String</Crew>
<DtHours>0</DtHours>
<Job>String</Job>
<OtCost>0</OtCost>
<OtHours>0</OtHours>
<PatternLabel>String</PatternLabel>
<ProjHours>0</ProjHours>
<State>String</State>
<Tone>String</Tone>
<WorkerName>String</WorkerName>
</OtRow>
</Rows>
<TotalOtCost>0</TotalOtCost>
<TotalOtHours>0</TotalOtHours>
<WorkerCount>0</WorkerCount>
</Ot>
<PerDiem>
<AwayCount>0</AwayCount>
<Jobs>
<PerDiemJobRow>
<AwayCount>0</AwayCount>
<DayRateFlag>false</DayRateFlag>
<Days>0</Days>
<Job>String</Job>
<NonTax>0</NonTax>
<Tax>0</Tax>
<Total>0</Total>
</PerDiemJobRow>
</Jobs>
<NonTaxable>0</NonTaxable>
<Taxable>0</Taxable>
<TotalCost>0</TotalCost>
</PerDiem>
<Suggestions>
<PlanningSuggestion>
<ApplyLabel>String</ApplyLabel>
<Detail>String</Detail>
<Effect>String</Effect>
<Id>String</Id>
<Kind>String</Kind>
<LegalNote>String</LegalNote>
<RuleId>String</RuleId>
<SaveText>String</SaveText>
<Severity>String</Severity>
<Title>String</Title>
</PlanningSuggestion>
</Suggestions>
<Utilization>
<OverCount>0</OverCount>
<Rows>
<UtilRow>
<Band>String</Band>
<BaselineHours>0</BaselineHours>
<ContactID>0</ContactID>
<Crew>String</Crew>
<Pct>0</Pct>
<ProjHours>0</ProjHours>
<WorkerName>String</WorkerName>
</UtilRow>
</Rows>
<UnderCount>0</UnderCount>
</Utilization>
<WeekLabel>String</WeekLabel>
<WeekStart>0001-01-01T00:00:00</WeekStart>
<WorkerCount>0</WorkerCount>
</Surface>
</PlanningResponse>