Trendsic Platform Service

<back to all web services

KpiV2BranchRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dashboard/kpiv2/branch

export class SvcNamedTime
{
    public Id: string;
    public Name: string;
    public SignedSec: number;
    public Served: number;

    public constructor(init?: Partial<SvcNamedTime>) { (Object as any).assign(this, init); }
}

export class SvcTint
{
    public Field: string;
    public Tone: string;
    public Reason: string;
    public Value?: number;
    public Reference?: number;
    public BranchValue?: number;

    public constructor(init?: Partial<SvcTint>) { (Object as any).assign(this, init); }
}

export class SvcMetrics
{
    public Checkins: number;
    public Walkins: number;
    public Appts: number;
    public Served: number;
    public NoShows: number;
    public ApptNoShows: number;
    public CancelledAtWindow: number;
    public Abandoned: number;
    public Called: number;
    public CalledUp: number;
    public AbandonRate?: number;
    public NoShowRate?: number;
    public AvgServiceSec?: number;
    public MedianServiceSec?: number;
    public AvgWaitSec?: number;
    public MaxWaitSec: number;
    public AvgWalkUpSec?: number;
    public ExpectedServiceSec?: number;
    public SignedSec: number;
    public ServingSec: number;
    public PausedSec: number;
    public IdleSec: number;
    public UnstaffedSec: number;
    public Utilization?: number;
    public IdleShare?: number;
    public PausedShare?: number;
    public Sessions: number;
    public OpenDays: number;
    public FeesEarned?: number;
    public AvgFee?: number;
    public FeesPerStaffedHour?: number;
    public ExpectedFeesPerStaffedHour?: number;
    public LaborCost?: number;
    public LaborPartial: boolean;
    public MissingCostEmployeeIds: string[] = [];
    public MissingCost: SvcNamedTime[] = [];
    public LaborLocked: boolean;
    public Contribution?: number;
    public LostFees?: number;
    public LostNoShowFees?: number;
    public Mix: { [index:string]: number; } = {};
    public HourlyServed: number[] = [];
    public HourlyFees: number[] = [];
    public HourlyCost: number[] = [];
    public Tints: SvcTint[] = [];

    public constructor(init?: Partial<SvcMetrics>) { (Object as any).assign(this, init); }
}

export class SvcBranchRow
{
    public BranchId: string;
    public Name: string;
    public StateCode: string;
    public ZoneCode: string;
    public TimeZone: string;
    public Windows: number;
    public RecordingSinceUtc?: string;
    public SessionsSinceUtc?: string;
    public Metrics: SvcMetrics;

    public constructor(init?: Partial<SvcBranchRow>) { (Object as any).assign(this, init); }
}

export class SvcWindowRow
{
    public StationId: string;
    public Name: string;
    public Clerks: SvcNamedTime[] = [];
    public NeverStaffed: boolean;
    public LastStaffedUtc?: string;
    public LastStaffedBy: string;
    public Metrics: SvcMetrics;

    public constructor(init?: Partial<SvcWindowRow>) { (Object as any).assign(this, init); }
}

export class SvcClerkRow
{
    public EmployeeId: string;
    public Name: string;
    public Windows: SvcNamedTime[] = [];
    public LoadedRate?: number;
    public RateSet: boolean;
    public RateLocked: boolean;
    public Metrics: SvcMetrics;

    public constructor(init?: Partial<SvcClerkRow>) { (Object as any).assign(this, init); }
}

export class SvcAverage
{
    public Count: number;
    public Served: number;
    public AvgServiceSec?: number;
    public MedianServiceSec?: number;
    public AvgWaitSec?: number;
    public Utilization?: number;
    public IdleSec: number;
    public PausedSec: number;
    public NoShows: number;
    public SignedSec: number;
    public FeesEarned?: number;
    public FeesPerStaffedHour?: number;
    public LaborCost?: number;
    public Contribution?: number;
    public LostNoShowFees?: number;

    public constructor(init?: Partial<SvcAverage>) { (Object as any).assign(this, init); }
}

export class SvcComparison
{
    public Mode: string;
    public FromDate?: string;
    public ToDate?: string;
    public CutoffMinute?: number;
    public HasData: boolean;
    public Metrics: SvcMetrics;

    public constructor(init?: Partial<SvcComparison>) { (Object as any).assign(this, init); }
}

export class SvcCoverageBucket
{
    public ServingPct: number;
    public IdlePct: number;
    public PausedPct: number;
    public UnstaffedPct: number;

    public constructor(init?: Partial<SvcCoverageBucket>) { (Object as any).assign(this, init); }
}

export class SvcCoverageRow
{
    public StationId: string;
    public Name: string;
    public Buckets: SvcCoverageBucket[] = [];

    public constructor(init?: Partial<SvcCoverageRow>) { (Object as any).assign(this, init); }
}

export class SvcCoverage
{
    public StartLocalMinute: number;
    public BucketMinutes: number;
    public Rows: SvcCoverageRow[] = [];
    public InLine: number[] = [];
    public GapBands: number[][] = [];
    public Days: number;
    public NotRecorded: boolean;
    public FutureFromIndex?: number;

    public constructor(init?: Partial<SvcCoverage>) { (Object as any).assign(this, init); }
}

export class SvcFeeChange
{
    public LocationId: string;
    public OnDate: string;
    public FromFee: number;
    public ToFee: number;

    public constructor(init?: Partial<SvcFeeChange>) { (Object as any).assign(this, init); }
}

export class SvcServiceRow
{
    public LineId: string;
    public Name: string;
    public Completed: number;
    public AvgServiceSec?: number;
    public BranchAvgServiceSec?: number;
    public FeesEarned?: number;
    public FeeCurrent?: number;
    public FeeMin?: number;
    public FeeMax?: number;
    public FeePerMinute?: number;
    public BranchFeePerMinute?: number;
    public FeeChanges: SvcFeeChange[] = [];

    public constructor(init?: Partial<SvcServiceRow>) { (Object as any).assign(this, init); }
}

export class SvcHourRow
{
    public LocalHour: number;
    public Served: number;
    public FeesEarned?: number;
    public CostToStaff?: number;

    public constructor(init?: Partial<SvcHourRow>) { (Object as any).assign(this, init); }
}

export class SvcAlert
{
    public Level: string;
    public View: string;
    public Code: string;
    public StationId?: string;
    public EmployeeId?: string;
    public BranchId?: string;
    public LineId?: string;
    public Name: string;
    public OtherLineId?: string;
    public OtherName: string;
    public StationIds: string[] = [];
    public Values: { [index:string]: number; } = {};

    public constructor(init?: Partial<SvcAlert>) { (Object as any).assign(this, init); }
}

export class SvcBranchDetail
{
    public Branch: SvcBranchRow;
    public Windows: SvcWindowRow[] = [];
    public Clerks: SvcClerkRow[] = [];
    public Unassigned: SvcMetrics;
    public NoClerk: SvcMetrics;
    public PerWindowAverage: SvcAverage;
    public PerClerkAverage: SvcAverage;
    public OpenDays: number;
    public IsLive: boolean;
    public Comparison: SvcComparison;
    public Coverage: SvcCoverage;
    public Services: SvcServiceRow[] = [];
    public ByHour: SvcHourRow[] = [];
    public Alerts: SvcAlert[] = [];
    public TotalsAgree: boolean;
    public CanSeeStaff: boolean;
    public CanSeeFinancial: boolean;
    public CanSeePay: boolean;

    public constructor(init?: Partial<SvcBranchDetail>) { (Object as any).assign(this, init); }
}

export class KpiV2BranchResponse
{
    public ResponseStatus: ResponseStatus;
    public Branch: SvcBranchDetail;

    public constructor(init?: Partial<KpiV2BranchResponse>) { (Object as any).assign(this, init); }
}

export class KpiV2BranchRequest
{
    public BranchId: string;
    public FromDate: string;
    public ToDate: string;
    public Compare: string;

    public constructor(init?: Partial<KpiV2BranchRequest>) { (Object as any).assign(this, init); }
}

TypeScript KpiV2BranchRequest 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.

POST /v1/dashboard/kpiv2/branch HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"BranchId":"00000000000000000000000000000000","FromDate":"0001-01-01T00:00:00.0000000","ToDate":"0001-01-01T00:00:00.0000000","Compare":"String"}
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"}},"Branch":{"Branch":{"BranchId":"00000000000000000000000000000000","Name":"String","StateCode":"String","ZoneCode":"String","TimeZone":"String","Windows":0,"RecordingSinceUtc":"0001-01-01T00:00:00.0000000","SessionsSinceUtc":"0001-01-01T00:00:00.0000000","Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}},"Windows":[{"StationId":"00000000000000000000000000000000","Name":"String","Clerks":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"NeverStaffed":false,"LastStaffedUtc":"0001-01-01T00:00:00.0000000","LastStaffedBy":"String","Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}}],"Clerks":[{"EmployeeId":"00000000000000000000000000000000","Name":"String","Windows":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LoadedRate":0,"RateSet":false,"RateLocked":false,"Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}}],"Unassigned":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]},"NoClerk":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]},"PerWindowAverage":{"Count":0,"Served":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"Utilization":0,"IdleSec":0,"PausedSec":0,"NoShows":0,"SignedSec":0,"FeesEarned":0,"FeesPerStaffedHour":0,"LaborCost":0,"Contribution":0,"LostNoShowFees":0},"PerClerkAverage":{"Count":0,"Served":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"Utilization":0,"IdleSec":0,"PausedSec":0,"NoShows":0,"SignedSec":0,"FeesEarned":0,"FeesPerStaffedHour":0,"LaborCost":0,"Contribution":0,"LostNoShowFees":0},"OpenDays":0,"IsLive":false,"Comparison":{"Mode":"String","FromDate":"0001-01-01T00:00:00.0000000","ToDate":"0001-01-01T00:00:00.0000000","CutoffMinute":0,"HasData":false,"Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}},"Coverage":{"StartLocalMinute":0,"BucketMinutes":0,"Rows":[{"StationId":"00000000000000000000000000000000","Name":"String","Buckets":[{"ServingPct":0,"IdlePct":0,"PausedPct":0,"UnstaffedPct":0}]}],"InLine":[0],"GapBands":[[0]],"Days":0,"NotRecorded":false,"FutureFromIndex":0},"Services":[{"LineId":"00000000000000000000000000000000","Name":"String","Completed":0,"AvgServiceSec":0,"BranchAvgServiceSec":0,"FeesEarned":0,"FeeCurrent":0,"FeeMin":0,"FeeMax":0,"FeePerMinute":0,"BranchFeePerMinute":0,"FeeChanges":[{"LocationId":"00000000000000000000000000000000","OnDate":"0001-01-01T00:00:00.0000000","FromFee":0,"ToFee":0}]}],"ByHour":[{"LocalHour":0,"Served":0,"FeesEarned":0,"CostToStaff":0}],"Alerts":[{"Level":"String","View":"String","Code":"String","StationId":"00000000000000000000000000000000","EmployeeId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","LineId":"00000000000000000000000000000000","Name":"String","OtherLineId":"00000000000000000000000000000000","OtherName":"String","StationIds":["00000000000000000000000000000000"],"Values":{"String":0}}],"TotalsAgree":false,"CanSeeStaff":false,"CanSeeFinancial":false,"CanSeePay":false}}