Let the support agent refund up to $50
Give the support agent a standing Mandate to refund small amounts, so only the larger refunds wait for your yes.
Give the Customer Lead a Mandate to refund up to $50 without asking. Anything larger becomes an Approval with the Conversation attached.
What you get
- 1$50 cap on each refundLimit
- 1standing permission for the support agent to refund up to itMandate
- 1request to you for any refund over $50, with the customer’s conversation attachedApproval
- 1line in your books for each refundEntry
- 1money back on the card or account the customer paid withOrder
Your agent does
You, to your agent
Let the support agent refund up to $50 without asking.
Stop asking me about small refunds.
Refunds under $50 are fine, do them without me.
# 1. Limit.create
LIMIT= $(curl -X POST https: //api.sb/ leaseline.app/ limits \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"amount": {"amount": 50, "currency": "USD"}}' | jq -r '.limit["$id"] | split("/ ") | last')
# 2. Mandate.authorize
curl -X POST https: //api.sb/ leaseline.app/ mandates/ authorize \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"agent": "agent_customer_lead", "verb": "Order.refund", "limit": "'"$LIMIT"'", "topics": ["refund"]}'
import { $ } from 'startup-builder'
const limit = await $.Limit.create({ amount: { amount: 50, currency: 'USD' } })
await $.Mandate.authorize({ agent: 'agent_customer_lead', verb: 'Order.refund', limit: limit.$id, topics: ['refund'] })
LIMIT= $(npx startup-builder do Limit.create --json '{"amount": {"amount": 50, "currency": "USD"}}' | jq -r '.limit["$id"] | split("/ ") | last')
npx startup-builder do Mandate.authorize --json '{"agent": "agent_customer_lead", "verb": "Order.refund", "limit": "'"$LIMIT"'", "topics": ["refund"]}'
{
"name": "do",
"arguments": {
"code": "const limit = await $.Limit.create({ amount: { amount: 50, currency: 'USD' } })\nreturn await $.Mandate.authorize({ agent: 'agent_customer_lead', verb: 'Order.refund', limit: limit.$id, topics: ['refund'] })"
}
}
Change it
- Cap it at $500 of refunds a week.
- Ask me for any refund on an annual plan.
- Take the refund Mandate away.