RelayConsentAction

Prev Next
WARNING
This action makes an external callout to Relay Network. Please be aware of any impacts this has against your Salesforce API limits. Salesforce Callout Limits

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

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

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

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.