Tips and tricks with Salesforce triggers and actions – Zapier

## Use the New Outbound Message trigger with Workflow Rules

![miscEye icon](https://cdn.zapier.com/storage/photos/335619ab6472fe1fefab18d493cb39bf.png) Note

Salesforce Workflow Rules will be retired and replaced with Salesforce Flow. There is no set date for this change yet. Learn more about upcoming [changes to Workflow Rules](https://admin.salesforce.com/blog/2021/go-with-the-flow-whats-happening-with-workflow-rules-and-process-builder).  
You can use the [New Outbound Message trigger with Flow](#using-the-new-outbound-message-trigger-with-flow) instead.

The New Outbound Message trigger uses Salesforce [workflows](https://help.salesforce.com/articleView?id=customize_wf.htm&type=5) and [Workflow Rules](https://help.salesforce.com/articleView?id=workflow_rules_new.htm&type=5), which allow you to set the filtering criteria for when the Zap should trigger directly from Salesforce.

![miscEye icon](https://cdn.zapier.com/storage/photos/335619ab6472fe1fefab18d493cb39bf.png) 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](https://zappy.zapier.com/E71B729A-BD72-477F-A854-11D899B24D49.png)
2.  In Salesforce, create a new [workflow rule](https://help.salesforce.com/articleView?id=workflow_rules_new.htm&type=5) 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](https://zappy.zapier.com/0C36B33C-C981-45F4-9924-EC9868EB6E25.png)
3.  Add an Immediate Workflow Action by selecting New Outbound Message from the Add Workflow Action dropdown.  
    ![Salesforce Rule Converted Leads](https://zappy.zapier.com/22C27B85-289C-430F-BAA9-A97A78C85C27.png)
4.  This will bring you to the _Configure Outbound Message_ page. Enter the **Webhook URL** from your Zap's Trigger field in the Endpoint URL field. Then, 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. Click **Save**.  
    ![Salesforce Configure Outbound Message](https://zappy.zapier.com/8A6BA562-1DE0-4B25-B514-86CFD5A80547.png)
5.  Confirm your Outbound Message was added to Immediate Workflow Actions by clicking **Done**.  
    ![Salesforce Edit Rules Converted Leads](https://zappy.zapier.com/77E02E26-6871-40FB-BE05-FBD0123FE56E.png)
6.  Lastly, activate the workflow by clicking **Activate**. A check should appear next to the Active field. Your Zap will not work if the associated workflow isn’t activated.  
    ![Salesforce Converted Leads Activate](https://zappy.zapier.com/A4409B49-E52A-4507-B9B5-1559F218D747.png)

Learn more about [creating Outbound Messages in Salesforce](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_om_outboundmessaging_setting_up.htm?utm_source=zapier.com&utm_medium=referral&utm_campaign=zapier).

After you complete these steps, you can return to setting up your Zap. When your workflow’s criteria is met, your Zap will trigger.

## Use the New Outbound Message trigger with Flow

You can use the New Outbound Message trigger with Salesforce Flow instead of Salesforce Workflow Rules.

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](https://cdn.zappy.app/1695ddf0c714847f2808567b546c9d99.png)
2.  In Salesforce, create a new [Outbound Message](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_om_outboundmessaging_setting_up.htm) and fill out all required fields. The webhook URL from Zapier will be the endpoint URL for the Outbound Message. Select all fields you want to send to your Zap. These will be the fields available to you when [mapping fields](https://help.zapier.com/hc/en-us/articles/8496343026701) to actions in your Zap. Then, click **Save**.  
    ![Salesforce Outbound Message setup](https://cdn.zappy.app/042a98f7c6f989c6a583fda4e497451c.png)
3.  Create a new [Record-Triggered Flow](https://help.salesforce.com/s/articleView?id=sf.flow_build.htm&type=5).  
    ![Record-Triggered Flow option in Salesforce](https://cdn.zappy.app/d13fcddf3d9674292a6f62b191cc80db.png)
4.  Configure the Flow Start with the conditions for when an outbound message should be sent. In the following example, the Flow will run when there is a new lead created or updated with the lead status “Closed - Converted”.  
    ![Configuration for Flow Start](https://cdn.zappy.app/d8390877588331f27a2521e6368b476f.png)
5.  Add an element to this Flow and select Action to add the Outbound Message action.
6.  Search for the Outbound Message created in step 1 and fill out the necessary fields in Salesforce.  
    ![Adding new Flow Builder Outbound Message](https://cdn.zappy.app/f4662d4ebe266ba6fdd303c7c0fb53c1.png)
7.  Save your Flow, then click **Activate**. Your Zap will not work if the associated Flow isn’t activated.  
    ![Activating your Flow](https://cdn.zappy.app/d562f65c780ad3298f60dc030db9b145.png)

After you complete these steps, you can return to setting up your Zap. When ther workflow’s criteria is met, your Zap will trigger.

## Use the Find Object by Query Search

Tips for building a SOQL [WHERE clause](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_conditionexpression.htm) for your search:

*   Confirm all fields included in your query have appropriate [field accessibility](https://help.salesforce.com/articleView?id=checking_field_accessibility_for_a_particular_field.htm&type=5) and aren’t hidden.
*   Fields names don’t have to be wrapped with quotation marks.
*   Field values should usually be inside single quotation marks (e.g. 'John Doe').
*   Avoid using double quotation marks (`"`).

WHERE clause examples:

*   `Name = 'John Doe' AND Status = 'Active'`
*   `CreatedDate > 2011-04-26T10:00:00:08:00`
*   `Name LIKE 'A%'`

## Update an object with another object

To update an object with another object, you'll need to use the Update Record action. When customizing your action step, select your Salesforce Object along with Record to Update.

![miscEye icon](https://cdn.zapier.com/storage/photos/335619ab6472fe1fefab18d493cb39bf.png) Note

*   If you're going to dynamically update either or both of these fields each time the Zap runs, you'll need to use a [custom value](https://help.zapier.com/hc/en-us/articles/8496241696141).
*   If 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 by using the [Schema Builder](https://help.salesforce.com/articleView?id=schema_builder.htm&type=5).

## 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 semicolon character `;` between them.

Alternatively if you're passing data from a previous step, you can use [Formatter](https://help.zapier.com/hc/en-us/articles/8496304469261) to create 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, you must include your prefix from your Salesforce domain to the respective object ID.