--- title: "Relay Event Trigger" slug: "relay-event-trigger" tags: ["sfdc", "consent", "TCPA"] updated: 2025-11-25T21:51:33Z published: 2025-11-25T21:51:33Z canonical: "docs.relaynetwork.com/relay-event-trigger" 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. # Relay Event Trigger The Relay package installs a trigger on its own custom object **RelayEvents__c**. This trigger preforms the following actions: - Locate a matching **Account** record and associate it with the event - Locate a matching **Contact** record and associate it with the event - Handle inbound TCPA consent changes of the custom [Relay Consent](/v1/docs/required-fields#configuring-tcpa-consent-value-field) field on the **Account** record **ONLY!** ### Locate Matching Account Record To associate the Relay Event record to an **Account** (or **Person Account)** record, the **Account** object must contain a field that contains the Relay CCID value. This could be as simple as the **Account ID** field or a custom field. The field name must be configured in the **Relay Custom Metadata** record (see: [Configure Custom Metadata](/v1/docs/relay-package-configuration)). If there are any errors during the account lookup, the field will be left blank. ### Locate Matching Contact Record To associate the Relay Event record to a **Contact** record, the **Contact** object must contain a field that contains the Relay CCID value. This could be as simple as the **Contact ID** field or a custom field. The field name must be configured in the **Relay Custom Metadata** record (see: [Configure Custom Metadata](/v1/docs/relay-package-configuration)). If there are any errors during the contact lookup, the field will be left blank ### Prerequisites for Automatic Inbound TCPA Consent Processing > [!CAUTION] > WARNING > > - If you do not meet all of the prerequisites, then you must implement the TCPA consent changes yourself. See: Consent Management. > - If the **Account** record can’t be found then the TCPA consent value can’t be updated. 1. Consent must be stored in an **Account** record. 2. The Account record must contain a field that contains the **Relay CCID** value. See *Locate Matching Account Record* above. 3. A custom field exists that contains the Relay CCID value. 1. The field must be a *picklist* and accepts the following values: **Express**, **Written**, and **Stop** 2. The field must be **editable** (it can not be a formula) If the prerequisites are met, then the **Relay Event Trigger**, will automatically update the **Relay Consent** field with the new value. > [!NOTE] > NOTE > > If you maintain your own, separate TCPA, consent value, you can place your own trigger on the **Account** record looking for changes in the **Relay Consent** field. Once a change is detected, your trigger can update your TCPA consent value accordingly. Your TCPA consent value can be stored in any object. 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.