Generate sales report CSV from InRiver webhook

Developer ToolAPI IntegrationMarketingWorkatoRecipe ToolsData ParserUtilities

What it does

When someone sends a sales report via webhook, this automation parses the incoming data and transforms it into a CSV file. The CSV is emailed so the team has the formatted report ready to use.

Who it's for

Sales operations teams who need to convert InRiver product data into sales reports without manual formatting.

How teams use this

Automate weekly sales reporting

Trigger the report on a schedule so the CSV is generated and emailed every week without manual data export from InRiver. The team gets consistent, formatted reports on time.

Route reports to regional leads

Filter the webhook data by region and send each CSV to the corresponding regional manager instead of one inbox. Only the email recipients and filter condition change.

Add margin and discount columns

Extend the JavaScript transformation to calculate margin and include discount tiers in the CSV output. The webhook and email steps stay the same, only the data fields expand.

How it works

  1. Receive sales report webhook. An HTTP webhook receives the sales report in real-time from InRiver with product and pricing data included in the payload.
  2. Parse the incoming data. Json Parser extracts the document from the webhook payload so the data can be transformed and formatted for the report.
  3. Transform data with code. Run custom JavaScript code to reshape the data into the structure needed for the CSV, including pricing and regional fields.
  4. Compose the CSV file. Csv Parser converts the transformed data into a CSV format ready for spreadsheet import and analysis by the sales team.
  5. Email the CSV report. Send the formatted CSV file via email so the team receives the sales report with current pricing data.