Foggy Hiking Pathway

Saving Time with Flow Templates in Agentforce Marketing

Saving Time with Flow Templates in Agentforce Marketing

min. reading

Agentforce Marketing (aka: Marketing Cloud Next) introduced marketing teams to Salesforce Flow for the first time. While flows provide increased capabilities over tools like Engagement Studio in Account Engagement and Journey Builder in Marketing Cloud Engagement, building them can be time-consuming and even intimidating to new users.

In this post, we’ll explore how to create and use templates to increase efficiency while taking full advantage of the power of Flow.

Non-Admin Flow Types

ā€œNon-adminā€ flows power Agentforce Marketing and allow marketers to automate key processes without needing administrator-level permissions. Common use cases include sending emails, delivering SMS messages, and creating Salesforce records.

There are two primary Flow types within Agentforce Marketing:

  • Form-Triggered: These have a 1-to-1 relationship with a marketing form. They are used to create or update Salesforce records, manage consent, and handle immediate post-submission tasks.
  • Segment-Triggered: These are primarily used to send individual or a series of emails and SMS messages. They also power Path Experiment (available in the Advanced Edition) and provide access to additional flow elements allowing marketers to build customized journeys.

Flow is extremely powerful, but getting started can be tough. The Flow canvas is a “blank slate” that requires thought and configuration.

Let’s take a look at how marketers can simplify and scale their efforts using flow templates with a real-world scenario.

Example Scenario

The marketing team has a high volume of assets that they would like to gate on the website using Agentforce Marketing forms. They need to ensure that existing contacts or leads are updated when a form is submitted before creating any new lead records. Additionally, they must generate consent records whenever a user opts in to marketing communications and add them to the correct Salesforce campaign for tracking purposes.

User Setup and Permissions

To replicate the experience of a marketing user, all flows and images in this post were created with a Salesforce user with the following profile and permissions. These are reflective of a standard marketing user.

  • Profile
    • Standard User
  • Permission Sets
    • Marketing Cloud Admin
    • Tableau Next Included App Business User (This provides access to the Marketing Performance Dashboards)
  • CMS Contributor Role
    • Content Manager
Permission Set Assignments

Form and Flow Templates

The first step is determining the fields that need to be included on the form. The best approach is to take a minimalistic approach and only ask for information that will be used or is needed for lead routing.

Hidden fields on forms are very useful for capturing form-specific data for use in your flow. For example, you can use them to automatically pass the Campaign ID and Campaign Member Status.

Creating the Form Template

  1. Select the ā€œMarketingā€ app from the App Launcher.
  2. Click the ā€œContentā€ tab to enter the Salesforce CMS.
  3. Click on the ā€œContent Workspace for Marketing Cloudā€ workspace.
  4. Click the ā€œAddā€ button and select ā€œContentā€.
  5. Choose the ā€œFormā€ CMS content type.
  6. Add Data Source as ā€œLeadā€.
Adding a Data Source
  1. Drag the input fields into the form, and configure the labels, unique names, and determine if the field should be required or hidden.
  2. Set the desired action at form submission (show thank you message or redirect).
  3. Add a title, API Name, and description and then save.


Here’s an example of my form. Note that all fields have been set to required (with the exception of the opt-in checkbox). It’s important to know that Flow will overwrite data in Salesforce if a submission is received with blank data. If optional fields are needed, formulas can be created in the flow to protect data.

Example of a form

Creating A Flow

  1. From the form you just created, click ā€œNew Flowā€ in the flow section.
  2. Select ā€œOpen Flow in Flow Builderā€.
Open flow in flow builder
  1. Customize the flow as needed and save.

Customizing the Flow

The flow needed to meet our requirements is a little complicated, but that’s the whole point of this post. We don’t want the marketing team building this logic repeatedly.

This flow was built by a user with the ā€œMarketing Cloud Adminā€ permission set. The ā€œMarketing Cloud Managerā€ role lacks access to certain required elements. If you’d prefer, your Salesforce Administrator can also set up this template for you.

An example of a flow

Flow Summary 

Here’s a summary of the actions being performed in the flow.

  • Creates an opt-in consent record if the consent box on the form is checked.
  • Finds existing Salesforce contacts based on the email address and last name in the form submission.
    • Updates existing contact records, if found.
  • Finds existing Salesforce leads based on the email address and last name in the form submission.
    • Updates existing lead records, if found.
    • Created new leads, if matching records are not found.
  • Retrieves campaign members based on the CRM ID of the person who submitted the form and the campaign ID included in the hidden field on the form.
    • Updates the campaign member status of existing members to the value included in the Campaign Member Status hidden field from the form.
    • Created new campaign members using the hidden fields from the form.

