Tips and Tricks with Salesforce triggers and actions

Overview

Use the New Outbound Message trigger with Workflow Rules
Use the New Outbound Message trigger with Flow
Use the Find Object by Query search
Update an object with another object
Select more than one value from the dropdown field
Create a link to your Salesforce objects


Use the New Outbound Message trigger with Workflow Rules

miscEye icon 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.
You can use the New Outbound Message trigger with Flow instead.

The New Outbound Message trigger uses Salesforce workflows and Workflow Rules, which allow you to set the filtering criteria for when the Zap should trigger directly from Salesforce.

miscEye icon 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. 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
  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. Your Zap will not work if the associated workflow isn’t activated.
    Salesforce Converted Leads Activate

Learn more about creating Outbound Messages in Salesforce.

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
  2. In Salesforce, create a new Outbound Message 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 to actions in your Zap. Then, click Save.
    Salesforce Outbound Message setup
  3. Create a new Record-Triggered Flow.
    Record-Triggered Flow option in Salesforce
  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
  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
  7. Save your Flow, then click Activate. Your Zap will not work if the associated Flow isn’t activated.
    Activating your Flow

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 for your search:

  • Confirm all fields included in your query have appropriate field accessibility 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 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.
  • 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.

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 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.

Was this article helpful?
0 out of 0 found this helpful