Send pass links in Email Studio
Generate authenticated Wallet Crew pass links in Salesforce Marketing Cloud Email Studio with AMPscript.
Email Studio can distribute authenticated links that open the right The Wallet Crew page for each contact. This is the standard pattern for pass download, reminder, and reactivation emails.
Complete Setup before building the content block.
How pass links work in Email Studio
The link is a JWT signed in Salesforce Marketing Cloud. The payload carries a customer identifier known by The Wallet Crew.
When the email is opened, The Wallet Crew verifies the token and resolves the right customer context.
Build the AMPscript block
The example below signs a token with the contact email.
%%[
var @tenant, @keyId, @json, @jwt, @email, @host
var @epochStart, @expirationDate, @secondsSinceEpoch, @secondsToEnd
set @keyId = '0000-00000000-0000000000-0000'
set @tenant = 'xxx'
set @email = Email
set @host = 'https://app.thewalletcrew.io'
set @epochStart = DateParse('1970/01/01 00:00AM')
set @expirationDate = DateAdd(Now(), '3', 'Y')
set @secondsSinceEpoch = Multiply(DateDiff(@epochStart, Now(), 'MI'), 60)
set @secondsToEnd = Multiply(DateDiff(@epochStart, @expirationDate, 'MI'), 60)
set @json = '{
"email":"@email",
"nbf": @secondsSinceEpoch,
"exp": @secondsToEnd,
"iat": @secondsSinceEpoch,
"iss": "neostore.cloud",
"aud": "@tenant"
}'
set @json = Replace(@json, '@secondsSinceEpoch', @secondsSinceEpoch)
set @json = Replace(@json, '@secondsToEnd', @secondsToEnd)
set @json = Replace(@json, '@tenant', @tenant)
set @json = Replace(@json, '@email', @email)
set @jwt = GetJWTByKeyName(@keyId, 'HS256', @json)
set @link = Concat(@host, '/', @tenant, '/pass?neo.authToken=', @jwt)
]%%Use the Salesforce Marketing Cloud external key value created during Setup as @keyId.
Use the The Wallet Crew tenant identifier as @tenant.
Use the tenant custom domain as @host when a custom domain is configured.
Use another identifier when needed
Email is not the only supported identifier. Any external identifier already known by The Wallet Crew can be used.
For example, a Cegid Y2 customer identifier can replace the email claim.
@customerId is the Salesforce Marketing Cloud field that stores the Y2 identifier.
Insert the link into content
Once @link is generated, Content Builder can attach it to a text link, image, or button.
A minimal example looks like this.
The same link can be reused in an email block, a reusable snippet, or an SMS message when the channel supports dynamic URLs.
Preview and validate
Validation should happen in Content Builder before the block is used in production.
Troubleshooting
The link renders, but the token is empty
Check the source field used in AMPscript.
For email-based links, confirm the contact record exposes a usable Email value.
The link is rejected by The Wallet Crew
Confirm the Salesforce Marketing Cloud symmetric key matches the The Wallet Crew secret configured during Setup.
The wrong customer context opens
Check the identifier used in the JWT payload.
The safest pattern is a stable external identifier already stored in The Wallet Crew.
FAQ
Last updated

