How to Auto-Quote Shippit Rates and Show Checkout Shipping Options
Build a Spojit workflow where your checkout page posts a cart's destination and weight to a Webhook trigger, calls get-quotes on the Shippit connector, and returns ranked delivery options back to the page with a Response node.
What This Integration Does
When a shopper reaches your checkout, they expect to see live delivery options and prices for their exact address and basket, not a flat rate or a stale guess. This workflow lets your storefront ask Spojit for a real Shippit quote at the moment of checkout: it sends the delivery postcode, suburb, state, and parcel weight, Spojit fetches carrier rates through the Shippit get-quotes tool, and it hands back a clean, sorted list of options (service name, courier, price, estimated days) that your page renders as selectable shipping choices.
The run is synchronous and short-lived. A storefront makes an HTTP POST to the workflow's Webhook URL, the workflow runs through quote and ranking steps in line, and a Response node returns the final JSON to the same caller before the connection closes. Nothing is stored: each call is stateless, so a re-quote (shopper edits the cart or address) simply starts a fresh run with the new body. Because the caller waits for the answer, keep the path lean: one connector call plus light reshaping.
Prerequisites
- A Shippit connection added under Connections, authenticated with your Shippit API key so the connector can call
get-quotes. - A signing connection for the Webhook trigger (scheme Spojit or Custom) so incoming checkout requests are verified by HMAC. See the connections setup below.
- Your storefront or checkout able to make a server-side HTTP POST and read the JSON response (a browser fetch from the checkout page works, but signing is best done server-side to protect the secret).
- Your Shippit merchant origin (pickup) address configured in Shippit, since quotes are priced from your dispatch location to the shopper's destination.
Step 1: Add a Webhook trigger that receives the cart
Create a new workflow and set the Trigger node type to Webhook. Attach a signing connection (scheme Spojit or Custom) so each request is verified by HMAC before the workflow runs. Spojit gives you the workflow's Webhook URL: your checkout posts to it. The trigger output is the parsed JSON body, available as {{ input }}. Have your checkout send a body shaped like this:
{
"dropoff_postcode": "3000",
"dropoff_state": "VIC",
"dropoff_suburb": "Melbourne",
"parcels": [
{ "qty": 1, "weight": 2.5 }
]
}
Use {{ input.dropoff_postcode }}, {{ input.dropoff_suburb }}, {{ input.dropoff_state }}, and {{ input.parcels }} downstream. Weight is in kilograms per parcel.
Step 2: Call get-quotes on the Shippit connector in Direct mode
Add a Connector node, choose the Shippit connector, and set it to Direct mode so you deterministically call exactly one tool with no AI cost. Pick the get-quotes tool. It takes a single quote object describing the destination and parcel attributes. Map it from the trigger body:
{
"quote": {
"dropoff_postcode": "{{ input.dropoff_postcode }}",
"dropoff_state": "{{ input.dropoff_state }}",
"dropoff_suburb": "{{ input.dropoff_suburb }}",
"parcel_attributes": [
{ "qty": 1, "weight": 2.5 }
]
}
}
If your cart can hold several parcels, build parcel_attributes from {{ input.parcels }} (see Step 3). Bind the result to an output variable such as quotes so later steps read {{ quotes.data }}. The tool returns the carrier quotes Shippit found for that destination and weight.
Step 3: Shape the parcel list with a Transform node
If your checkout sends a flexible parcels array, normalize it into the parcel_attributes shape Shippit expects before the connector call. Add a Transform node ahead of the Connector node to map each cart line into { qty, weight } and drop anything Shippit does not need. If your store always ships a single combined parcel, you can instead sum the line weights here and emit one { qty: 1, weight: entry. Reference the cleaned array from the Connector node as {{ parcelList }} (or whatever output variable you name) so the quote request stays tidy and predictable.
Step 4: Rank the returned options with a Transform node
Add a second Transform node after the Connector node to turn the raw Shippit quote payload into a compact, sorted list your checkout can render directly. Read the quote response from {{ quotes.data }}, keep only the fields the page needs (service name, courier, price, estimated delivery days), and sort ascending by price so the cheapest option appears first. Produce an output variable such as options shaped like this:
{
"options": [
{ "service": "Standard", "courier": "...", "price": 9.95, "etaDays": 3 },
{ "service": "Express", "courier": "...", "price": 14.50, "etaDays": 1 }
]
}
Doing the ranking server-side in Spojit means the checkout page does not have to parse carrier-specific fields, and you control the display order in one place.
Step 5: Return the options with a Response node
Add a Response node as the final step. Because the Webhook trigger caller is waiting synchronously, the Response node is what sends a value back to the checkout before the connection closes. Return your ranked list and a small status wrapper so the page can branch on success:
{
"ok": true,
"options": {{ options }}
}
The checkout reads options and renders one selectable shipping choice per entry. Keep the payload small and free of internal fields: only what the page displays.
Step 6: Handle an empty or failed quote gracefully
Before the Response node, add a Condition node that checks whether {{ options }} is non-empty. On the branch where no carrier returned a rate (out-of-range postcode, missing weight, carrier outage), route to a Response node that returns a friendly fallback instead of an empty list, for example:
{
"ok": false,
"message": "No live rates available for this address",
"options": []
}
Your checkout can then show a default flat rate or ask the shopper to re-check their address, rather than rendering a blank shipping section. This keeps a single bad quote from blocking the whole checkout.
Tips
- Use Direct mode for the
get-quotescall. Quoting is one deterministic tool call, so you avoid AI credits and get a faster, more predictable response on the synchronous path. - Keep the workflow short. Every node between the Webhook trigger and the Response node adds latency the shopper feels. Quote, rank, respond.
- Send weight in kilograms and always include a sensible default if a product is missing its weight, so Shippit never receives a zero-weight parcel.
- If you also want to book the chosen carrier later, the same Shippit connection exposes
create-orderandbook-orderin a separate fulfilment workflow, keeping the quote path lean.
Common Pitfalls
- Missing destination fields. Shippit needs
dropoff_postcode,dropoff_suburb, anddropoff_statetogether. A postcode alone often returns no rates. Validate these on the page before posting. - Unsigned requests. If the Webhook trigger has a signing connection but the checkout does not send the matching HMAC signature, the call is rejected before your steps run. Sign server-side and keep the secret off the page.
- Wrong parcel shape. The connector expects
parcel_attributes(withqtyandweight) inside thequoteobject, not your raw cart array. Reshape it in the Transform node first. - Treating quote prices as final. Live quotes can vary with carrier surcharges and dimensions. Show them as estimates and re-quote whenever the shopper changes address or basket, since each run is stateless.
Testing
Before wiring it into checkout, validate the workflow on a small scope. Post a single known address and one parcel to the Webhook URL (a signed test request from your server or a tool like curl) and confirm the Response body returns a sorted options list. Try an out-of-range or malformed postcode to confirm the Condition node routes to the fallback Response instead of an empty page. Check the run in the execution history to inspect the raw {{ quotes.data }} payload and confirm your ranking Transform keeps the right fields. You can also ask Miraxa, the intelligent layer across your automation, "Why did my last quote run return no options?" to investigate a failed run in context. Once the small scope behaves, point your checkout at the Webhook URL.