Mailing : How to use tokens according to locations and dates

Highlighted
Level 2

Mailing : How to use tokens according to locations and dates

Hi everyone,

 

First, I'll explain what I'm trying to achieve so you can share your best practice on how to do this efficiently.

My company offers training services, some are individual so you can schedule whenever you want and others are group training with specific dates and locations, I'll be focusing on those group training here.

 

What I want to do is to create an emailing campaign to alert my database that training will take place near them. I already have their address so I want as many different emails as there are regions in my country. 

I have all the date and location of the trainings on an Excel doc and I'd like to use the token to select automatically the training location and date of each person.

 

I had to send emails for a first campaign before I knew how to use tokens: I created around 18 campaigns to do so... I'm sure tokens will save me a lot of time for the next campaigns

 

If anybody ever experienced this, I'd be glad to hear your advice and best practices,

Thanks a lot,

Lucas

4 REPLIES 4
Highlighted
Level 10 - Community Moderator

Re: Mailing : How to use tokens according to locations and dates


I have all the date and location of the trainings on an Excel doc and I'd like to use the token to select automatically the training location and date of each person.

 

I had to send emails for a first campaign before I knew how to use tokens: I created around 18 campaigns to do so... I'm sure tokens will save me a lot of time for the next campaigns


What constitutes the right location for someone? Is it an exact match? Some sort of geofencing?

Highlighted
Level 2

Re: Mailing : How to use tokens according to locations and dates

We have around 100 departments, divided into 18 regions: I have the postal code of every one of my contact so when he lives in a particular region, I'd like him to receive the date of training of the cities in that region (maximum 2 cities per region generally)

Highlighted
Level 10 - Community Moderator

Re: Mailing : How to use tokens according to locations and dates

This is a great opportunity to use a Velocity token that stores a Map of the regions and their respective events.

 

#set( $regionalEvents = {
  "Region1" : [
    {
      "name" : "An event",
      "datetime" : "2020-12-22T12:34:56Z"
    },
    {
      "name" : "Another event",
      "datetime" : "2020-12-24T12:34:56Z"
    }
  ],
  "Region2" : [
    {
      "name" : "An event",
      "datetime" : "2020-12-12T14:24:34Z"
    },
    {
      "name" : "Another event",
      "datetime" : "2020-12-13T14:24:34Z"
    }
  ]
} )

 

Then based on the person's region (let's call it $lead.Region although the actual name will be specific to your instance) show them the events.

Highlighted
Level 2

Re: Mailing : How to use tokens according to locations and dates

Thanks for your help ! I will try that as soon as I can,

As I'm a quite recent user of Marketo, I'm not used to using token at the moment so if you have any resources about how to use this piece of code I'd be super interested

 

EDIT : Is it correct according to you ? 

 

#set( $stateEvents = {

  "Auvergne-Rhône-Alpes(This is the name of the state/region)" : [

    {

      "name" : « Lyon (Name of the city,

      "datetime" : "2020-11-23T (Date of the training)"

    },

    {

      "name" : « Clermont-Ferrand »,

      "datetime" : "2020-11-24T"

    }

  ],