Optimizing Work for Verizon Connect Fleet
The RouteCloud API can optimize your jobs in Verizon Connect Fleet. The API provides the option to automate the same workflows that the Scenarios UI provides, ensuring your customers needs are met in the most efficient way possible.
A three-part process is involved:
- Create a snapshot of the live data.
- Assign work using the RouteCloud Optimizer.
- Publish work assignments back to live data.
Get a Snapshot of Live Data
The RouteCloud API accesses your live data by territory. When accessing live data you need to obtain the Id of the territory you are working with.
You can obtain a list of territories and their corresponding Ids with the following request:
This request returns a response with the following structure:
{
"territories": [
{
"id: "intenalterritoryid",
"name": "Your territory name"
}
]
}
The id value in the response is the internal territory Id required to access your live data.
A snapshot of your live data is then created with the request:
{
"territory_id": "intenalterritoryid",
"from_date": "2018-09-12",
"num_days": 7,
"create_sandbox": true
}
This returns an Id for a newly created sandbox that contains the snapshot of your live data.
{
"sandbox_id": "sandbox_id"
}
Assign Work Using the RouteCloud Optimizer
RouteCloud operations can now be run on your sandbox.
A standard workflow could be as follows:
Instantiate POST v1/instantiate?sandbox_id=sandbox_id
Build POST v1/build?wait=1&sandbox_id=sandbox_id
This would assign all work, including recurring jobs, using all available drivers.
Publish Work Assignments Back to Live Data
{
"commit_local": "when_no_conflicts",
"sandbox_id": "sandbox_id",
"publish_all_job_assignments": true
}
When you have completed these steps the new work assignments should be visible throughout your Verizon Connect services.
To assist in developing your integration, you can view your sandbox in the Scenarios UI to visualize the result of each step.
If you need to make further changes we recommend you create a [fresh snapshot](#Get a snapshot of live data) of your live data.