Sync products to Salesforce from webhook
Developer ToolAPI IntegrationMarketingRecipe ToolsCRM
What it does
When someone sends a product event via webhook with message type CATALOGUE_PRODUCT, this automation validates prices and product code. It upserts the product to Salesforce, retries up to three times on error, then logs the outcome.
Who it's for
Sales operations teams who need to keep Salesforce product records in sync with incoming webhook events.
Apps used
How teams use this
Sync new products from catalog to Salesforce
When a product is added to the catalog system, the webhook sends it to Salesforce automatically with prices and product code validated. The team sees real-time updates without manual entry.
Update product prices in Salesforce
When prices change in the source system, the webhook triggers an upsert that refreshes the Salesforce product record with new pricing data. Sales reps always see current prices.
Add product category validation before sync
Extend this automation to check that the product category is set and matches an approved list before upserting to Salesforce. Only valid products sync to the CRM.
Route failed syncs to a review queue
Add conditional routing so products that fail after three retries are logged to a separate queue for manual review instead of the standard job report. The team catches sync issues faster.
How it works
- Receive product event via webhook. Listen for incoming HTTP webhook events in real time and check if the message type contains CATALOGUE_PRODUCT to proceed with validation.
- Validate prices and product code. Check that prices are present and product code exists in the webhook payload before moving forward with the Salesforce upsert operation.
- Process prices with Ruby code. Execute Ruby code to accumulate and transform the prices list into the format Salesforce expects for the product record update.
- Upsert product in Salesforce. Create or update the product record in Salesforce with the validated data. If an error occurs, retry up to three times before logging the result.
- Log the result to job report. Record the final outcome of the upsert operation in the job report so the team can track which products synced successfully or failed.