Skip to main content

How Alrik works

Alrik Connect is where deliveries from your branches are planned and run. Your integration connects the system where your sales orders live — an ERP, WMS, webshop or TMS — to that delivery flow, so nobody has to retype orders into Connect.

This page explains the moving parts. The other guides assume you know them.

Who does what​

WhoDoes
Your systemSends orders, amends or cancels them, and reads back where they have got to
PlannerA person at the branch, working in Alrik Connect. Reviews incoming orders and plans them onto tours
DriverRuns a tour in the Alrik driver app — arriving, loading, unloading, capturing proof of delivery
External carrierA haulier that takes a delivery instead of the branch's own fleet. Reports progress through its own TMS

Everything happens at a location — a branch, store or warehouse. Your integration is allowed to act on a fixed set of them, and you name each one by an origin_reference you chose. See Locations.

The life of a delivery​

  1. Your system sends an order. It arrives in Connect as an order draft and waits in the planner's inbox for review.
  2. A planner plans it. The draft is converted into an order, and its pickup and dropoff become two stops on a tour — one driver, one vehicle, one day. Several orders can share a tour.
  3. The tour runs. The driver works through the stops in the driver app, or the delivery goes to an external carrier whose TMS reports progress instead. Each step is timestamped as it happens.
  4. It is delivered. Proof of delivery is attached, and the delivery gets a cost — calculated by Alrik for your own fleet, or reported by the carrier. See Bill customers for transport.

A draft cancelled before it is planned never becomes an order. It stays visible as a closed draft.

How your system stays in step​

Your integration talks to Alrik in both directions:

  • You call Alrik to create, change and cancel orders, and to read their status, tours and costs.
  • Alrik calls you with callback events as the delivery moves, so you do not have to poll.

The identifiers​

Each one names a different thing, and not all of them are unique.

IdentifierNamesChosen byUnique
origin_referenceA locationYouYes
origin_order_numberAn order, in your termsYouNo — Alrik does not deduplicate it
order_draft_idAn order, in Alrik's termsAlrikYes
tour_idA tourAlrikYes
access_tokenAn order handed to a carrierAlrikYes
Your order number is not a key

Sending the same origin_order_number twice creates two orders. Store the order_draft_id Alrik returns and use it whenever you need to be certain which order you mean. See Send orders from your ERP.

In callback payloads your order number appears as origin_order_id — the same value under a different name.

Which endpoint answers which question​

You want to knowRead
Did my order arrive, and has it been planned yet?Order drafts
Where is one order right now?Get an order
What is on the road today?Active tours
What did each delivery cost?Company orders
Where did that cost come from?Billable tours
How is each branch performing?Engagement statistics

Next​