➡️ Something didn't went as planned? No problem, you can cancel the order.
Sometimes things don't work out as planned an order needs to be canceled – the reasons for this can be manifold.
With
you can cancel orders depending on if you prefer to work with the unique order number or the unique pickup code.
Cancel – short facts:
• Cancel = all related and already input articles get unreserved (by the Robot).
• Cancel = the order won't be deleted, instead it stays stored in the system.
• Cancel = the unique orderNumber will stay with this order and can be accessed any time.
• Cancel = the customer can be notified by E-Mail via the API. Therefore, the correct cancel reason must be selected by you.
What you need
✅ Your API Key for authentication in the authentication header.
✅ Either the unique orderNumber
or pickupCode
depending on how you prefer to target the order in the Path Parameters.
Body Parameters
-
outputLocation
– depending on the physical pharmacy layout and installed hardware, you will have multiple possibilities to dispense the articles.
For example: 2 different locations in the front office and one location in the back office. Each of those 3 locations has a unique ID to target it. This will allow you to dispense the order exactly where you need it the most. -
cancellationReason
– here you need to select the reason for this particular cancellation.
The API already includes some common reasons that we encountered in reality the most. This might change in the future so new reasons might be added.
⬇️ Available reasons
Reason | Explanation |
---|---|
CUSTOMER_NOT_RESPONDING | This can be used if the Customer is not responding, not picking up the order and ist not reachable anymore. |
DELIVERY_ISSUE | This can be used if something went wrong with the ordering or delivery. Examples could be wholesaler can not deliver on time, article got discontinued, is not available etc. |
CUSTOMER_WISH | This can be used if the Customer asks for cancellation e.g. the customer does not need the product(s) anymore or already got it somewhere else faster. |
STORAGE_ISSUE | This can be used if the pharmacy notices that the ordered article(s) do not fit into the commissioning robot. It happens that some articles are bigger In size that the robot is capable of. |
OTHER | Everything else, custom reason that needs to be specified in detailedCancellationReason |
-
detailledCancellationReason
– ifcancellationReason
is set to the valueOTHER
, you can specify the reason within this field. -
sendCancellationEmail
– if the boolean is set totrue
the API will send a E-Mail to the Customer informing about the cancellation. If set tofalse
the Customer won´t receive a E-Mail via the API. This can be used if you like the implement your own way of informing the customer.
Hands on with the endpoint
The Body Parameters for both Cancel a pickup order by order number and Cancel a pickup order by pickup code are the same.
The only difference is in the Path Parameters – either you pass the orderNumber
or the pickupCode
.
Example Response
{
"orderNumber": "123789",
"requestCustomerToFillData": false,
"relatedNotes": "",
"dosageInformation": "",
"state": "CANCELED",
"creationDate": "2022-02-02T09:35:11.0601996+00:00",
"lastUpdateDate": null,
"pickedUpDate": null,
"canceledDate": "2022-02-02T09:35:59.2495973+00:00",
"firstInputDate": null,
"isOverdue": false,
"pickupCode": "customer_8E439647762A4F21A8D978C169568B61",
"storageCode": "pickup_22A093AE26BE49B0BD191C5F2BFD01BB",
"cancellationReason": "CUSTOMER_WISH"
}
The response contains the complete order status with details like creationDate
or even the dosageInformation
.
Two parts should be highlighted here: state and cancellationReason.
▶️ "state": "CANCELED"
gives you the current order status. As we just cancelled the order, it is now in the state canceled.
▶️ "cancellationReason": "CUSTOMER_WISH"
represents the cancellation reason you have just selected when cancelling the order. If you have selected an other reason, the reason might be different in your response.
Cancellation E-Mails
As mentioned above, it is possible that the API automatically sends out an E-Mail to inform the customer if the order has been canceled.
As there are different reasons to cancel the order, each reasons is paired with a matching E-Mail.
ℹ️All Cancellation E-Mails are available and documented here: E-Mails via API (and the Pickup Cloud)
This includes all text content as well as an example E-Mail to see how they will render on customer site.
Summary and Scheme
Summary and Scheme
The Cancellation consists mostly of one operation that triggers two more.
- The order gets cancelled (either via the API or via the Pickup Cloud Web App)
- If articles were already stored in the robot they get dispensed (you can select where they get dispensed at your pharmacy)
- The customer can get informed via E-Mail if you like to. This will be done automatically via the API and we take take care of it – or you can inform the customer on your own way if you prefer it this way.