Contact Us

December 2, 2024

May 13, 2026 4:04 pm

Creating Consent Records in Marketing Cloud with Event Triggered Flows

Share with

Understanding the Problem

Event triggered flows in Journey Builder are powerful tools for automating tasks based on updates to contact records. However, when creating consent records, it is crucial to use the correct actions and validate data types to avoid errors.

A community member asked about an issue with an event triggered flow that was supposed to create a consent record and send an email upon updating a contact record. Despite following a tutorial, the consent record was not being created.

Platform Level Explanation

The issue lies in the fact that the contact point value must be of the correct data type. In this case, the contact point value was text, not email. Using the Create Consent Action and validating the data type of the contact point value are essential steps in creating consent records.

Step-by-Step Solution

To resolve this issue, follow these steps: use the existing Create Consent Action instead of building a custom subflow, and validate the data type of the contact point value to ensure it matches the required type.

The root cause of this issue is the incorrect data type of the contact point value and the use of a custom subflow instead of the Create Consent Action.

By using the Create Consent Action and validating the data type, you can ensure that consent records are created correctly and emails are sent as intended.

Best Practices

To avoid similar issues in the future, it is essential to follow best practices when creating event triggered flows and consent records.

CreateConsentAction.js

var consent = CreateConsent("contactId", "contactPointValue", "consentType");

Heads up: Always validate the data type of the contact point value to ensure it matches the required type.

Checklist

Creating Consent Records in Journey Builder

  • Use the existing Create Consent Action
  • Validate the data type of the contact point value
  • Ensure the contact point value matches the required type
  • Test the event triggered flow to ensure consent records are created correctly
  • Verify that emails are sent as intended

Frequently Asked Questions

What is the correct data type for the contact point value?

The correct data type for the contact point value depends on the type of consent being created. For example, email consent requires an email address, while text message consent requires a phone number.

How do I validate the data type of the contact point value?

You can validate the data type of the contact point value by checking the format and content of the value to ensure it matches the required type.

What happens if the contact point value is not of the correct data type?

If the contact point value is not of the correct data type, the consent record may not be created, and emails may not be sent as intended.

How do I troubleshoot issues with creating consent records in Journey Builder?

To troubleshoot issues with creating consent records, check the event triggered flow for errors, validate the data type of the contact point value, and test the flow to ensure consent records are created correctly.

Genetrix Technology · Salesforce Marketing Cloud Partner

Need help shipping this in production?

Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.

Get in Touch with Genetrix →

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert