Page 1 of 1
[Released]Unable to filter data of Timeline with a query string.
Posted: Tue Dec 20, 2022 4:39 am
by demo
Hello Simpro,
I have a query related to Simpro timeline API. The filters with a query string are not working. I have searched the data using a query string but it's not working, I am using another API (Job APIs) with a filter and it's working fine. Please provide some resolution regarding this.
I want to search the data in Timeline API with Type, Message, and Date. Is it possible? I am searching like what I have mentioned below.
API URL = "/api/v1.0/companies/{companyID}/jobs/{jobID}/timelines/?Type=Schedule"
Thank You
Re: Unable to filter data of Timeline with a query string.
Posted: Tue Dec 20, 2022 5:35 am
by giggida
Please note "Demo" is our development team.
Our customers require our technicians update their SAS systems (Service Channel, Corrigo, Ecotrak) in real time when they Arrival and Completion a trip on a Job/WorkOrder. Since our technicians work inside Simpro, we need to use Simpro to update their system.
Within the customer system we need to post the datetime stamp of the Arrival and Completion times respectively. We believe the ONLY way to obtain this information is via the 'timelines' as gathered from the API documentation.
With that being said, the goal is to filter any timeline with a type = "Mobile Status", for a particular customer, for a particular job, and with a message containing "Mobile status set to Complete" or "Mobile status set to OnSite" or "Mobile status set to X", and a datetime within the last 15 minutes (managed by cron job). Second part of this question is when a timeline is added, does the Job:ModifiedDate update as well? Querying 1000's of records every 15 minutes maybe very taxing on your servers.
API URL = "/api/v1.0/companies/{companyID}/jobs/{jobID}/timelines/?Type=Mobile%20Status"&blah&blah&blah
This is the reason for the question posted by "Demo" below.
If there is a better method to achieve the requirements put forth by our customer as stated above, please feel free to provide a better solution. Thanks!
Re: Unable to filter data of Timeline with a query string.
Posted: Tue Dec 20, 2022 5:40 am
by Sindre
Hi demo,
Search on values in specific columns is not supported for the timelines endpoint.
I've moved your post into our feature requests to be assessed for future development.
Regards
Re: Unable to filter data of Timeline with a query string.
Posted: Tue Dec 20, 2022 5:54 am
by Sindre
Hi giggida,
The timeline endpoint is very basic in it's current version. It only provides a list view of entries without the possibility to get a specific timeline entry or search for records with specific values as you asked about.
Instead of querying the timeline directly can you query jobs that have been modified in the last timeperiod and then get the timeline for these jobs and extract the data from the timeline on your side?
DateModified is updated on a job when a new timeline entry is added.
Regards
Re: Unable to filter data of Timeline with a query string.
Posted: Tue Dec 20, 2022 7:10 pm
by giggida
Sindre wrote: ↑Tue Dec 20, 2022 5:54 am
Hi giggida,
The timeline endpoint is very basic in it's current version. It only provides a list view of entries without the possibility to get a specific timeline entry or search for records with specific values as you asked about.
Instead of querying the timeline directly can you query jobs that have been modified in the last timeperiod and then get the timeline for these jobs and extract the data from the timeline on your side?
DateModified is updated on a job when a new timeline entry is added.
Regards
Sindre --
While I understand your response, we are ultimately looking for Simpro's best practice to provide our customers with needs and requests. We need the timestamps for Onsite and Complete when the technicians check in/out. What is the best way to get this. We are contractually obligated to provide this information to our large customers in real time. Please help with the solution. Thanks!