Changing the workHours referenced by a rule should not effect the notifications for that rule.
I needed to make some custom rules using work hours in geotab.
Via APIs, I added workHours and created a rule based on these work hours.
My question is If I update the work hours again using the Set method, whether the notify method called automatically which will notify my rules or do I have to call that method explicitly.
Please sign in to leave a comment.
Hi Steve, thanks for clarification but I needed to know once I update the work hours, my rule which is based on these work hours get updated as well according to the new work hours or do I have to do something else as well.
I am talking about whether to call this api or not after I modify my work hours.
You do not need to use the Notify method.
The rule references the Id of a WorkHour object which means any changes to the WorkHour object will be reflected within the rule without any additional steps.
I have two queries:
- I tried creating the rule with reference to a work hour object and got exception events. But when I modified my work hour object, I am not able to see new exceptions according to the modified time.
- Also the notification on the rule is to put the vehicle in private or non private mode based on the work hour which I added using the Add distribution list api and the same appears on the rule notification tab in the UI, but I cannot get any TripType changes in the GET TripTypeChange api for that device.
To put the car in private and non private mode as part of notification of a rule I am using add distribution list api. Is this the correct api to do so because I can see the changes in the ui in rules notification tab but I am unable to see the exceptions when I search for them.
Apologies for the delay here.
To answer your questions:
1. As mentioned, a rule references work hours by ID so if the definition of the work hours changes then it should be reflected on any subsequent exceptions created. If that is not the case then I would need examples which would be best provided in ticket form. I would advise that you work with the Geotab Reseller to submit a ticket into the support queue.
2. Have you gone through the Privacy Mode User Guide? Please give it a read and then let me know if you have any further questions.
The privacy mode user guide tells how to add vehicle in private and non private mode for a rule notification via UI, but how to add the same via APIs. Is the add distribution list the correct api to do so?
Yes, it would be an Add<DistributionList> call.
You only need 1 distribution list object for Privacy mode and one for Out of Privacy Mode as the DistributionList object will accept an array of rule id's.
Something like the below: