data-monster-cupcake-assembly.png

How to Add Insycle Data Management Steps into a Salesforce Flow

Setting up automation for your data management tasks frees your employees up to focus on more strategic work.

Insycle’s Recipes allow you to organize multiple Insycle templates into an automatable, multi-step data maintenance process. You can insert your Recipes directly into Salesforce Flows for contacts, accounts, leads, opportunities, and custom record types.

For example, if a new contact record is added to Salesforce, it could trigger a Flow that sets off an Insycle Recipe. This Recipe could cleanse, format, and deduplicate the contact data. Once it's complete, Salesforce will continue with the flow steps.

When To Use Flows

Insycle's ability to integrate Recipes with Salesforce Flows is ideal when you want to:

  • Automatically apply formatting, deduplication, or other changes to newly added data.
  • Trigger a Recipe based on events (such as a customer filling out a form).

If you want to clean up existing records in bulk, it is best to do an initial cleanup using the Bulk Operations or Transform Data modules. Once everything is clean, you can configure a Flow to keep things tidy on an ongoing basis. 

Process Summary

  1. Create an Insycle Recipe to clean up, standardize, or deduplicate Salesforce records.
  2. Create a Salesforce Flow.
  3. Add your Recipe to your Flow.

Step-by-Step Instructions

1. Create Your Insycle Recipe

To include Insycle automation in your Salesforce Flows, you must first create a Recipe. 

Recipes usually include multiple templates. The templates run in sequence, so if the processes in one template need to happen before another (such as extracting names from emails before formatting the names), they must be in the correct order.

To create a new Recipe in Insycle, navigate to Operations > Recipes.

  1. Click the + button in the upper right-hand corner of the screen.
  2. Click the Template button to add new templates to the Recipe.
  3. Save your Recipe.
  4. Then click the Review button.

Create recipe

For a Recipe to work in a Salesforce Flow, it must be saved in Update mode. On the Mode tab of the Recipes popup, select Update, then click Next.

recipe-review-salesforce-update-mode.png

On the Notify tab, customize the notification email Insycle will send when this Recipe runs. Add recipients or add context to the subject and message body.

On the When tab under Automate, enable your Recipe to run in Salesforce Flows by selecting the Salesforce Flow Integration option, then click Save.

recipe-review-update-automate-salesforce-flow.png

2. Create a New Salesforce Flow

In Salesforce, navigate to Setup > Process Automation > Flows, and click the New Flow button.

In this example, we'll follow best practices and create a Flow from scratch; however, if needed, you can insert the Insycle Recipe action into already existing Flows.

Select Start From Scratch, then Record-Triggered Flow, and click Create.

salesforce-flow-new-flow-scratch.png

In the Configure Start pane, select the same object type your Insycle Recipe is for. If your Recipe works with contact records, it can only be inserted into a contact-based Flow. If working with an existing Flow, make sure the object types match.

Under Configure Trigger, enter the criteria you want a record to meet in order to trigger this Flow.

If using a trigger for updated records, define entry conditions so a Flow runs only when specific fields are modified. For example, you could set the entry conditions:

  • Condition Requirements: Any Condition is Met (OR)
  • Field: Phone, Operator: Is Changed
  • Field: MobilePhone, Operator: Is Changed

When finished with the settings, check the Include a Run Asynchronously path... checkbox at the bottom of the pane. 

salesforce-flow-configure-start-contact-phone.png

On the Flow diagram, click the plus + under the Run Asynchronously path.

In the Add Element field, type "Insycle" and select "Insycle - Run Recipe." If you don't see the Insycle element, make sure the Insycle app is installed.

salesforce-flow-add-element-insycle.png

In the Insycle - Run Recipe pane, customize the Label, and select the Object type that matches the Flow.

Select the Insycle Recipe to run. The list will include default Insycle Recipes and those created by your team. For complete details of what a Recipe does, review it in Insycle. 

salesforce-flow-insycle-run-recipe-contact-phone.png

You can add any number of Recipes to the Flow. In the example below, Insycle will first deduplicate records and then format the phone numbers.

salesforce-flow-diagram-two-recipes.png

