Using the Route Optimization API, can I specify the services that must occur before a given service in the json?
like this….
{
“id”: “s5”,
“type”: “service”,
“duration”: 300,
“address”: {
“lat”: 34.870354,
“lon”: -120.450435,
“name”: “SUSAN ROEDER [4111 BLACKSTONE RD]”,
“location_id”: “s5”,
“street_hint”: “BLACKSTONE RD”
}
service_after:{‘s2’',’s3’,’s4’} //Like this?
},
Yes, see the job or group relations.
Thank you for the reply. It appears that in_sequence is the answer. If I need s5 to occur after S2,S3, and S4, will in_sequence enforce just S5 after those others or will it constrain S5 after S4 after S3 after S2?
“relations”: [
{
“type”: “in_sequence”,
“ids”: [“S2”,“S3”,“S4”,“S5”]
}
]
To elaborate, my use case requires S2, S3, and S4 be completed before S5 but I don’t care which order S2,S3, and S4 are completed.
or will it constrain S5 after S4 after S3 after S2?
This.
Then you can create a group for S2,S3,S4 and use one group relation “in_sequence”. Or create multiple job relations (each with only one ID).