Sync Salesforce opportunity refunds to Box

CRMMarketingRecipe ToolsDocument/File

What it does

When a scheduled interval triggers, this automation searches Salesforce for opportunity field history using a SOQL query. It checks a lookup table for errors, and when records are found, it processes each one to accumulate refund data.

Who it's for

Finance teams who need to track Salesforce opportunity refunds on a recurring schedule.

How teams use this

Track refunds on a daily schedule

Run the Salesforce opportunity search every morning to find refund-related field changes. The lookup table flags errors so the team knows when a batch failed.

Monitor refunds across sales regions

Adjust the SOQL WHERE clause to filter by region or sales team so each group sees only their refund records. The automation runs the same way for each region.

Add email notification on errors

Include an email step that sends a summary to the finance team when the error flag is true. Set the condition to only send when errors are detected.

How it works

  1. Search opportunity field history on schedule. On a specified interval, run a SOQL query in Salesforce to find opportunity field history records that match the WHERE clause criteria for refund tracking.
  2. Look up error flag status. Query the FileData_Append_Status lookup table in Workato Service to check if an error flag was set from a prior batch run of this automation.
  3. Process each opportunity record. For each opportunity field history record found, check if an order number is present and accumulate the items into a list for the next step.
  4. Store refund data in Box. Send the accumulated refund records to Box as a file so the finance team can access the batch results.