Apex RelayMessageRequest
  • 13 Nov 2024
  • 2 Minutes to read
  • Dark
    Light

Apex RelayMessageRequest

  • Dark
    Light

Article summary

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

This resources has the following variable values:

Field

Description

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.

CCID

Required.

See: Relay CCIDs

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

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.

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.


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence