Contract Status

Status
Leads
PreConstruction
Construction
P - Pending
A Prospect, the lead is new and has not been qualified.
Not Applicable.
Ready for Construction. Waiting on Information from the field, or or suitable window of opportunity to commence. Often used to undertake site surveys and photos prior to commencment.
A - Active
An Active Lead that has been qualified.
Active Preconstruction - much work will be done on this Job.
The job has commenced in Construction.
F - Finalising
Deposit or some other commitment. Preconstruction should commence.
Contract Signed, and scheduling completed. The job is ready for Construction, and may be in the Construction queue. Other work may remain as administration tasks.
The job has reach practical completion and only minor fixes and preparation for handover.
M - Maintenace
Under review, being managed by a Sales Manager -for determining next action, or cancel/lost.
Construction completed. The job is ready to be closed, but stays online for additional customer service functions.
Job has been handed over - it is still under the first period or maintenance, not yet in Long term Warranty.
C - Closed
Contract signed, sales person no longer involved.
Closed - the job is now in Long term Warranty.
Closed - the job is now in Long term Warranty.
H - Hold
On Hold - the Client is delaying, but temporarily.. no commitment either way. Typically does not require active management to progress.
On Hold - the Client is delaying, but temporarily.. no commitment either way. Typically does not require active management to progress.
The job is on hold - typically not requiring active management.
S - Stopped
Stopped - there is a critical issue that requires active management to progress.
Stopped - there is a critical issue that requires active management to progress.
The Job is stopped - a critical issue such as payment or other factors may be preventing progress. Active management would be expected.
X - Abandoned
Lead Lost - keep the clients details, but this lead failed.
Contract Lost - keep the clients details for future reference, but this one is finished.
The Contract was lost - the job is no longer applicable.


Task Status

Code
Desc
U
Unplanned
A
Available
P
Planned
S
Started
C
Completed
R
Rescheduled?
G
Progressing from Started to Started (in tblworkItemHistories)



Task Status State Diagram
Supplier Status State Diagram



Supplier Status

Code
Desc
P
Pending
Planned and Normal Callup
K
Waiting on Key
Not Used
W
Waiting
Planned, Call and Confirm Type Callup
X
Rejected
A
Accepted
Booked in with Supplier
R
Rescheduled
Proposed Alt Date by Supplier
C
Completed


Date Calc Type (Link Mode)

Code
Desc
1
Appointment
I
Input/Key
F Free
C Start Date/Control Optional/Schedule
A
Start Date/Control Optional/Schedule/Reschedule/Cancel
B
Start Date/Control Optional/Schedule/Reschedule
D
Start Date/Control Optional/Reschedule/Cancel    
E
Start Date/Control Optional/Reschedule
G
Start Date/Control Optional/Cancel
H
Start Date/Control Forced/Schedule/Reschedule/Cancel
J Start Date/Control Forced/Schedule/Reschedule
K Start Date/Control Forced/Schedule
L Start Date/Control Forced/Reschedule/Cancel
M Start Date/Control Forced/Reschedule
N Start Date/Control Forced/Cancel
O End Date/Control Optional/Schedule/Reschedule/Cancel
P End Date/Control Optional/Schedule/Reschedule
Q End Date/Control Optional/Schedule
R End Date/Control Optional/Reschedule
S End Date/Control Optional/Reschedule
T End Date/Control Forced/Schedule/Reschedule/Cancel
U End Date/Control Forced/Schedule/Reschedule/Cancel
V End Date/Control Forced/Schedule/Reschedule
W End Date/Control Forced/Schedule
X End Date/Control Forced/Reschedule/Cancel
Y End Date/Control Forced/Reschedule
Z End Date/Control Forced/Cancel



API Calls

{API Install Location} = Location


Notes:

For some apis we have 2 ways of updating.  Either via a PUT or PATCH:

In a PUT you will want to provide all the required data.  If some fields are null then its possible that nulls will be written to the database.

In a PATCH you just provide the fields you want to update and the service will only update those fields


Name Path Description Type Get Query Parameters / Post/Put/Patch Body Notes
GetContractStatusOptions Location/api/contracts/{id}/statusoptions (where id is the contract Id) get a list of statuses and their reason codes  GET

UpdateContractStatus Location/api/contracts/{id}/updatestatus (where id is the contract Id) Update status of contract POST {
  status: (char) new status code,
  dateRequest (Nullable Datetime) date status change requested,
  dateReview (Nullable Datetime) date for review,
  reasonCode (string) code for reason,
  otherReason (string) free text for other reason
}

Make sure the reason codes and status codes are valid.  Recommend calling statusoptions before posting status change
UpdateTask (Full) Location/api/tasks/{id} (where id is the task Id) update a task PUT
{
  datePlanned (Nullable datetime),
  dateCompleted (Nullable datetime),
  dateStarted: (Nullable datetime),
  dateDue: (Nullable datetime),
  dateProposeAlternate: (Nullable datetime),
  dateAlternateActualStart: (Nullable datetime),
  dateAlternateActualComplete: (Nullable datetime),
  percentComplete (numeric),
  supplierId: (nullable integer),
  resourceCodeId: (nullable integer),
  flexFields (array of flexField objects)
}

flexField = {
  flexFieldValueId (Nullable int),
  dateValue (Nullable datetime),
  decValue (Nullable numeric),
  textValue (string),
  flexValueData (string),
}

UpdateTask (Patch)
Location/api/tasks/{id} (where id is the task Id) update a task by patch
PATCH Based off update a task body
Copy Task         {Location}/api/tasks/{id}/copy (where id is the task id) copy task POST {
  contractId (int optional),
  deliveryInstructions (string optional),
  supplierId (int optional),
  supplierLocked (bool optional),
  resourceCode (string optional),
  name (string optional)
}

Accept Task Location/api/tasks/{id}/Accept (where id is the task Id)
Accept task PUT

Reject Task Location/api/tasks/{id}/Reject (where id is the task Id)
Reject task
PUT

Get Stop Day Reasons     Location/api/contracts/stopdays/reasons        
Gets a list of stop day reasons and their description GET
To be used when adding a stop day
Get Stop Days Location/api/contracts/{id}/stopdays  (where id is the contract Id)
Gets a list of stop days for the provided contract id GET

Add Stop Days Location/api/contracts/{id}/stopdays (where id is the contract Id)
Adds stop days to contract POST Array
[
  {
    comment (string),
    date: (datetime),
    reason: (string)
  }
]
reason should be from the get stop day reasons
Delete Stop Days Location/api/contracts/{id}/stopdays (where id is the contract Id)
Deletes stop days from contract DELETE QueryParam:
stopDayIds (comma seperated int)

Will only delete if all provided ids are part of the provided contract id.  Will throw error if not
Get Special Roles         Location/api/contracts/specialroles
Gets a list of special role ids and their display names GET
For use in Update Special role on contract.  This call will take a AssignSpecialRoleId which needs to be one of these
Update Special Role on Contract Location/api/contracts/{id}/specialroles/update (where id is the contract Id)
Updates a special role on contract.  Special roles are:
Contract Admin, Supervisor 1, Supervisor 2, Supervisor QC, Sales Person, Senior Supervisor
POST {
  userAssignedId (int),
  assignSpecialRoleId (int)
}
Use Get Special roles to find the int to use in assignSpecialRoleId