--- title: "Consent Management" slug: "consent-management" tags: ["sfdc", "setup", "TCPA", "consent"] updated: 2024-11-13T20:50:41Z published: 2024-11-13T20:50:41Z canonical: "docs.relaynetwork.com/consent-management" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.relaynetwork.com/llms.txt > Use this file to discover all available pages before exploring further. # SMS Consent Management Effective SMS consent management is crucial for compliance with Telephone Consumer Protection Act (TCPA ) regulations. It's important to recognize that TCPA consent is associated with a mobile phone number rather than an individual. ## Relay-Supported Consent Management Options The Relay package offers robust capabilities for bidirectional synchronization of consent status between your Salesforce organization and Relay Network. This feature allows for tailored synchronization strategies that best suit your organization's needs. You might choose Relay Managed Synchronization for changes initiated in Salesforce, and a custom approach for consent updates that come from Relay. ![rn-sfdc-consent-changes-data_flow](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/rn-sfdc-consent-changes-data_flow.png) Fig 1. Example TCPA Consent Change Data Flows --- ## Synchronizing Salesforce-Originated Mobile Number or Consent Changes to Relay When a user who has previously been onboarded to Relay changes their mobile number or consent status within Salesforce, these updates must be communicated to Relay. Notably, if a mobile number is changed, you must also send a 'stop' consent command for the original number. > [!WARNING] > IMPORTANT > > Any Salesforce originated consent changes sent to Relay will result in Relay sending back to Salesforce an event with the consent change update. This can be used as a confirmation of receipt of the consent change being processed by Relay. However, **it is very important** to not re-send the change back to Relay again or you might create an endless loop of consent changes. Ensure that you only send consent changes to Relay when a value has changed. ### Relay Managed Synchronization For Relay Managed Synchronization, your Salesforce org must meet the following criteria: - Mobile numbers and Relay specific SMS consent values ('Written', 'Express', 'Stop') are stored within the Account or Person Account object. - If your consent values differ from Relay's requirements, create a custom formula field to map your values to those expected by Relay, thus enabling managed synchronization. Configuration steps include verifying the following **Relay Custom Metadata** settings: - **Enable Multi Clients** should be **unchecked**. - **Account** CCID **Field Name** must be set to the field containing the unique customer identifier. - **Account Relay Consent Field Name** should specify the field holding the current TCPA consent value in the required Relay format. - **Account Mobile Phone Field Name** needs to identify the field containing the user’s mobile number. - Ensure **Account** trigger **Disabled** is **unchecked**. ### Client Managed Synchronization If your system does not meet these criteria, internal management of the synchronization process is necessary. Salesforce Flows are recommended for this purpose, although other automation logic can be used: - Create a Flow that is either triggered by record changes (specifically records containing consent and/or mobile numbers) or manually by your backend processes. - The Flow should first determine if there have been changes to the consent value or mobile number. If neither has changed, terminate the flow. - If the mobile number has changed, create a consent change object setting the old number to 'stop' consent, and another for the new number. - If only the consent value has changed, create a single consent change record. - Send these records to Relay and verify that Relay has successfully received the updates. See: [Example 4: Consent Management Part II](/v1/docs/example-4-consent-management-part-ii) --- ## Synchronizing Relay-Originated Consent Changes When changes in consent originate from Relay, particularly when a user sends a "stop" message, these updates must be synchronized with Salesforce. ### Relay Managed Synchronization For Relay originated changes, your Salesforce org must meet slightly different criteria: - You must store the user's mobile number and a field to capture and update consent values ('Written', 'Express', 'Stop') in the Account or Person Account object. Configuration steps include verifying the following **Relay Custom Metadata** settings: - **Enable Multi Clients** should be **unchecked**. - **Account CCID Field Name** must be set to the field containing the unique customer identifier. - **Account Relay Consent Field Name** should specify the field holding the current TCPA consent value in the required Relay format. - **Account Mobile Phone Field Name** needs to identify the field containing the user’s mobile number. - Ensure **Account Trigger Disabled** is **unchecked**. - Ensure the *Relay Events Trigger* option **Disable TCPA Consent Processing logic** is **unchecked**. ### Client Managed Synchronization for Relay-Originated Changes If using Client Managed Synchronization for handling Relay-originated changes: - Develop a mechanism (typically a Flow) to capture and update consent statuses from Relay. This often involves parsing incoming Relay Event messages and updating the Salesforce records accordingly. - Ensure this process robustly checks for discrepancies in consent status to maintain compliance and data integrity. See: [Example 3: Consent Management Part I](/v1/docs/example-flow-consent-management-part-i) --- By carefully setting up both Relay and Client Managed Synchronization for Salesforce and Relay-originated changes, your organization can ensure compliance with TCPA regulations while efficiently managing SMS consent across platforms. Telephone Consumer Protection Act (TCPA) requires that the recipient of the SMS (your customers) must grant permission for you to send them text messages Client Customer ID - Uniquely identifies a client's customer within the Relay system. Each customer must have a unique ID. This value can be different from the actual customer ID within the client's system although maintaining the mapping between the IDs is the responsibility of the client. Triggering refers to sending the user an SMS text message that contains a personalized URL. The URL will take the user to their personalize Feed. Triggering refers to sending the user an SMS text message that contains a personalized URL. The URL will take the user to their personalize Feed.