--- title: "RelayMessageRequest Resource" slug: "relaymessagerequest-resource" updated: 2025-09-05T15:06:52Z published: 2025-09-05T15:06:52Z canonical: "docs.relaynetwork.com/relaymessagerequest-resource" --- > ## 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. # Apex RelayMessageRequest The **RelayMessageRequest** resource is an *Apex-defined* data type that is used to build a request object for triggering a Relay message experience to a user. ## Creating a RelayMessageRequest Resource Create a **RelayMessageRequest** flow resource: 1. Add a new Flow resource by clicking **New Resource** a. If the Flow Toolbox is not visible click on the **Toggle Toolbox** icon in the upper right portion of the screen 2. Populate the **New Resource** fields as follows: | Field | Description | | --- | --- | | Resource Type | Select **Variable**. | | API Name | A value, unique to the current flow. It must begin with a letter and can’t end with an underscore. It also can’t have two consecutive underscores. | | Description | A desciption of the resource and its purpose within the flow. | | Data Type | Select **Apex-Defined**. | | Allow multiple values (collection) | If you are sending a triggering a single Relay message leave this value un-checked. If you are sending a batch of Relay messages, then check this value. | | Apex Class | Select **RelayMessagingRequest**. | | Available for input | Leave un-checked | | Available for output | Leave un-checked | ## Assigning Values to the Resource Once you have the resource created you will want to leverage it within your flow. This is accomplished by adding an **Assignment** element to your flow. Salesforce Docs [Flow Assignment Element](https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_assignment.htm&type=5) This resources has the following variable values: | Field | Description | | --- | --- | | assetId | Optional. If you would like to override the default branding of the Relay message you can provide a Relay asset ID. Please contact your Relay CSM for more information related to asset IDs. | | CCID | **Required**. See: [Relay CCIDs](/v1/docs/relay-ccids) | | clientMessageTag | Optional. This field can be used to pass along a, client defined, value with the triggered Relay message. If populated, this value will be returned with any Relay events related to this experience, it is also available to be used within the Relay Performance Tab of the CXB. | | dynamicInputs | Optional. If specified, the variable must be a list of type [Apex RelayDynamicInput](/docs/relaydynamicinput). This property allows for hyper personalization of each individual user’s triggered message. See: [Personalization with Dynamic Inputs](/docs/relay-dynamic-inputs) | | Id | Optional (unless using dynamic inputs then it is required). The Salesforce record object to be associated with this Messaging Request. This is required when you are using dynamic input_ properties with the message. | | triggerId | **Required**. The Relay trigger ID associated with the Relay message. This can either be the Relay assigned UUID or a client defined trigger ID. See: [Locating the Relay Trigger ID](/v1/docs/a-locating-the-relay-trigger-id) | Every client will have a Relay Client Success Manager (CSM) assigned to the account. This person will be your primary point of contact for the duration of your engagement with Relay Network. 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.