Start inputs
Salesforce discount approval
Passed by the calling system
Customer & Sales package
A Salesforce Flow submits an opportunity discount; tiers decide the approvers, the sales manager then finance approve, and the status goes back to Salesforce.
Connects to Salesforce
About this package
Salesforce opportunity discount approval gives your deal desk a clear, tiered approval without building approval processes in Salesforce. When a rep sets a discount and submits it, a record-triggered Flow (or a platform event subscriber) posts the Opportunity Id and the owner's email to the workflow.
The workflow reads the opportunity over the REST API (amount, stage, close date, term and the Discount_Percent__c / Discount_Approval_Status__c custom fields) and runs a SOQL query for its OpportunityLineItem records to see every product's list price, sales price and line discount. The Discount tiers decision table decides whether the discount is within the rep's authority, needs the sales manager or needs the sales manager and finance.
The sales manager's task has a Justification lookup from the Discount reason codes table, which fills in the normal ceiling and the evidence expected, and Approve / Reject buttons. Finance then confirms the approved discount for Tier 2 and Tier 3. The decision is written to the opportunity with PATCH (status, approved discount and notes) and the owner is emailed.
Starts from Salesforce: a record-triggered Flow on Opportunity (Discount_Approval_Status__c set to Submitted) calls the workflow webhook with the Opportunity Id and owner email.
Another system starts it over REST or an inbound webhook. No UI is needed; people only appear where a decision needs a human.
The flow
Discount submitted
A Salesforce Flow posts the Opportunity Id and owner email when a rep submits a discount.
Read the deal
GET /sobjects/Opportunity/{id} and a SOQL query on OpportunityLineItem give the amount, term and every product line.
Pick the tier
The Discount tiers table decides: within rep authority, sales manager, or sales manager and finance.
Sales manager approves
The manager picks a justification (its ceiling and evidence fill in), sets the approved discount and approves or rejects.
Finance confirms
Tier 2 and 3 discounts go to finance with the manager's decision and notes.
Update Salesforce
PATCH /sobjects/Opportunity/{id} sets Discount_Approval_Status__c and the approved discount; the owner is emailed.
Forms
The inputs a caller passes when it starts a run, and the forms people complete when the process needs a decision.
Start inputs
Passed by the calling system
User Task
Approve {{discount}}% discount: {{opportunity_name}} ({{currency}} {{amount}}) · 2-column grid · own header and theme
User Task
Finance: {{mgr.discount}}% discount on {{opportunity_name}} · 2-column grid · own header and theme
Headless
Every workflow can be started over REST, MCP or the CLI, whatever its trigger, with the sample input below. Runs start straight away on the published version; replace <workflow id> with the id the install created.
REST
curl -X POST "$USERTASKS_URL/api/v1/workflows/start" \
-H "Authorization: Bearer $USERTASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow_id":"<workflow id>","variables":{"opportunity_id":"0065g00000XyZ12AAB","owner_email":"sam.rivera@example.com","account_name":"Northwind Traders","submitted_by_name":"Sam Rivera"}}'CLI
usertasks workflows inputs <workflow id> # the start form: keys, types, required
usertasks workflows run <workflow id> --input opportunity_id=0065g00000XyZ12AAB --input owner_email=sam.rivera@example.com --input account_name="Northwind Traders" --input submitted_by_name="Sam Rivera" --waitInbound webhook
usertasks webhooks create <workflow id> # prints the hook slug and secret once
curl -X POST "$USERTASKS_URL/api/webhooks/inbound?hook=<slug>" \
-H "Authorization: Bearer <webhook secret>" -H "Content-Type: application/json" \
-d '{"opportunity_id":"0065g00000XyZ12AAB","owner_email":"sam.rivera@example.com","account_name":"Northwind Traders","submitted_by_name":"Sam Rivera"}'What's included
| Type | Name | Details |
|---|---|---|
| Email template | Discount approved | Sent to the opportunity owner when the discount is approved. |
| Email template | Discount not approved | Sent to the opportunity owner when the sales manager or finance rejects the discount. |
| Data table | Discount reason codes | Why a discount is justified, with the most each reason normally supports. The sales manager picks one in the approval form; its guidance and ceiling fill in. |
| Integration | Salesforce | Salesforce REST API (/services/data/v61.0). Use an OAuth access token from a connected app (client credentials or JWT bearer flow) for an integration user that can read opportunities and edit the discount approval fields. |
| API reference | Get opportunity | GET /sobjects/Opportunity/{{opportunity_id}} — Read the opportunity (GET /sobjects/Opportunity/{id}): name, amount, stage, close date, owner and the custom discount fields. |
| API reference | Query opportunity products | GET /query — SOQL query for the opportunity's products (GET /query?q=SELECT ... FROM OpportunityLineItem WHERE OpportunityId = ...): records, totalSize and done. |
| API reference | Update discount approval | PATCH /sobjects/Opportunity/{{opportunity_id}} — Write the decision to the opportunity (PATCH /sobjects/Opportunity/{id}): Discount_Approval_Status__c, the approved discount and approver notes. Salesforce answers 204 No Content. |
| Decision table | Discount tiers | 5 rules — Who approves a discount, by the discount percent and the deal amount. First matching rule wins. |
| Workflow | Salesforce discount approval | 28 steps — A Salesforce Flow posts the Opportunity Id when a rep submits a discount; the opportunity and its products are read, the Discount tiers table decides who approves, the sales manager and then finance approve or reject, and the status is written back to the opportunity. |
Discount reason codes · 5 sample rows
CodeReasonNormal ceiling (%)Evidence expectedNote for finance
Requirements
Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.
Integration “Salesforce”Required
Workflow “Salesforce discount approval” assigneesRequired
Install
Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.
curl -fLO https://usertasks.com/gallery/salesforce-discount-approval-1.0.0.utpkg
usertasks packages inspect salesforce-discount-approval-1.0.0.utpkg # offline: checksum, hashes, signature
usertasks packages install salesforce-discount-approval-1.0.0.utpkg --dry-run
usertasks packages install salesforce-discount-approval-1.0.0.utpkg # prompts for each requirement
usertasks packages install salesforce-discount-approval-1.0.0.utpkg --keep-incomplete --yes # in CI; finish with:
usertasks packages complete salesforce-discount-approval -f values.yamlVerify the download
shasum -a 256 salesforce-discount-approval-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.
Versions
Installing a newer version upgrades in place: local credentials and requirement values are kept, and changes you made are flagged first. How packages work
More packages
Customer & Sales Official
Enrich each inbound lead, score it with a routing table, create it in the CRM with its territory owner, and alert sales or start nurture.
Needs:REST APIInbound webhook
Customer & Sales Official
Agents log a complaint; the customer tier and an SLA matrix set response and resolution targets, with escalation, compensation approval and CRM case resolution.
Needs:REST APIAssigneesEmail
Customer & Sales Official
Log complaints against a simple customer CRM; tier and category set the priority and SLA, the customer is acknowledged and handlers resolve or escalate.
Nothing to configure: works as soon as it is installed