Skip to main content
Skip table of contents

How to set up sequence for visits within reservation

The order visit sequence feature enables you to flexibly define a categorical sequence for each individual visit within your reservation (read more about order visit types here). 

One of the core use cases where visit sequence is useful is to ensure that large collection visit items are scheduled only after all drop-off visits are complete within the same route. Positive outcomes being: 

  • Time efficiencies as collection visit items are not required to be unloaded and reloaded at each drop-off location simply because collection visits are planned at the end of the route. 

  • Ensuring driver health & safety by removing unnecessary unloading and reloading of heavy items within the route. 

1. How visit sequence feature works 

  1. Delivery solution has predefined sequence levels that range from 1,2, …n. The bigger the number  - the later in the route the visit will be planned.

  2. Clients can use this feature and set a sequence level to visits. For example: use sequence 1 for drop-off visit items and sequence 2 for large collection items. 

  3. Delivery solution will automatically calculate routes adhering to sequence level. Following the example per point 2 - optimisation will ensure that large collection visits are scheduled at the end of the route as they have a higher sequence level despite the fact different visit placement considered to be more optimal. 

Screenshot 2024-07-24 103207.png

Core concepts and parameters of a visit sequence feature are: 

  • Visit sequence can be set up per visit level via Core API only. 

  • Sequence levels are defined in ascending logic in integer values and can be anything starting from 1 to the maximum integer value (2147483647). E.g:

    • 1 - defines that visits need to be planned first before any other higher visit sequence level like 2, 3, etc.

    • 2 - means that these visits need to be planned after sequence 1 and before sequence 3 when on the same route. 

  • Same sequence value will not ensure visits are planned on the same route - they can be spread across multiple different routes. In order to ensure that certain visits are scheduled on the same route we recommend using multi-visit order types.

  • As described in this article multi-visit order type is never affected by optimisation and the original sequence of visits set by the client would not be changed. Therefore when using visit sequence feature within a multi-visit order type it is important to ensure that sequence of visits as well as their sequence levels are defined correctly by the client. E.g.:  

    • Unfeasible example. Multi-visit reservation contains: collection visit (sequence 2), drop-off visit (sequence 1), service visit (sequence 1). Notes: 

      • Collection visit (sequence 2) should be created as the last visit to comply with the visit sequence feature. 

      • Outcome: the whole multi-visit reservation will be considered unfeasible by optimisation and all visits within the order will be unscheduled. 

    • Feasible example. Multi-visit reservation contains: drop-off visit (sequence 1), service visit (sequence 1), collection visit (sequence 2). Notes: 

      • Sequence levels defined are compliant. 

      • Outcome: multi-visit reservation is scheduled by optimisation.  

  • Order sequence is an optional parameter. If an integer sequence value for the visit is not sent via Core API - the sequence rule will simply not be applied and the visit  will be planned anywhere in the trip(s). 

2. How to activate the visit sequence 

Please note that visit sequence feature is currently available only through Core API integrations and there’s no capability to define sequence via Control Room. In order to activate and start using this feature via core API: 

  1. During the process of creating a new reservation - use precedenceInTrip parameter to define sequence level by sending an integer value within the reservation. 

Screenshot 2024-07-24 184336.png
  1. If you’ll need to amend the sequence level - use the precedenceInTrip parameter within the “Amend reservation” endpoint. 

Screenshot 2024-07-24 184447.png
  1. Within the “Get schedules” and “Get plans” API you will be able to retrieve the schedule and plan indicating sequence levels that were set up for particular visits. Sequence level will be shown as a waypoint parameter. 

Screenshot 2024-07-24 184602.png

To summarize, you’ll be able to see and consume this property in each of the waypoints object of trips, in each waypoint object of activities of a trip element, in each of visits object, in each of visits object under unscheduled.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.