How to Send Destination-specific Data in Event Payload
Learn how to use the integrations object to send destination-specific configuration or data in the event payload.
2 minute read
This guide demonstrates how to use the integrations field of the RudderOption instance to send destination-specific configuration or data in the event payload.
Overview
You can set the <Destination> parameter of the integrations object to an object — this object can contain any specific configuration or data that you want to send to that destination in both cloud and device modes.
Note that:
When you set the <Destination> parameter to an object, the SDK automatically assumes this parameter to be true.
The SDK does not persist the information set using the integrations field across different events. Therefore, you must pass this parameter every time you want to send destination-specific data within an event payload.
Send destination-specific configuration or data
In the following example, the integrations object is used to specify a Mailjet configuration that removes the user from a Mailjet list (with the ID 13314el9Z).
After making the above call, the external ID information gets attached to the context.externalId field and integrations information gets attached to the integrations key at the root level. The final payload will look as follows:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.