cancel_order
ChatGPTCancels a delivery. IRREVERSIBLE — the courier is stood down and the order cannot be reinstated. Only call this after the customer has named or clearly identified the order AND explicitly asked for it to be cancelled; never on a vague or implied request. If it reports CANCELLATION_UNCONFIRMED, do not call it again: check the order with get_order and tell the customer what you find.
check_order_cancellable
ChatGPTAsks whether an order can still be cancelled, and why not if it cannot. Free and read-only — check this before promising the customer a cancellation. If checked is false the answer is UNKNOWN, not no: Parcel could not be asked, which is normal in the first moments after an order is created. In that case go ahead and call cancel_order if the customer asked for it, and report what that says.
confirm_order_draft
ChatGPTRecords that the customer agreed to this exact draft, and returns a confirmationToken. NO EXTERNAL EFFECT: this creates nothing, dispatches nothing and charges nothing — it only issues the token that create_delivery_order will demand. The token is bound to the draft as it stands, so any later edit voids it and the customer must confirm again. Call this only after the customer has explicitly agreed, either by pressing Confirm on the card or by saying yes to the full summary in chat.
create_delivery_order
ChatGPTSubmits the confirmed draft to Parcel, which books the delivery and assigns a courier. The order can be cancelled afterwards with cancel_order while check_order_cancellable still allows it. Only works on a draft that confirm_order_draft has already confirmed, and only while nothing has changed since — so it cannot be used to test whether something would work. Calling it twice with the same token is a no-op, not a second delivery. When telling the customer their order number, quote orderId (the short numeric one that list_orders and cancel_order use), not orderReference.
get_branch_delivery_options
ChatGPTVehicles valid for instant delivery at this branch, and whether instant is offered at all. Never guess a vehicle name.
get_branch_locations
ChatGPTPickup locations registered for this branch — the customer NEVER types a pickup address, they choose from here. Call this before confirming, name the default to the customer and ask them to confirm it or pick another from the list. The default is used unless they pick another.
get_customer_profile
ChatGPTThe name of the Parcel business account this conversation is linked to, and the region it operates in. Use it to tell the customer which account an order will be placed on. Returns no email address, no phone number and no account identifier — none of those are needed to place or track a delivery.
get_next_day_slots
ChatGPTThe pickup and delivery windows a branch offers for next-day delivery, with the ids needed to book them. Call this when the customer wants delivery tomorrow, read the windows back to them, and pass the two ids they choose to update_order_draft as nextDaySlots. If orderable is false this branch does not do next-day: say so and offer instant or same day instead.
get_order
ChatGPTStatus and tracking links for an order already created on this account.
get_package_status
ChatGPTWhether this account has an active pricing package, and its rates. Explains pricing — it does not predict what an order will cost; the charge is only known after creation.
get_webhook_config
ChatGPTThe webhook URL configured for this account and whether a signing secret is set. The secret itself is never returned. Read-only: changing the webhook is not available here.
list_bahrain_blocks
ChatGPTChecks a Bahraini block number or area name against the active block list. Confirms a block exists; it does NOT give a delivery location — coordinates still come from resolve_delivery_address.
list_branch_vehicles
ChatGPTVehicle names with their labels, guidance text and any surcharge — for explaining the choices to a customer. get_branch_delivery_options remains the authority on what can actually be ordered.
list_branches
ChatGPTActive branches on the connected account. A branch id is only valid if it came from here. If onlyOne is true, use it without asking.
list_orders
ChatGPTRecent orders on this account, newest first, with status and tracking links. Use this to find an order the customer is describing rather than asking them for an id. Recipient phone numbers are not returned; ask the customer for the one they mean rather than reading contact details back to them.
remove_draft_delivery
ChatGPTRemoves one recipient from the draft by name, for when the customer changes their mind about who is receiving something. NO EXTERNAL EFFECT: the draft is held on this server, so nothing is cancelled at Parcel and no courier is affected — use cancel_order for an order that already exists. Only call this when the customer has asked for that recipient to be dropped. If the order has one recipient and they should go somewhere else instead, correct the address with update_order_draft rather than removing and re-adding.
resolve_delivery_address
ChatGPTTurns a Bahraini delivery address into coordinates, from the national address data. ASK FOR BUILDING, ROAD AND BLOCK — that is how Bahraini addresses are written and the only form that resolves to an exact door, e.g. "building 1787, road 1631, block 1216". Pass any flat or floor number in the same string. If it returns candidates, show them and let the customer pick — they are real addresses. If it returns precision "block", the exact building could not be pinned and the driver will be sent to the centre of the block: you MUST tell the customer this, in the words of the returned notice, before building the order. If it returns needs_confirmation, ASK the customer — do not proceed and never supply coordinates yourself.
show_order_confirmation
ChatGPTDisplays the prepared draft to the customer as a confirmation card. DISPLAY ONLY: nothing is created, dispatched, charged or sent to Parcel by showing it. Call this once the draft is complete; the customer confirms from the card, which then calls confirm_order_draft and create_delivery_order in turn.
update_order_draft
ChatGPTRecords delivery details on a private draft held on this server, and returns what is still missing. NO EXTERNAL EFFECT: this does not create an order, does not dispatch a courier, does not charge anyone, does not notify anyone, and sends nothing to Parcel — it only reads Parcel to validate the branch, vehicle and pickup location. The draft is not actionable until create_delivery_order runs. Safe to call repeatedly, and safe to retry. Fields given REPLACE what was there and fields left out are kept. Recipients are matched by name: giving a name already on the order corrects that recipient, a new name is added alongside. Nothing is ever removed here — use remove_draft_delivery to take a recipient off the order. For the delivery address prefer addressRef from resolve_delivery_address over repeating the address and coordinates.