Page 1 of 1

Understanding Schedules and WorkOrders

Posted: Mon Oct 09, 2023 11:03 pm
by calvin
I'm trying to put together a system which requires a view of the scheduled events, including basic information (ie. Job Name, Job Status, Date, Blocks) across a period of time, including recent past and near future.

I'm finding the implementation of Schedules and WorkOrders slightly confusing. Could someone clarify whether the following is accurate?

Schedule:
  • Created when a job (or activity/quote/lead/etc) is scheduled.
  • API returns ID, Type, Reference (Job/CC No), TotalHours, Staff, Date, Blocks
  • API cannot return Project information other than Job No and CC No.
  • Additional API lookup required to return even basic schedule info, e.g. Job Name
  • Data from Schedule is used to create WorkOrder when job card is completed within SimPRO Mobile or similar. This simultaneously updates the Schedule item with new time blocks, etc.
  • Continues to exist after WorkOrder has been created, i.e. schedules exist in past and future.
  • Contains no accessible data which references related WorkOrder?
Work Order:
  • Data from Schedule is used to create WorkOrder when job card is completed within SimPRO Mobile or similar.
  • API returns ID, Staff, WorkOrderDate, DescriptionNotes, MaterialNotes, Materials, Blocks, DateModified, CustomFields, Project.
  • Exists only for completed Work Orders, i.e. exists in the past, cannot perform API lookups on future dated WorkOrders?
  • Contains no accessible data which references related Schedule?
As WorkOrders do not exist for items that do not have a completed job card, it seems that to do this reliably, I will need to pull Schedules and then another API call for every individual result to obtain Job Name, etc. Is there a more efficient method that I'm missing, which doesn't require maintaining a duplicate database?

Thanks in advance.

Re: Understanding Schedules and WorkOrders

Posted: Wed Oct 11, 2023 12:58 am
by Sindre
Hi calvin,
I understand that you have found the different endpoints in our documentation. They list all the date you can get and update for the schedules and work orders through the API.

The top level schedule endpoint gives you basic information and also the href for the schedule on each individual job. You can use this to get the job, section and cost center ID's and use these to make a new call to get more details.

For work orders you can also find and edit future work orders and their blocks through the API on the job and quote cost centre work orders endpoint.

Code: Select all

/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/workOrders/{workOrderID}
It's correct that you need to do individual queries to get details like jobs, and then build your data the way you need it. The top level endpoints will usually give you the data or ID's you need to make a query to get more details.

Regards

Re: Understanding Schedules and WorkOrders

Posted: Sun Oct 22, 2023 2:26 am
by calvin
Hi Sindre,

Thanks for your response.

That makes sense for the most part, however could you confirm the below?
For work orders you can also find and edit future work orders and their blocks through the API on the job and quote cost centre work orders endpoint.
This does not appear to be the case for our build.

I can see future dated Schedule items through this end point: /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/schedules/

However, this WO endpoint does not show future dated items. I cannot append the specific WO number as I seem to have no way to determine what one is. /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/workOrders/

This had led me to believe that future dated WOs do not exist; they are created on completion of a Job Card by staff. Can you clarify?

It is this seeming redundancy yet disconnectedness between Schedules and WOs which is leaving me somewhat lost here.

Re: Understanding Schedules and WorkOrders

Posted: Mon Oct 23, 2023 1:13 am
by Sindre
Hi calvin,
For work orders on the jobs endpoint those that have been approved in Simpro is being displayed for through the API.

Approved work orders can be retrieved and edited through the work order endpoint for past and future dates.

Work orders that have not been approved are not displayed on the work order endpoint.

Regards

Re: Understanding Schedules and WorkOrders

Posted: Fri Oct 27, 2023 6:35 am
by calvin
Hi Sindre,

Thanks. And so I'm understanding correctly:

WOs are only approved once a job card has been completed by the assigned staff member, so there is realistically no way for a future dated WO to be approved or accessible through the API?

The closest I can achieve is accessing the future dated schedule item?

But there is nothing accessible in the API which links a schedule item to the related WO?

Re: Understanding Schedules and WorkOrders

Posted: Wed Nov 08, 2023 5:00 am
by calvin
Hi Sindre,

Could you please confirm my points above? I feel like I must be missing something here.

Re: Understanding Schedules and WorkOrders

Posted: Thu Nov 09, 2023 6:09 am
by Sindre
Hi Calvin,
I've done some testing in Simpro and if you add a work order in Simpro, instead of approving it you can open the job card and save it.
After this it will be available in the API, also for future dates.

You can also add future work orders in the API.

Regards