A reason asked when a document is rejected
The customer asks: The approver must give a reason when rejecting a purchase order, and it is kept on the document
- Verdict: Ready, with limits (4)
- Door: Desk action · area: Documents and print › Approvals
- Recipe: A button on a Desk record (a Desk action)
- Sample: S11 — price-change approvals with a nightly export
- Checked: laptop 2026-10-16 · S11's reject, 6 tests (the reason before the workflow, a second press, a short reason, a refused transition, a lost answer) · not run on a shop
What you build
A Desk action Reject with reason on the document with one required input, Reason (Small Text). Your service writes the reason and who pressed into fields your manifest added, then moves the document with the shop's workflow call (apply_workflow); a save rule, added with the button, refuses a rejected document with no reason. Recipe section A reason asked before a document is rejected; sample S11's reject.
Limits
- The user presses the action instead of the workflow's own reject button. Take the reject transition away from those roles (configuration), or that button still rejects without a reason.
- A user presses it: nothing asks for a reason when a document is rejected another way (an import, the API).
- Your service rejects with its own key, as its integration user: that user's role needs the reject transition, and the workflow records that user. Write the pressing user (the context carries it) into a field if the audit trail must show who rejected.
- Your service must be up: when it is down the button says so and nothing is rejected.
Tell the customer
The approver is asked for a reason in a dialog when rejecting, and the reason is kept on the document.
What next
- Tell the customer the 4 limits above, and write them into the proposal.
- Follow the recipe: A button on a Desk record (a Desk action).
- Copy the sample: S11 — price-change approvals with a nightly export, and change it.
- Build and test it on your sandbox (request one if you have none; what is on it).
- Run the checks: your own tests, the kit's checks and the money kit's release gate (testing and release).
- Release through the customer's own release gate (14. Testing and release); an app other shops install goes through the App library.
Related needs
- Purchase orders or transfers over an amount need approval — Ready, with limits (1)
- A button on a record that rechecks stock in our ERP or assigns a pick route — Ready, with limits (1)
- An e-mail at each approval step with the purchase order's PDF attached, and the uploaded CSV — Ready, with limits (4)
- Each store's purchase orders or transfers are approved by that store's manager — Ready, with limits (1)
Start a project shortlist with this need · Put it in your blueprint · Every need