--- title: "RelayConsentAction" slug: "relayconsentaction" updated: 2025-09-19T15:25:40Z published: 2025-09-19T15:25:40Z canonical: "docs.relaynetwork.com/relayconsentaction" excludeFromExternalSearch: true --- > ## 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. # RelayConsentAction WARNINGThis action makes an external callout to Relay Network. Please be aware of any impacts this has against your Sales*f*orce API limits. [Salesforce Callout Limits](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_timeouts.htm) > [!WARNING] > IMPORTANT > > It is very important that any user change to TCPA consent is sent to Relay. This ensures Relay will not send messages in violation of TCPA laws. The Relay Consent Flow Action is used send TCPA consent changes to the Relay platform. This is a very simply flow action with just two required input values; the mobile phone number and the new consent value associated with it. An important aspect of TCPA consent is that consent is to the mobile phone number and not an individual user. This means a user could have multiple mobile phone numbers with allowed consent on one number and denied consent on another. > [!CAUTION] > CAUTION > > When you send a consent change to Relay, the Relay platform after processing the change will emit a **RelayEvent__c** record back to Salesforce with the noted change. This can be used as a confirmation that the consent value was in fact received and processed by Relay. However, if you also have a Flow handling consent changes originating from Relay (such as when a user texts in the word *stop*) you want to be careful and not create an endless loop of consent changes. Therefore, you should only send changes to Relay when the Salesforce field consent field did in fact change. When processing inbound Relay consent changes, you should only update your Salesforce record if the consent value is different from the value currently stored in the record. ## RelayConsentAction Input Values ![rn-sfdc-flow-action-consent](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/rn-sfdc-flow-action-consent.png) | Field | Description | | --- | --- | | Send via future Send via Background job | Optional. This property instructs the Relay action on how to make the callout. If set to *True*, the all callouts we be preformed in a background job. This is useful to prevent delays in processing of the flow's primary logic. It is also useful to prevent *"You have uncommitted work pending"* exceptions in your primary flow. If set to *False*, the callout will occur in your current path. Leveraging a future Valid values are: - **{!$GlobalConstant.True}** = Run the Relay action in a background job. - **{!$GlobalConstant.False}** = Run the Relay action in the current flow context. | | Relay Client Id | Optional. This value is only required when your org is configured to support multiple Relay Client IDs. See: [Custom Metadata](/docs/relay-package-configuration) | | Batch Consent | Optional. Allows sending a batch of consent changes to Relay. From a Salesforce perspective, this is the most efficient option when making a large number of consent changes as it will drastically reduce the number of callouts to Relay. If this input is set, it must be a resource apex variable of type: - **RelayConsent** for unmanaged package - **RelaySF__FlowChannelConsent** for managed package | | Mobile Phone | Required unless a *Batch Consent* input is provided. Specifies the mobile number associated with the TCPA consent change. | | New Consent | Required unless a *Batch Consent* input is provided. Specifies the new TCPA consent value associated with the *Mobile Phone* input field. | Telephone Consumer Protection Act (TCPA) requires that the recipient of the SMS (your customers) must grant permission for you to send them text messages An Apex callout enables you to tightly integrate your Apex with an external service by making a call to an external Web service or sending a HTTP request from Apex code and then receiving the response. Apex provides integration with Web services that utilize SOAP and WSDL, or HTTP services (RESTful services).