We have introduced an optional external_id attribute on places.
This gives you additional capabilities in synchronizing another,
leading system with the booking and places data in MotionTools.
When creating a place, you can now pass an optional external_id
string. You would normally set this to the ID of that location in
your source system.
In contrast to other, location-specific attributes that require to
fork a place instead of updating in place to avoid impacting
historical transactional data, you can update the external_id in
place (and also via Fork)
The external_id becomes indexed by our search index so you can
search by it, and you can also use it as a filter on the list
endpoint.
This functionality becomes particularily useful if you combine it
with the newly extended corresponding external_id functionality
when creating bookings.
When you create a booking, you can pass an external_id
alongside each stop’s attributes. When given, we will look up the
most recently created, non-archived place that belongs to the same
customer and assign that to the stop.
When such a place does not yet exist, we will automatically create it instead using the address data given, and on the next booking creation it will be re-used as described above.
Please note that we do not update a previously created, matching place. If you want to update the location address data of a place, in our system that is handled as a new place via the fork mechanism, to keep historical transactional records correct.
You have three options if you want to ensure changed location data get propagated into a place:
- Change the
external_idon your side based on the new location - Remove the
external_idon existing places with old location data - Archive existing places with the same
external_id
Any of these will trigger a new place to be created on the next booking creation event based on the location data given on the stop at the time. You can also omit latitude & longitude if you want to utilize our Geocoding features when you do not have GPS coordinates for your location in your system.
We will also soon add equivalent functionality to the endpoints for adding individual stops into existing bookings and tours: