Tips and Tricks with Salesforce triggers and actions

Last updated:


How Salesforce objects and records work with Zapier
Using the new outbound message trigger
Using the find object by query search
Updating an object with another object
I want to select more than one value from the dropdown field
Create a link to your Salesforce objects

How Salesforce objects and records work with Zapier

Standard objects are objects included with Salesforce such as account, contact, lead, opportunity, and other common business objects. You can think of an object as a database table.

Custom objects are specific to your company or Salesforce account. Custom objects are denoted with a trailing __c in the key, as seen below with Zapier_Partners__c.

Salesforce Custom Objects

Records are individual instances of an object and all associated data, such as ‘Zapier’ the account, ‘John Doe’ the contact, or ‘Jane Doe’ the lead. You can think of a record as a single row in the database table.

Using the new outbound message trigger

The New Outbound Message trigger uses Salesforce workflows and workflow rules, which allows you to set the filtering criteria on the Salesforce side for when you want your Zap to fire.

Please note to use this trigger, your Salesforce account must support workflow rules.

To setup this trigger, please follow these steps:

  1. Create a Zap using Salesforce’s "New Outbound Message" trigger. This will automatically generate a webhook URL you can use when setting up the Salesforce workflow for this trigger.
    Salesforce Webhook URL
  2. In Salesforce, create a new workflow rule which matches the set of conditions that will trigger the outbound message to be sent out. This is the set of conditions that will trigger your Zap and save the workflow.

    In the example below, the workflow will trigger when a lead’s status is set or updated to Closed - Converted.
    Salesforce Configure Workflow Rule
  3. Add an Immediate Workflow Action by selecting 'New Outbound Message' from the Add Workflow Action dropdown:
    Salesforce Rule Converted Leads
  4. This will bring you to the ‘Configure Outbound Message’ page. You'll need to enter the Webhook URL from your Zap's Trigger field (from step 1) in the 'Endpoint URL' field. Also select the fields you want sent to your Zap; these will be the fields available to you when mapping fields to actions in your Zap. Once you're happy with your setup, click 'Save'.
    Salesforce Configure Outbound Message
  5. Confirm your Outbound Message was added to Immediate Workflow Actions by clicking 'Done'.
    Salesforce Edit Rules Converted Leads
  6. Lastly, activate the workflow by clicking 'Activate'. A check should appear next to the ‘Active’ field.
    Alert: Your Zap will not work if the associated workflow is not activated.
    Salesforce Converted Leads Activate
    You can read more about creating outbound messages on Salesforce here.

When you have completed these steps, you can return to setting up your Zap. This workflow will send an Outbound Message when your workflow’s criteria is met and trigger your Zap!

Using the Find Object by Query Search

Tips for building a SOQL WHERE clause for your search:

  • Confirm all fields included in your query have appropriate field accessibility and are not ‘hidden’.
  • Fields names do not have to be wrapped with quotes.
  • Field values should usually be inside single quotes (e.g. 'John Doe').
  • The double quote character (") should typically be avoided.

WHERE clause examples:

  • Name = 'John Doe' AND Status = 'Active'
  • Where can be a mapped field from a previous step.
  • CreatedDate 2011-04-26T10:00:00:08:00
  • Name LIKE 'A%'

  • Updating an object with another object

    To update an object with another object, you'll need to use the "Update Record" action. From there, when customising your Action step, be sure to select your 'Salesforce Object' along with 'Record to Update'.

    Tip: If you're going to be dynamically updating either or both of these fields each time the Zap runs, you'll need to use a custom value.

    If it's the case that you can't find a field that exists within your object, try using the Create Object action instead.

    You can also view or modify your objects and relationships within Salesforce, you can do so using the Schema Builder if you're having trouble seeing it in the Zap editor.

    I want to select more than one value from the dropdown field

    If you have a multi-select pick list field in Salesforce then you can select multiple items by using ; semi colon character between them like so:

    Alternatively if you're passing data from a previous step, you can use the Formatter to build a string with ; as the separator.

    Create a link to your Salesforce objects

    If you're trying to create a direct link to a specific record make sure you're including your prefix from your Salesforce domain to the respective object ID.

Need More Help?

Contact Support

Tell us about your problem, and we’ll find you a solution or you can email support.
Get Help

Hire an Expert

We have a directory of professionals across the globe who are ready to help.
Find a Zapier Expert

Zapier Community

Connect with other Zapier users and industry professionals to get help crafting the perfect workflow.
Check out the community

Zapier University

Video courses designed to help you become a better Zapier user, whether you’re a beginner or more experienced.
View courses