Update your systems as deliveries progress
Once an order is in Alrik, the interesting things happen there: a planner puts it on a tour, the tour is locked for the day, the warehouse is told what to pick, the driver delivers and captures a signature. Your ERP or WMS usually needs to know about each of these.
Rather than asking Alrik over and over, have Alrik call your system as each thing happens. These calls are callback events.
What you will build
- An endpoint in your system that receives events from Alrik.
- Updates in your ERP or WMS driven by those events — order status, picking lists, delivery confirmation, proof of delivery.
1. Choose the events you need
Events are switched on per integration, so you only receive what you ask for. Start from what your system needs to do:
| Your system needs to | Events |
|---|---|
| Mark an order as planned, and know its date and vehicle | tour_created, tour_updated |
| Start picking for a tour, or a single order | tour_packable, stop_packable |
| Know the plan for a day is final | tour_locked |
| Notice an order taken off its tour, or moved to another day | stop_detached, order_manually_rescheduled |
| Close the order as delivered | order_fulfilled, tour_fulfilled |
| Store the signature or photo | pod_created |
| Read what the driver noted on site | driver_comment |
The full list, and what each event carries, is in Callback events.
2. Build an endpoint to receive them
Alrik sends each event as an HTTP POST with a JSON body to an address you
give it. A few rules make a receiver reliable:
- Answer fast. Acknowledge the request straight away and do the work afterwards.
- Match on your order number. Most events carry it as
origin_order_id— the same value you sent asorigin_order_number, under a different name. - Expect events out of order. They are sent independently, so a later event can arrive first. Use the event's content, not its arrival order, to decide what is current.
- Ignore what you do not recognise. Payloads can gain fields, so do not reject unknown ones.
3. Switch it on
Give Alrik the endpoint address and the events you chose during onboarding, or
later through tech@alrik.com.
4. Reconcile now and then
Callbacks are the fast path, not the only one. If your endpoint was down, or you want to be certain nothing was missed, compare against order drafts for a recent window — it shows which orders were planned and which were cancelled.
Related
- Callback events — every event and its payload
- Send orders from your ERP
- Show customers where their delivery is