Sync updated orders from Neto to Salesforce
UtilitiesDeveloperCRMMarketingSales
What it does
When a scheduled interval triggers, this automation fetches modified orders from Neto and syncs them into Salesforce as cart and cart item records. If a cart or cart item is missing in Salesforce, it recreates the record so the data stays current.
Who it's for
Sales operations teams who need Neto orders reflected in Salesforce without manual entry.
How teams use this
Keep Salesforce carts current with Neto
Run the sync on a schedule so every cart and cart item updated in Neto appears in Salesforce without anyone having to push data manually. The team sees live order data in their CRM.
Recreate missing cart records automatically
If a cart or cart item is deleted in Salesforce by mistake, this automation detects the gap and recreates it from Neto on the next run. Data integrity is maintained without manual recovery.
Sync only orders placed after a certain date
Add a date filter to the Neto API call so only orders placed after a cutoff are synced into Salesforce. This reduces noise and focuses the sync on recent activity.
Alert the team when sync fails
Include a notification step that sends a message to a Slack channel if the sync encounters an error or if a cart cannot be found in Salesforce. The team can investigate and fix the issue quickly.
How it works
- Run on a scheduled interval. This automation runs at a specified time to check for updated orders in Neto and sync them into Salesforce.
- Fetch modified orders from Neto. Query PostgreSQL for rows in the neto_sync table, then call the Neto API via Rest to retrieve all modified carts since the last sync completed.
- Search for existing carts and contacts. Search Salesforce for cart records matching the Neto orders and find the contact who owns each cart so the sync knows where to update or create records.
- Update or recreate cart records. For each modified order, update the matching Salesforce cart and cart item records. If a cart or cart item does not exist, create it so Salesforce stays in sync with Neto.
- Log the sync completion. Update the neto_sync table in PostgreSQL to record that this batch of orders was synced, so the next run knows where to start.