The Power of Deep Linking with Salesforce Marketing Cloud

Getting started with iOS and Android apps

shobivarghese
Slalom Technology
4 min readMar 28, 2024

--

Photo by Keira Burton from Pexels

Customer expectations for your company’s mobile app may seem obvious, but we’ll describe it anyway:

When a customer gets an email from a company, and your company’s app is installed on their phone, when they click a link in the email they expect your app to open and that they will arrive on the specific screen within the app that the email implied. For example, if the email call-to-action reads, “Reserve this car now,” tapping that button should bring them into the app and to a page for reserving that car.

That’s deep linking. And it’s the kind of seamless experience that’s absolutely table stakes for your customers.

If you’re sending emails from Salesforce Marketing Cloud (SFMC), you’re in good shape — with just a bit of legwork and collaboration with your app developers, you’ll be deep linking in no time.

Before getting started

First, ensure you have a Sender Authentication Package implemented, with an SSL certificate. Work with your mobile team on the initial setup if you haven’t done this already.

The process differs between iOS and Android, so we will walk through each of them.

Deep linking for iOS devices

Actions for the mobile app team

  1. Add your Marketing Cloud’s click domain for your instance to the iOS com.apple.developer.associated-domains entitlement.
  2. Reference the webpageURL property on the NSUserActivity object within iOS to identify the proper URLs.
  3. Use a GET call once a URL has been identified from Marketing Cloud. Remember that Marketing Cloud‘s link tracking starts with your instance’s click domain and ends with a query string (it looks like qs=). For the app to find the final URL within the app (the URL where we’re trying to send your subscriber) a GET call is performed on the Marketing Cloud URL. In the headers of the GET call response, there is a location key and value that contains the final URL. Keep in mind that the GET call should not follow the automatic redirect.
  4. Provide the iOS AppID value to the Marketing Cloud team (they’ll need to use this within Marketing Cloud).

If your mobile team needs help, send them to this Create Universal Links for iOS Trailhead document.

Actions for the Marketing Cloud team

  1. Navigate to Email Studio and click on the Admin tab on the far right of the top navigation. If you do not see this, contact your Marketing Cloud administrator.
  2. Go to Deep Linking under Send Management. Click Create, and enter into the AppID field the AppID provided by the mobile app team.
  3. After clicking Save, theapple-app-site-association file will be created on your Marketing Cloud click domain. The URL would resemble: https://click.mymarketingclouddomain.com/.wellknow/apple-app-site-association
Location to enter AppID for iOS devices. Image: Salesforce

Note: If you would like to direct users to the mobile web browser for the preference center, be sure to check the checkbox Exclude Profile and Unsub Center. This will open preference and profile centers in a web browser, not the app.

Additionally, by default, all links in an email (links with the Marketing Cloud click domain) will open in the mobile app. If you would like to open some links in a web browser, you will have to add mc-deep-link=”false” to the <a> tag of the URL.

Deep linking for Android devices

Actions for the mobile app team

Simply provide the Marketing Cloud team with an assetlinks.json file that references the click domain for the Marketing Cloud instance.

Keep in mind that any URL outside your click domain will automatically open in a mobile web browser.

If your mobile team needs help, send them to this Implement Deep Linking for Android document.

Actions for the Marketing Cloud team

  1. In Marketing Cloud, navigate to Setup by hovering over your name in the top right and then clicking Setup.
  2. Search Deep Linking in the quick find search bar.
  3. Click Deep Linking Applications.
  4. Browse to and upload the assetlinks.json file from the mobile app team.
Location to upload assetlinks.json file for Android devices. Image: Salesforce

Test your deep links

We recommend you test deep links on a development version of the mobile app first, to ensure the user experience is working as intended.

Once the mobile app team makes the above changes in the development version of the mobile app and the Marketing Cloud configurations are put in place, send a test email to the mobile app team to ensure the proper links are deep linking to the iOS and Android apps.

If you need more help, check out some of the resources below:

Slalom is a next-generation professional services company creating value at the intersection of business, technology, and humanity. Learn more and reach out today.

--

--

shobivarghese
Slalom Technology

4x Salesforce Marketing Cloud Certified | 7x Salesforce Certified | Currently a Senior Consultant on the Global Salesforce Marketing Cloud team at Slalom