circle-exclamation
This documentation is currently under development. Certain sections are not yet complete and will be added shortly.

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.

chevron-rightReal-world exampleshashtag
  • A welcome email gives a new loyalty member direct access to the pass page.

  • A reminder email targets contacts who still did not install the pass.

  • A reactivation email opens the pass page without a separate sign-in step.

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.

AMPscript example
%%[
    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.

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.

1

Preview with a known contact

Use a test contact with a known identifier and render the content.

2

Check the generated URL

Confirm the rendered URL contains a non-empty neo.authToken value.

3

Confirm the expected The Wallet Crew page opens for the correct customer.

Troubleshooting

Check the source field used in AMPscript.

For email-based links, confirm the contact record exposes a usable Email value.

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

chevron-rightIs email the only supported identifier?hashtag

No. Any identifier already known by The Wallet Crew can be used.

Email is only the most common starting point.

Last updated