Understanding Schedules and WorkOrders

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
calvin
Posts: 8
Joined: Tue Jun 13, 2023 10:31 pm

Understanding Schedules and WorkOrders

Post by calvin » Mon Oct 09, 2023 11:03 pm

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.
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Understanding Schedules and WorkOrders

Post by Sindre » Wed Oct 11, 2023 12:58 am

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
Sindre
API Developer | Simpro Software Group
calvin
Posts: 8
Joined: Tue Jun 13, 2023 10:31 pm

Re: Understanding Schedules and WorkOrders

Post by calvin » Sun Oct 22, 2023 2:26 am

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.
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Understanding Schedules and WorkOrders

Post by Sindre » Mon Oct 23, 2023 1:13 am

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
Sindre
API Developer | Simpro Software Group
calvin
Posts: 8
Joined: Tue Jun 13, 2023 10:31 pm

Re: Understanding Schedules and WorkOrders

Post by calvin » Fri Oct 27, 2023 6:35 am

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?
calvin
Posts: 8
Joined: Tue Jun 13, 2023 10:31 pm

Re: Understanding Schedules and WorkOrders

Post by calvin » Wed Nov 08, 2023 5:00 am

Hi Sindre,

Could you please confirm my points above? I feel like I must be missing something here.
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Understanding Schedules and WorkOrders

Post by Sindre » Thu Nov 09, 2023 6:09 am

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
Sindre
API Developer | Simpro Software Group
Post Reply