Salesforce Marketing Cloud
Salesforce Marketing Cloud hosts the association files on your click domain. You give it your app’s details from Tolinku: an App ID for iOS and a file for Android. Nothing changes in your DNS. When a link opens your app, the Tolinku SDK asks Tolinku where it leads, and Marketing Cloud still counts the click.
For how this works and what it needs, see Email Links.
Before you start
Section titled “Before you start”- A paid Tolinku plan. Email links aren’t on the Free plan.
- Your Apple team ID and bundle ID and/or your Android package name and SHA-256 fingerprint in Settings (Configuring iOS, Configuring Android). Tolinku builds the details you give Marketing Cloud from these.
- App open attribution not set to Always (Attributing App Opens).
- The Admin or Owner role in the Appspace.
- A Sender Authentication Package (SAP) with an SSL certificate on your click domain. iOS links need it.
- Access to Email Studio’s Admin tab and to Marketing Cloud Setup.
Add the domain in Tolinku
Section titled “Add the domain in Tolinku”-
Go to Domains in the sidebar.
-
In the Email links card, click Add email domain.
-
Under Your platform hosts the files, choose Salesforce Marketing Cloud.
-
In Click-tracking domain, enter your Salesforce Marketing Cloud click-tracking domain, for example
click.yourapp.com. Nothing changes in your DNS. -
Click Add email domain. The setup steps open.
Get the details from Tolinku
Section titled “Get the details from Tolinku”Under Upload these files to your email platform, the setup steps show two files, each with a Copy button:
- apple-app-site-association, for iOS. You don’t upload this one: Marketing Cloud builds its own from the App ID. The App ID is the
appIDvalue in the file, your Apple team ID and bundle ID joined by a dot, likeABCDE12345.com.yourcompany.app. - assetlinks.json, for Android. Paste the copied text into a plain text file and save it as
assetlinks.json.
If a file is missing, the step says what to add in Settings first.
Set up iOS in Marketing Cloud
Section titled “Set up iOS in Marketing Cloud”-
In Marketing Cloud, go to Email Studio and open the Admin tab.
-
Click Send Management, then Deep Linking.
-
Click Create.
-
Enter the App ID from Tolinku. Leave Type set to iOS.
-
Turn on Exclude Profile and Unsub Center, so profile and subscription centers stay in the browser.
-
Save the entry.
Set up Android in Marketing Cloud
Section titled “Set up Android in Marketing Cloud”-
In Marketing Cloud, go to Setup.
-
Under Platform Tools, click Feature Settings, then Email Studio, then Deep Linking Applications.
-
Click Browse, choose your
assetlinks.jsonfile, and click Save. -
Wait about ten minutes for it to take effect.
Salesforce’s Trailhead module walks through both: Email Deep Linking in Marketing Cloud.
With this set up, every link in your emails opens the app if it’s installed, except the profile, subscription and unsubscribe centers. That includes links to other websites, so add mc-deep-link="false" to each link that should stay in the browser:
<a href="https://www.yourapp.com/blog" mc-deep-link="false">Read the blog</a>Write your links
Section titled “Write your links”Point app links at your normal Tolinku links, on your Tolinku domain:
<a href="https://links.yourapp.com/product/42">See the product</a>When it’s tapped, Tolinku works out the route from it.
Set up your app
Section titled “Set up your app”The setup steps in the dashboard end with Add the domain to your app, which shows these lines for your domain.
iOS: in Xcode, under Signing & Capabilities, add the domain to Associated Domains:
applinks:click.yourapp.comAndroid: add an intent filter for the domain. Give it its own <intent-filter>, so it doesn’t change how your other link domains are matched.
<intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="click.yourapp.com" /></intent-filter>In your code: pass every link your app opens with to links.resolve. It needs Tolinku SDK 0.8.2 or later, configured with your publishable API key.
if let link = await Tolinku.shared?.links.resolve(url) { route(link.deepLinkPath)}val link = Tolinku.links.resolve(uri.toString())if (link != null) route(link.deepLinkPath)const link = await Tolinku.links.resolve(url);if (link) route(link.deep_link_path);final link = await Tolinku.instance.links.resolve(url);if (link != null) route(link.deepLinkPath);const link = await tolinku.links.resolve(url);if (link) route(link.deep_link_path);When resolve returns nothing, fall back to your own handling. See Set up your app for the full version.
Release the app update before you send emails that rely on it. People with an older version of your app will see links open the browser, as they did before.
Test it
Section titled “Test it”Send a test email to a phone that has the new version of your app, and tap a link to your Tolinku domain. The app should open on the right screen. Tapping a link pasted into Safari’s address bar never opens an app, so always test from an email.
Removing the domain
Section titled “Removing the domain”Delete the Deep Linking entry and the Android file in Marketing Cloud first. Then, in Tolinku, open the domain from the Email links card and click Remove.
If you only remove it in Tolinku, links keep opening your app, but Tolinku no longer says where they lead, so your app falls back to its own handling.
For more questions, see the FAQ.