Sync data back from Atomic to Salesforce Marketing Cloud Data Extensions
Using an Action Flow Send Request step
Within an Action Flow you can sync user input from an Atomic card back in to Salesforce Marketing Cloud.
To do so complete the following steps:
Create API credentials in SFMC
Follow the guide here to do so.
When adding the component, ensure you select:
- Component type:
API Integration - Integration type:
Server-to-server - Set Server-to-Server Properties step: select the components you would like to edit.
This should produce the following API configuration

Add the API credentials to Atomic
Under Configuration > Integrations > Credentials add a new credential
- Name:
SFMC - Credential type:
Client credentials - Client ID:
Client IDfrom your API configuration in the previous step - Client secret:
Client secretfrom your API configuration in the previous step - Identity URL:
Authentication Base URIfrom your API configuration in the previous step withv2/tokenadded to the end- i.e.
https://<your-endpoint>.auth.marketingcloudapis.com/v2/token
- i.e.
- Enter scope: leave this blank
- Request scheme:
Body parameters - Save!
Configure you Action Flow to send data to Salesforce
In this example we have a single card that gathers some information about the user, this then sends that data to a data extension in Salesforce Marketing Cloud.

In this example we have a simple card that captures some data about the user

Once the card is completed the Action Flow uses a Send Request step to send the data the Salesforce Marketing Cloud REST API.
In the Atomic Workbench, add a Send a request step to your Action Flow, and give it the following properties:
- URL:
REST Base URIfrom your API configuration in the previous step plus the target API endpoint- In this example we have
https://<your-endpoint>.rest.marketingcloudapis.com/data/v1/async/dataextensions/key:<key>/rowsin order to target a specific data extension in Salesforce Marketing Cloud. - The
keyis the External Key for the Salesforce Marketing Cloud data extension that you wish to update the card response data with. Data extensions are in the Contact Builder area of SFMC. - They must contain a
Primary Keythat is included in the request from Atomic, in this example the primary key isendUserId.
- In this example we have
- Method:
PUT - Credentials:
SFMCas created in previous step.

The final piece of set-up required for the Send Request step is mapping the data to the expected format required by Salesforce Marketing Cloud. This is managed by scrolling down in the Send Request step settings to Edit Request Mapping. In the example the mapping is:
const myPayload = {
"items": [
{
"endUserId": context.payload.targetUserIds[0],
"firstName": context.flowSteps.card_event_listener_H8guu.output.card.output.textInput_z3jr7,
"lastName" : context.flowSteps.card_event_listener_H8guu.output.card.output.textInput_xDeQC,
"email": context.flowSteps.card_event_listener_H8guu.output.card.output.textInput_bmwXd,
"favoriteFood": context.flowSteps.card_event_listener_H8guu.output.card.output.dropdown_v9oVQ
}
]
}
return myPayload
You'll need to edit this example payload to match with your inputs.
- Replace the
card_event_listener_H8guuwith the event_listener for your card. - Replace the
textInput_z3jr7,dropdown_v9oVQetc with theField name, which you can find in the card editor by selecting the input field (e.g. dropdown, text input...).
Certain Salesforce Marketing Cloud API endpoints expect different payload formats. These examples assume you're using the API endpoints ending in /rows.
If you're using the /rowset APIs, you'll need to adjust the payload format to split the keys and values for each row, otherwise you may receive JSON deserialization errors from Salesforce Marketing Cloud.