How to set up Salesforce
Cargo connects to Salesforce in one of two ways:- OAuth 2 (default) — sign in with a Salesforce user and authorize Cargo. Cargo acts as that user.
- Client credentials — Cargo uses a connected app and acts as the app’s run-as user. Use this to connect with a Salesforce Integration User, which is API-only and can’t sign in through OAuth.
Connect with client credentials
- In Salesforce Setup, create a connected app (or an external client app) with OAuth enabled and the
apiscope. - Turn on Enable Client Credentials Flow.
- In the app’s policies, set Run As to the user Cargo should act as, for example your integration user.
- Give that user a permission set covering the objects and fields Cargo reads and writes. Calls fail on anything it can’t access.
- In Cargo, create a Salesforce connector, choose Client credentials, and enter your My Domain URL (Setup → My Domain, e.g.
https://acme.my.salesforce.com), the app’s Consumer Key, and its Consumer Secret.
- Set up a Salesforce data model — Create data models from your Salesforce objects to trigger Plays and power model search actions.
- Use Salesforce in workflows — Choose Salesforce from the node catalog within a Play, Tool, or Agent.
Salesforce actions
Insert record
Insert a new record into Salesforce. Use cases- Lead capture – Create new leads from various sources and channels
- Contact creation – Add new contacts from forms, events, or imports
- Opportunity creation – Create new opportunities to track deals through your pipeline
Find record
Retrieve a single record from Salesforce by its unique ID. Use cases- Record lookup – Get specific record details for processing workflows
- Data validation – Verify record existence before performing operations
Match record
Check if a record exists in Salesforce based on matching criteria. Use cases- Duplicate prevention – Avoid creating duplicate records
- Smart routing – Route records based on existing data
Use Match record before Insert record to implement an upsert pattern
for single records.
Find records
Find records matching the given criteria. Define multiple matching criteria—the action searches for records that match any of the provided values. Empty values are automatically skipped. Use cases- Multi-identifier matching – Search by domain, LinkedIn URL, or company name
- Flexible lookups – Find records using whichever identifiers are available
- Data quality handling – Provide multiple identifiers to maximize match rates
Search records
Retrieve multiple records from Salesforce using SOQL-based search criteria. Use cases- Advanced filtering – Find records meeting specific criteria
- Bulk operations – Retrieve multiple records for processing inside a group node
- Cross-object queries – Search across related objects using Salesforce relationships
Update record
Update an existing record in Salesforce. Use cases- Data enrichment – Keep record information current and accurate
- Lifecycle management – Update lead status, opportunity stages, and case statuses
- Field updates – Modify any standard or custom field values
Upsert records
Upsert multiple records into Salesforce (insert or update based on external ID or matching criteria). Use cases- Bulk data operations – Insert records in bulk while avoiding duplicates
- Data synchronization – Keep external systems synchronized with Salesforce
- Migration workflows – Import data from other systems using external IDs
Delete record
Delete a record from Salesforce. Use cases- Data cleanup – Remove outdated or incorrect records programmatically or in batches
Salesforce data models
Cargo allows you to create data models on top of your Salesforce CRM data that can be used to trigger Plays and power model search actions.Creating Salesforce data models
Object types available
Lead models
Lead models
Use cases - Handle inbound and outbound lead information - Track lead
sources, campaigns, and conversion paths - Manage lead qualification and
scoring workflows
Contact models
Contact models
Use cases - Manage contact records associated with accounts - Track
individual engagement and communication history - Handle multi-contact
relationships within accounts
Account models
Account models
Use cases - Manage company and organization records - Track account
hierarchies and parent-child relationships - Monitor account health scores
and engagement metrics
Opportunity models
Opportunity models
Use cases - Track deals through pipeline stages - Monitor forecasting,
close dates, and deal amounts - Analyze win rates and sales cycle metrics
Case models
Case models
Use cases - Track customer support cases and issues - Monitor case
resolution times and escalation paths - Analyze support trends and agent
performance

