Salesforce Marketing Cloud
Configure The Wallet Crew to send transactional emails through Salesforce Marketing Cloud.
Use this connector when you want The Wallet Crew to send transactional emails through Salesforce Marketing Cloud, while Salesforce Marketing Cloud remains the place where your Brand manages email assets, tracking, and reporting.
This integration uses the script email provider. The Wallet Crew triggers the send. Your script forwards the event to Salesforce Marketing Cloud.
How it works
The Wallet Crew calls your implementation of runtime.scriptable.emailEngine.SendEmail. Your script then calls the Salesforce Marketing Cloud REST API to fire an event (using an EventDefinitionKey). Salesforce Marketing Cloud uses that event payload to render and send the email.
This model avoids duplicating templates. Salesforce Marketing Cloud owns the template. The Wallet Crew only sends the variables Salesforce Marketing Cloud needs, like the pass download URL and localized CTA label.
If you haven’t set up the script provider yet, start with EmailSender extensibility.
Before you start
You need three things:
A Salesforce Marketing Cloud Installed Package that can call REST APIs (client id + client secret).
A Salesforce Marketing Cloud asset that can be triggered by API, exposing an
EventDefinitionKey.A stable identifier in your Wallet Crew email payload (example:
id.customerId) to generate the pass URL.
Setup required in Salesforce Marketing Cloud
In Salesforce Marketing Cloud, create an API-triggered entry point and the associated email content.
Create an Installed Package and keep the Client Id and Client Secret.
Create the send asset you want to trigger (typically a journey entry event or an API event), then copy its
EventDefinitionKey.Make sure your Salesforce Marketing Cloud email template expects the same variable names you will send in
Data.
Salesforce Marketing Cloud setup varies by account configuration and feature set. Keep your payload contract stable: the field names in Data should match what your Salesforce Marketing Cloud asset expects.
Enable Salesforce Marketing Cloud in The Wallet Crew
Set the provider to script so The Wallet Crew calls your SendEmail implementation.
Script example (trigger a Salesforce Marketing Cloud event)
This example triggers a Salesforce Marketing Cloud event using the REST endpoint interaction/v1/events. It sends a localized title, a localized CTA label, and a Wallet Crew pass URL built from a customer identifier.
This implementation delegates rendering to Salesforce Marketing Cloud. The Wallet Crew buildEmail() callback is intentionally not used.
What to validate
Trigger a real transactional email, then validate end-to-end:
The Wallet Crew calls your script without errors.
The Salesforce Marketing Cloud API call returns an
eventInstanceId.Salesforce Marketing Cloud renders the email with
Title,Url, andLabelCTA.The CTA opens the Wallet Crew URL and the pass can be installed.
Troubleshooting
If sends fail, isolate the problem in this order:
OAuth fails (401/403): client id/secret is wrong, revoked, or the installed package lacks API access.
No
eventInstanceId: theEventDefinitionKeyis invalid, unpublished, or the payload schema is rejected.Empty variables in the email: the Salesforce Marketing Cloud template expects different field names than what you send in
Data.Wrong language:
cultures[0]does not match your locale map. Add a fallback (example: default toen).
FAQ
Does Salesforce Marketing Cloud or The Wallet Crew own the email HTML?
Salesforce Marketing Cloud owns the HTML in this model. The Wallet Crew sends only variables (title, CTA label, URL) so your marketing team can iterate on the template without shipping Wallet Crew changes.
Can we still use Wallet Crew templates and buildEmail()?
Yes, but it becomes a different strategy. In that model, The Wallet Crew renders Subject and Body, and Salesforce Marketing Cloud is only used as a delivery gateway. If you want that, align the Salesforce Marketing Cloud asset to accept rendered HTML and avoid double-templating.
Last updated

