Inspiration from TDX: Using Custom Metadata Types to Bypass Actions in Flow
Inspiration from TDX: Using Custom Metadata Types to Bypass Actions in Flow

Inspiration from TDX: Using Custom Metadata Types to Bypass Actions in Flow

05/03/2024 by Becky Mikos
Leverage Salesforce custom metadata types in flow to complete or bypass actions in flow based on specific criteria.

I recently attended Salesforce’s TrailblazerDX conference in San Francisco, CA. With 300+ technical sessions and hands-on workshops, I had some tough decisions to make on which sessions to attend, but a hands-on session called "Enhance Record-Triggered Flows with Custom Metadata Types" was one of the most practical ones I chose.

What are Custom Metadata Types?

According to Salesforce Help, custom metadata is customizable, deployable, packageable, and upgradeable application metadata. First, you create a custom metadata type, which defines the form of the application metadata. Then you build reusable functionality that determines the behavior based on metadata of that type.

For example, you can create associations between different objects, such as a custom metadata type that assigns cities, states, or provinces to particular regions in a country. Another use case would be managing lists, such as approved donors and pre-approved vendors. This is the example we’ll utilize.

How to use Custom Metadata Types in Flow

Imagine you work at a nonprofit and you want to automatically send event attendees a follow-up email asking them to donate, but you don’t want that email to go out to current board members. We can utilize custom metadata types to enable or disable a checkbox indicating whether we want board members to be bypassed when a record-triggered flow sends an email to attendees post-event.

1. Create the Custom Metadata Type (in the example below I called mine “Trigger Configuration,” as well as custom fields, and records that indicate whether to enable or disable if the Contact is a board member.

Screenshot showing the Custom Metadata Type detail and Trigger Configuration page in an unspecified software interface, featuring tabs for Standard Fields, Custom Fields, Validation Rules, and Page Layouts, with options to edit and manage trigger configurations.

Example record:

Check out our new financial statement builder app  Protoolio Logo Featured Categories Customs Updates Free AI Alt Text Generator Use AI to generate alt text for your images and improve the accessibility and SEO of your website.  No file chosen   Custom-Metadata-Image-2.png Undo Custom-Metadata-Image-2.png Upload complete Screenshot of a Trigger Configuration interface detailing elements such as Trigger Configuration Name, Campaign Event, Edit, Delete, Clone options, and an Example Record section with fields Protected Component and Namespace Prefix.  What is alt text? Alt text, short for alternative text, is a brief description added to an image in HTML markup. Its purpose is to provide a textual representation of the content and function of the image, making it accessible to individuals who are visually impaired or using assistive technologies like screen readers. Alt text serves as a substitute for the image, conveying its essential information to users who cannot perceive it visually. It is also displayed in place of the image if it fails to load, ensuring that users still receive meaningful context.  The importance of alt text lies in its role in web accessibility. By providing descriptive text for images, websites become more inclusive and usable for people with disabilities. Alt text enables individuals who are blind or have low vision to understand the content and context of images on the web, allowing them to engage with digital content on an equal basis with sighted users. Additionally, alt text improves search engine optimization (SEO) by providing textual content that search engines can index, potentially increasing the visibility of web pages in search results. Therefore, implementing descriptive and accurate alt text is essential for creating an inclusive online experience and reaching a wider audience.   See additional resources © 2024 Protoolio. All rights reserved. Protoolio Logo Customs Updates Contact Privacy Terms

2. Create an autolaunched flow. The autolaunched flow will check the value of “IsEnabled” in the custom metadata type.

Flowchart diagram illustrating an autolaunched flow process starting with record fetching, decision making about record state, and assigning values based on record availability, with clear start and end points.

3. Add the autolaunched flow as a subflow element in your record-triggered flow. Your record triggered flow should contain a decision after the subflow with two outcome paths. One path completes the given action and the other bypasses the action and ends the flow. 

Edit Bypass Criteria Without Changing the Flows


Fast forward a few months to your next event, and say you want all event attendees to receive the post-event email, even board members. Do you have to edit these flows or start all over? Nope! Simply edit the IsEnabled value in your Custom Metadata Type.

How would you utilize custom metadata in flow? Let me know on the Salesforce Trailblazer Community, or tweet directly at me on Linkedin or X (formerly known as Twitter) @beckymikos.