AppsFlyer OneLink app for Salesforce Marketing Cloud

At a glance: Create OneLink links using the AppsFlyer OneLink app in Salesforce Marketing Cloud.


Advertisers use Salesforce Marketing Cloud (SFMC) as an email service provider (ESP). Use the AppsFlyer OneLink app in Salesforce to:


Creating OneLink links and running campaigns

Create OneLink links using OneLink, then use them in campaigns as described in the sections that follow. You can create OneLink attribution links directly in AppsFlyer and use them in emails sent through SFMC.

Step Description

[Mandatory] Step to be performed one time


Integrate the AppsFlyer OneLink app in Salesforce
Perform this step once before generating OneLink links

[As needed] Steps to be performed per OneLink link required


Create OneLink links in Salesforce using the AppsFlyer OneLink app per campaign. 


Send emails containing OneLink links generated in the previous step


Test link.

Integrate the AppsFlyer OneLink app with Salesforce 


  • You may need to purchase the AppsFlyer OneLink app from the Salesforce marketplace (AppExchange). Before doing so, consult with your AppsFlyer CSM.
  • This procedure is performed once on app install. 

To integrate the AppsFlyer OneLink app with Salesforce: 

  1.  Install the app in Salesforce:
    1. In Salesforce, go to Salesforce AppExchange.
    2. Search for and install the AppsFlyer OneLink app.
  2. Provide adequate permissions:
    Request your Salesforce Marketing Cloud admin to grant access to the application for individual users or for Business Units. You may need to "hard refresh" to view the new permissions. 
  3. Set up the AppsFlyer server-to-server integration:
    1. From the top bar, open the account menu (email address dropdown) > Setup.
    2. Under Platform Tools in the left pane, click Apps > Installed Packages.
    3. From the top-right corner, click New.
    4. Enter a Name ("AppsFlyer S2S integration") and Description ("Postback app"), and click Save.
    5. Go down to the bottom-center of the page, and click Add Component.
    6. Select the API Integration component, and click Next.
    7. Select the Server-to-Server integration type, and click Next.
    8. Under Scope, select all the checkboxes (to enable all scopes for future use), and click Save.
    9. Copy the following values to be used on the AppsFlyer platform, as described in step 5:
      • Client Id and Client Secret, appearing under the API Integration component.
      • The EID/MID number, appearing in the top-right corner when clicking your business unit. Note: The application is defined at the EID level and given access to specified MIDs, in Scope.
    10. From the top-right corner, click Install, and agree to the Salesforce Terms & Conditions
  4. Provide users with access to the AppsFlyer OneLink app:
    1. From Apps > Installed Packages. select the ACCESS tab.
    2.  Select users who are allowed to use OneLink, and click SaveYou may need to "hard refresh" to view the new permissions. 
  5. Integrate Salesforce with AppsFlyer:
    Note: if you have iOS and Android apps, do this process for each app.
    1. In AppsFlyer, from the side menu, select Collaboration > Partner marketplace.
    2. Search for and select SFMC (PID: sfmcemail_int).
    3. Click Set up integration. You’re directed to the integration setup page. 
    4. From the Integration tab, turn on Activate partner.
      Note: The toggle must stay on (activated) for as long as you work with the partner.
    5. Under General settings and In-app event settings, enter the three values you copied in step 3: SalesForce MID, Client ID, and Client Secret.
    6. Click Save Integration.  
    7. Repeat the process for both iOS and Android, if relevant.
  6. Confirm the completion of AppsFlyer OneLink app installation:
    1. In Salesforce, click the cloud icon on the top-left corner > AppExchange > AppsFlyer OneLink.
    2. From the top menu, click Audience Builder (tab) > Contact builder.
    3. From the top menu, click Data Extensions (tab).
    4. From the left pane, select Data Extensions > AppsFlyer Postback. The events and installs (with your Marketing Cloud account MID) appear. 
    5. Check that the value in the Field Count column is over 40, for both Events and Installs. A lower value means that the app install has failed and you'll need to reinstall it. 

Create OneLink links in Salesforce using the AppsFlyer OneLink app

Create a separate attribution link for each campaign.


To create a OneLink link:

  1. In Salesforce, open the AppsFlyer OneLink app.
  2. Click Add OneLink.
  3. Enter a name in the Link name field. Consider:
    • Choose an easily identifiable name.
    • The link name will be used when applying OneLinks to email campaigns.
  4. In the Base URL field, enter the long-version OneLink URL copied from the AppsFlyer OneLink custom links page.
  5. [Optional] To add more parameters, click Add parameter. See the list of recommended parameters.
  6. [Optional] To set an internal SalesForce marketing cloud macro, click the icon located to the right of a parameter.
    • It is recommended to set a Subscriber key for each OneLink parameter.
    • This lets you connect attributed email conversions back to your Salesforce data.
  7. Click Generate link.

Send emails containing custom attribution links

  1. In Salesforce Email Studio, create a new template or email.
  2. Click the Edit icon, the Content tab, then select Blocks.
  3. Scroll down to find AppsFlyer Button CB or AppsFlyer Image CB.


  4. Drag the image/button into the body of the email.
  5. Click the image/button to edit.
  6. In the Title field, name the image/button.
  7. Select a OneLink link.

  8. Save the email and send it.


For readability purposes, the URL parameters are not URL encoded:

Test your links

To test your attribution links:

  1. Create the appropriate OneLink URL.
  2. Place it in an email.
  3. Send the email to yourself.
  4. Click the link.
  • If you have the app installed on your device, the app should be invoked.
  • If the relevant AppsFlyer SDK deep linking APIs are implemented you are deep linked into the relevant content.
  • A click should appear in both the AppsFlyer dashboard, attributed to the provided media source and campaign.
  • A click appears in Salesforce data.