Saving the Flow as a Template

We can now complete the creation of the flow template.

Save As Template  

  1. From the Flow tab, open the latest version of the flow.
  2. Delete the associated form from the ā€œStartā€ element.
    • Click ā€œEditā€ next to ā€œEvent: Form Submissionā€.
    • Click the ā€œXā€ to delete the form.
Steps to delete a form
  1. Click ā€œSave As New Flowā€.
    • Add the flow label and a detailed description of what the flow does and when it should be used. The API Name will automatically populate based on the flow label.
Example of how to add a flow label and form description
  • Note: You may run into an issue saving due to the presence of the Consent Request element. If this happens, delete the field reference in the Contact Point value and save. 
How to solve the issue of being unable to save
  1. Click ā€œSave As New Versionā€.
    • It’s important to create a new version of the flow before saving as a template. The initial version of the flow will be v0.
    • Saving a new version will increment the version number and ensure your updates are available in the flow template. 
  2. Click the dropdown to the right of the ā€œSave As New Versionā€ button and select ā€œSave as Templateā€.
  3. Confirm that the template has been created by completing the following steps:
    • Click the Flows tab.
    • Click the ā€œNewā€ button.
    • Enter the template name in the search box.. 
How to confirm that a template has been created

Using Your Templates

Now that all the heavy lifting is done, you or your team can use your form and flow templates to quickly support additional assets. Here’s how.

Repeat the following steps for all new assets

  1. Create the Salesforce campaign that will be used for the form and the campaign members.
    • When creating the campaign from the Marketing App, do not select a campaign template.
    • Selecting a template will result in an additional flow being created.

Do not select a template at the following screen.

Do not select a campaign template when creating the campaign from the marketing app
  1. Navigate to the form template in the CMS.
  2. Select the ā€œCloneā€ from the dropdown menu to the right of the form name.
How to clone a form
  1. Name the new form based on the asset name.
  2. Update the Campaign ID and Campaign Member Status (hidden field values) and Form Submission action.
How to update the campaign ID and campaign member status
  1. From the Flow tab, click the ā€œNewā€ button.
  2. Search for and select the gated content template.
  3. Click ā€œEditā€ next to ā€œEvent: Form Submissionā€ and select the cloned form.
  4. Update the Contact Point value in the Consent Request element to reference the email address from the associated form.
  5. Click ā€œSaveā€ and name the new flow.
    • Click “Show Advanced” and delete the value in the “Source Template” field.
      • Non-admin users will not be able to activate the flow if this step is omitted.
Save the flow screen, highlighting the Source Template field.


  • The Consent Request element can be a bit finicky. If you see an error after updating the Contact Point, just delete the element and add it back.
  1. Exit the flow details page and associate the flow to the correct campaign using the ā€œAssociated Recordā€ lookup.
How to associate the flow to the correct campaign using the "Associated Record" lookup
  1.  Return to the CMS and publish the form (this will also activate the flow).
  2. Add the embed code to the web page promoting the asset.

Save Time and Increase Efficiency with Templates

Building the initial form and flow template featured in this post took approximately one hour. Because the logic is quite involved, I spent a portion of that time testing to ensure everything functioned exactly as intended.

Once the templates were ready, I put them to the test with a stopwatch. While the steps in the ā€œUsing Your Templateā€ section might look detailed, I was able to create a brand-new form and flow in just 4 minutes and 1 second. That is a massive 93% time savings!

Beyond just saving time, templates ensure accuracy and process consistency. Asking multiple people to manually replicate the complex requirements stated in this post would almost certainly result in errors.

If you frequently build forms and flows with similar structures, do yourself a favor and templatize. Your future self (and coworkers) will thank you.

Sercante is recognized as a Marketing Cloud Growth and Advanced Implementation Expert and has the expertise to support your Agentforce Marketing needs. If you’re interested in support with Agentforce Marketing, reach out to us and let us know how we can help.

Subscribe to The Spot

This field is for validation purposes and should be left unchanged.
This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form

Events

eBook

New Series

Salesforce Training Courses

Categories

Top 5 Recent Posts

  • Mike Morris is a 12x Salesforce-certified consultant who joined Sercante in 2019. He has over 20 years marketing experience from previous roles leading internal marketing departments and collaborating with large sales organizations. His strong interest in marketing operations and technology led him to the Salesforce platform and to his current role at Sercante. When not working, he enjoys staying active by running, biking, and getting outside as much as possible.

Related Articles

Bot Single Post