MobileConnect Journey with Marketing Cloud Connect

Updated: Sep 20, 2018


I recently had the following demo scenario that I needed to present:


Create a Marketing Cloud Journey sending out SMSes from data in Health Cloud.
The SMS's should also reference data stored in Sales Cloud for personalisation.
The Journey audience will be patients that are to be admitted to the hospital in 5 days and need to be communicated with in the days leading up to their appointment

Sounds pretty straightforward right? I envisioned it going something like this:

  1. Setup Marketing Cloud Connect

  2. Setup Synchronized Data Extensions for the Objects required out of Salesforce CRM

  3. Create Queries and Data Extensions to find the segment we need

  4. Use the output Data Extension as the entry into Journey Builder

  5. Setup MobileConnect Messages to be used in Journey Builder

  6. Enjoy the rest of my day


Well, it turns out that this was a slightly more complex process than I anticipated, so I'll break it down in case anyone ever needs reference on how to do this.


Marketing Cloud Connect

This part was surprisingly the easiest part of the setup. I simply followed the Trailhead for Marketing Cloud Connect and it worked first time. It took an hour, but it worked. I prefer the Trailhead version to the help documentation as it's got a bit more context around the installation instructions.


Synchronised Data Extensions

Once I had Marketing Cloud Connect running, I started Synchronising some Data Extensions. The Object I needed was "Account", so I had to first Sync Leads, Contacts and Users to get access to Account. I will note that I needed to refresh the browser at some point to have Marketing Cloud grant me access to Account.

Mobile Connect

This is where things got a bit tricky, as I had to first figure out which fields are required in a Data Extension for use in Mobile Connect.


I thought to myself, let's try importing into MobileConnect first before attempting to use in a Journey.


Well, this turned out to be quite an experience to say the least!


MobileConnect Basics

I have learned the hard way with Marketing Cloud to never take shortcuts, but rather implement and test each part of the build before attempting the final test. It turned out that this was to be a valuable lesson in how MobileConnect functions.


Let's start off with the basics: How do I send an SMS using MobileConnect?


Uploading an Audience

I uploaded an audience into a MobileConnect List via a CSV with the following format:


  1. SubscriberKey

  2. MobileNumber

  3. Locale


I was puzzled by what I should insert as "Locale". The help documentation had no example (as usual). I attempted to import with "aus" and was met with import errors.

ValidationErrors:
        Invalid Country Code: 1

Great.


After a long and tedious process, I uncovered that a 2 digit country code ("au") should be used when importing into MobileConnect Lists, and that the documentation here is of no use but will be useful later when using MobileConnect with Data Extensions. In fact I had already written a Q&A to myself on Stack Overflow previously on how to use MobileConnect which proved to be useful in this brave new world.


The Phone Number must include the country code but should NOT have the "+".


Message Creation

OK, so we finally have a list to use as an Audience. I created the Outbound Message ("hello world!") and attempted to perform my first send.


Checking Tracking, I am greeted with these results.



MobileConnect MarketingCloud


Little wonder I didn't receive my SMS.


I created another Outbound Message (can't re-use the same one for some odd reason, nor delete any of them) and tried using "Test Send" to my own phone number instead of "deploying", hoping that this will somehow work.


No luck either as I didn't receive the SMS (but no tracking due to it being a Test Send without deployment)


Hrmm...


Just as a test, I sent to an Australian number (a team member) instead of a New Zealand number and he received the SMS perfectly.


It turns out that because I'm using an Australian Long Code (phone number), New Zealand carriers block all international SMSes. This prevents me from sending test messages to myself, but luckily I have many Australian colleagues that can assist.

Using a Data Extension in MobileConnect


Right! Onwards and upwards then. MobileConnect works when sending a normal SMS to a MobileConnect list, but I need to get Data Extensions to work to be used in Journey Builder.


I noticed that when choosing my Audience in MobileConnect I could select Data Extensions. There was even a hidden tooltip (which I realised much much later) explaining what the requirements of the Data Extension are:


mobileconnect marketingcloud

The tooltip states that Data Extensions appear in MobileConnect if they meet the following criteria:


  • Contain only one phone type field

  • Contain only one locale type field

  • Subscriber key set as the primary key

  • Data Extension marked as sendable


Seems pretty straightforward, so I created the Data Extension exactly as mentioned.


However, when importing into the Data Extension I was hit with errors over and over again around the "Locale".


I tried using the locale I used previously ("au") when importing into a list in MobileConnect but it just wouldn't accept it.


ValidationErrors:
        The country code you specified: {0} is not valid: 1
Validation results have been logged to a delimited text file and attached to this message.

After scouting around the internet for what seemed like a unreasonable amount of time, I discovered this list of acceptable Locales to be used in a Data Extension.