When finished, Save and Activate the Flow.

See Salesforce's What Is a Record-Triggered Flow article for more information.

Pro Tips

  • To keep things simple, it's best to create a new, dedicated Flow for integrating your Insycle Recipe rather than adding one to an existing flow.
  • Configure a strict trigger rule to prevent the Flow from running unnecessarily. If a trigger is very broad, for example, if you use the "A record is updated" trigger without any further criteria, the Flow will run every time any part of a record is updated.
    The “A record is created” option is a fairly controlled trigger, but you can add entry conditions to get even more specific.
  • When setting up a new Flow with Insycle Recipes, don't try to add everything all at once. It's best to layer things in so that if there is an issue, it's easier to narrow down the possible causes.
    First, choose one record and test the templates or Recipes from Insycle. Then, add one to your Flow and manually test it with one record. Repeat this after each Recipe is added.

Troubleshooting

Getting Flow error "configure flow to run when record meets condition"

If when you try to save your Flow, you get the following error message:

For a path that runs asynchronously, configure the flow to run only when a record is updated to meet the condition requirements or select the Is Changed operator in a condition.

salesforce-flow-error-configure-condition.png

This indicates you need to add an entry condition. Salesforce prevents you from saving a Flow with a very broad trigger. For example, if you use the "A record is updated" trigger without any further criteria, the Flow would run every time any part of a record is updated. 

Edit the Start step to include Condition Requirements. so the Flow is more targeted to only run on records that meet specific update criteria.

Getting Flow error "Error occurred while trying to fetch recipes from Insycle"

If when you try to save your Flow, you get the following error message:

Error occurred while trying to fetch recipes from Insycle. Check Insycle API key in Setup>Custom Metadata Types>Insycle API Key

There are two possible causes to look into:

  1. There is no API Key configured.
  2. The API Key is configured, but the user is not assigned "Insycle User" permission.

First, check that the API key is configured in Setup > Custom Metadata Types.

salesforce-setup-custom-metadata-types-insycle-API-key.png

Next, verify that the user has the necessary permission set. Go to Setup > Users > Permission Sets > Insycle User > Manage Assignments, and make sure the user is listed there.

salesforce-setup-user-permission-sets-insycle-user.png

Record update didn't trigger Flow

If you've made an update to a record in Salesforce that should have triggered a Flow to run, but you get the following error:

Item has an error: We can't save this record because the process failed. Give your Salesforce admin these details. An Apex error occurred: System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out Error ID: pending. Please commit or rollback before calling out Error ID.

salesforce-cant-save-records-error.png

This indicates the Insycle element is not running in the “Asynchronous” path.

To resolve, edit the Flow, and in the Configure Start pane, check the Include a Run Asynchronously path... checkbox at the bottom.

On the Flow diagram, click the plus + under the Run Asynchronously path.

In the Add Element field, type "Insycle" and select "Insycle - Run Recipe."

In the Insycle - Run Recipe pane, customize the Label, and select the Object type that matches the Flow.

Select the Insycle Recipe to run.

salesforce-flow-add-element-insycle.png

Frequently Asked Questions

Can I test my Recipe integration in my Flow with just one record?

Yes, you can test a Recipe in a Flow directly in Flow Builder. 

  1. Open the Flow in Salesforce.
  2. Click the Debug button at the top.
  3. Select the record to run the test on, then click Run.

salesforce-flow-debug-test-one-record.png

Can I trigger a Recipe when a new record is created or updated?

Yes, you can use record-triggered flows when you want a change to your data or a new record to result in additional updates or actions. Set the trigger and conditions that make sense for the Recipe you want to run. For example, when an opportunity is created, you can run an Insycle Assign app Recipe to make sure it is assigned to a representative based on region, industry as well as rep availability.

What is a Recipe?

A Recipe is a series of individual tasks that have been saved as templates and are strung together into a longer, ordered sequence. This can then be automated to run on a set schedule.

Read more about Recipes, and learn Why Data Management Is So Time-Consuming and How Recipes Can Help.

Additional Resources

Related Help Articles

Related Blog Posts