Articles in this section
Category / Section

Connect The Wallet Crew with salesforce marketing cloud

Published:
Updated:

Configuration

  1. Access Content Builder

    Log in to your Salesforce Marketing Cloud account and access the user interface and select the “Content Builder” option.

sfmc1.png

  1. Creating new content

    Click on “Create” to start a new content. Then choose the type of content you wish to create. For a dynamic block, you can select “Code Snippet” or a content type compatible with dynamic blocks.

    A “Code Snippet” is a block of HTML, CSS or JavaScript code that allows you to accomplish a specific task by calling up an external block content, without having to rewrite the code each time. The “Code Snippet” allows easy reuse in many contents.

sfmc2.png

  1. Register a Key

    In order to create a secure link. It is required to configure a Key in SFMC.

    To get the Key, go to The Wallet Crew Security here : https://admin.neostore.cloud/tenant/~/security/secrets and copy the first secret

sfmc3.png

In SFMC open Key Management in setup > Administration > Key Management and create a new symmetric key. Paste the Wallet Crew Secret1 in the Pre-Shared Key.  

sfmc4.png

  1. Developing the dynamic block

    In the new workspace, create your content using AMPscript.

    Example of JWT link in AMPScript:

    %%[ 
        /* Global parameters */  
        var @tenant, @keyId, @json, @jwt, @email, @host
        set @keyId = '0000-00000000-0000000000-0000' /* External Identifier of the Key within SFMC*/
        set @tenant = 'xxx' /* where xxx is the name of the tenant in the wallet crew */
        set @email = Email /* this must be the name of the Email field in the DataExtension */ 
        set @host = 'https://app.neostore.cloud' /* Custom domain of the tenant configured in the wallet crew */
    
        /* handle dates */ 
        set @epochStart = DateParse('1970/01/01 00:00AM') 
        set @expirationDate = DateAdd(Now(), "3", "Y") 
        set @seconds = 60 
        set @minutesSinceEpoch = DateDiff(@epochStart,Now(),'MI') 
        set @minutesUntilTheEnd = DateDiff(@epochStart, @expirationDate,'MI') 
        set @secondsSinceEpoch = Multiply(@minutesSinceEpoch,@seconds) 
        set @secondsToEnd = Multiply(@minutesUntilTheEnd,@seconds) 
    
        /* handle jwt token */ 
    
        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)
    
    ]%%
    

    In the payload, it is possible to use any external Id if they are known by The Wallet Crew. For example, if you use Cegid Y2 it is possible to replace the line with email with

    "https://neostore.cloud/customer/identifiers:id.y2.customerId":"@customerId"
    

    where @customerId is the Y2 identifier within SFMC

  2. Adding dynamic parameters

    To make your dynamic block truly dynamic, you need to define parameters that will be fed by the data.

    Use the customization features to link the fields in your dynamic block to data from your Data Extension or other data sources (list, etc).

sfmc5.png

  1. Preview and test

    Before finalizing, preview your dynamic block to make sure it works as intended. Test it with different data, if possible, to check its flexibility and responsiveness to the variables you require.

  2. Registration and use

    Once you’re satisfied with the dynamic block, save it in Content Builder. It will then be available for integration into your emails, web pages or other marketing campaigns using the customization features.

    You can now use your block to integrate it into an email. To integrate it, go to “Email Studio”, then to “Content” and create or select the email according to your objective.

    Example coding of a block snippet with a link for each downloadable element (Apple Wallet or Google Pay) that can be set up:

sfmc6.png

```html
%%[ 
Insert code from step 2
]%%

<meta charset="UTF-8" />

<title>Carte de fidélité</title>

<style>
  .row {
    display: flex;
    justify-content: center;
    margin-bottom: 29px;
  }

  .column {
    width: 300px;
    text-align: center;
    margin: 0 -0px;
  }

  .column img {
    max-width: 300px;
    height: 55px;
    display: block;
    margin: 0 auto;
  }

  strong {
    font-size: 28px;
    font-family: Arial, sans-serif;
  }
</style>

<div class="row">
  <div class="column">
    <strong>Your pass is available</strong>
  </div>
</div>

<div class="row">
  <div class="column">
    <a href="%%=RedirectTo(@link)=%%">
      <img
        src="https://sdk.neostore.cloud/scripts/%%=tenant=%%/cinto@1/google/en.svg"
        alt="Add to Google Wallet"
      />
    </a>
  </div>

  <div class="column">
    <a href="%%=RedirectTo(@link)=%%">
      <img
        src="https://sdk.neostore.cloud/scripts/%%=tenant=%%/cinto@1/apple/en.svg"
        alt="Add to Apple Wallet"
      />
    </a>
  </div>
</div>
```

User Guide

Use Journey Builder to send an email to invite your customer to download their pass and another email confirmation after installing the loyalty card.

Thanks to “Journey Builder” you can design and automatic a customer journey to communicate with your customers if they still haven’t downloaded the loyalty card.

Example of a Customer Journey in “Journey Builder”:

sfmc7.png

Push update

Configuration

A Marketing Cloud Package is a bundle of features, configurations, and functionalities offered by Salesforce Marketing Cloud. These packages often include tools for email marketing, social media advertising, customer segmentation, and analytics. They provide a unified platform for marketers to orchestrate and automate their marketing campaigns.
To install our Wallet Crew Package, follow those steps:

  1. Package Creation
    • Access to your Marketing Cloud
    • From your personal space, select Setup

sfmc8.png

  • In Setup, go to Apps, then Installed Packages

sfmc9.png

  • Select New, and create a new package with Name “The Wallet Crew” and Description “The Wallet Crew integration

sfmc10.png

  • From the Wallet Crew Package, copy the JWT Signin Key

sfmc11.png

  1. Package configuration
    • From your new package, select Add component, then pick Journey Builder Activity

sfmc12.png

  • Populate the fields Name and Description , then in Category pick Messages. Finally in the field  Endpoint URL, enter the URL adress of our application :
    https://app.neostore.cloud/api/**{tenantId}**/webhooks/listeners/sfmc/actions/pushupdate

sfmc13.png

  1. Journey builder configuration
    • Navigate to Journey Builder: Access Journey Builder from the Marketing Cloud dashboard.

sfmc14.png

  • Create a New Journey: Start a Multi-Step-Journey or open an existing one.

sfmc15.png

  • Add The Wallet Crew push update custom Activity

sfmc16.png

  • Configure The Wallet Crew data information

for identifiers uses :

    {
        "id.sfmc.customerId" : "{{Contact.Attribute.Identifier}}"
    }

for additionalData uses :

   {
        "sfmc_message" : "Your message here"
    }

sfmc17.png

New feature !

👉 With the SFMC extension it is now possible to change the passType of the targeted pass using the passType field on the SFMC custom activity.

Values will vary based on your Wallet Crew & SMFC configuration

  • Define the Data Extension configured for the journey
  • Specify the triggers that initiate the journey and the paths that contacts will follow

sfmc18.png

sfmc19.png

  1. Test & activate
  • Test the journey

sfmc20.png

  • Monitor & analyze

sfmc21.png

User guide

In journey builder

sfmc22.png

Access denied
Access denied