RequestPolicyApprovalExecutionReceipt
Tessra
Customer refund
Credit / goodwill flow with amount bands. Test allow first (small amount), then approval-band once Slack is wired.
Bands (example)
- ≤100 USD — allow
- 101–500 — require approval
- >500 — deny
Policy
CALL APP.UPSERT_ORG_POLICY_RULE(
'customer.credit_issue','prod',1,'<=',100,'ALLOW',TRUE);
CALL APP.UPSERT_ORG_POLICY_RULE(
'customer.credit_issue','prod',2,'<=',500,'REQUIRE_APPROVAL',TRUE);
CALL APP.UPSERT_ORG_POLICY_RULE(
'customer.credit_issue','prod',3,'>',500,'DENY',TRUE);Allow-band request
CALL APP.REQUEST_ACTION(
'customer.credit_issue',
PARSE_JSON('{"customer_id":"c_123","amount":50,"currency":"USD"}'),
'prod','','ops@example.com','Goodwill','idem_cr_01',
'<HARNESS_SECRET>','https://api.tessra.ai'
);Poll + receipt
CALL APP.GET_ACTION_STATUS(
'<INTENT_ID>','https://api.tessra.ai','<HARNESS_SECRET>'
);SELECT *
FROM APP.RECEIPTS_VIEW
ORDER BY created_at DESC
LIMIT 10;