# OneLink Template Creation

## OneLink Template Creation

{% hint style="info" %}

### **Important**

Before creating a OneLink for your retargeting campaign, you must first **create a OneLink Template.**

Setting up a OneLink requires actions from **both MARKETER and DEVELOPER.**
{% endhint %}

**Marketer Actions**

1. Navigate the AppsFlyer UI: Engage > OneLink Management > New OneLink Template.

2. Name the template, choose the subdomain, and select the app.\
   ![](/files/3Q38pY7E17hx3jRy9NT2)

3. In the same OneLink Template, configure both iOS and AOS settings:

   1. iOS Universal Links: Under "**When app is installed > Launch the app using iOS Universal Links**", fill out the [Team ID (App ID Prefix) and Bundle ID](https://dev.appsflyer.com/hc/docs/dl_ios_init_setup#getting-the-app-bundle-id-and-prefix-id:~:text=iOS%20Universal%20Links-,Getting%20the%20app%20bundle%20ID%20and%20prefix%20ID,-Log%20into%20your) (TeamID should be provided by your development team. You may share this guide with them for reference).\
      ![](/files/ibbo1wBCLZQbZyNaTKHV)\
      ![](/files/FKuIhG8XDlqODZXC16T4)
   2. Android App Links: Under **"When app is installed > Launch the app using Android App Links"**, fill out the [SHA256 fingerprint](https://dev.appsflyer.com/hc/docs/dl_android_init_setup#adding-app-link-intent-filter-to-main-activity:~:text=to%20the%20marketer.-,Generating%20a%20SHA256%20fingerprint%20while%20in%20production,-The%20SHA256%20fingerprint) (SHA256 should be provided by your development team. You may share this guide with them for reference).  \
      ![](/files/FdWEc4fW7qQk9YR58pPa)\
      \
      ![](/files/lZOF3lBjUKMmVoOpEerX)

4. An auto-generated intent-filter code appears, provide the intent-filter code to the Android Developer.

5. Provide the subdomain created in Step 2 to both your iOS and Android Developers for the application setup.

6. Click Save OneLink template.

\
For iOS setting, please continue the instructions in [iOS Universal Link](#ios-universal-link)\
For AOS setting, please continue the instructions in [AOS App Link](#aos-app-link)

***

### iOS Universal Link

**Developer Action**

1. Enabling associated domains:\
   [Configure app to register approved domains](https://dev.appsflyer.com/hc/docs/dl_ios_init_setup#enabling-associated-domains:~:text=your%20app.-,Configuring%20mobile%20apps%20to%20register%20approved%20domains,-Configuring%20mobile%20apps): add the subdomain (from Marketer) in Xcode.\
   Example:\ <img src="/files/3fLBKXDBGuDMQ48Qy01m" alt="" data-size="original">
2. Implement Deep linking code:\
   **We highly recommend following this step-by-step tutorial to finish the setup and implement the code under "Deep linking" section**: <https://dj.dev.appsflyer.com/>\
   ![](/files/Hsg4KDLfPPC3SHJoCtyj)\
   \
   You can also refer to this website for the details:\
   <https://dev.appsflyer.com/hc/docs/dl_ios_unified_deep_linking#implementation>

→ **Once the OneLink Template is completed, AppsFlyer automatically generates the AASA file and hosts it for you. Note that it can take up to 1 hour for OneLink Template updates to take effect.** &#x20;

***

### AOS App Link

**Developer Action**

1. Open the app's AndroidManifest.xml file, add the [intent-filter code](https://dev.appsflyer.com/hc/docs/dl_android_init_setup#:~:text=to%20the%20marketer.-,Adding%20App%20Link%20intent%2Dfilter%20to%20main%20activity,-Get%20the%20auto) to main activity.
2. Implement Deep linking code:\
   **We highly recommend following this step-by-step tutorial to finish the setup and implement the code under "Deep linking" secion**: <https://dj.dev.appsflyer.com/>\
   ![](/files/Hsg4KDLfPPC3SHJoCtyj)\
   You can also refer to this website for the details:\
   <https://dev.appsflyer.com/hc/docs/dl_android_unified_deep_linking#implementation>

→ **Once the OneLink Template is completed, AppsFlyer automatically generates the Digital Asset Links JSON file and hosts it for you. Note that it can take up to 1 hour for OneLink Template updates to take effect.**

## Next Step

After finishing the OneLink Template Creation, please follow the [AppsFlyer - App Reengagement Campaign Settings](/app-campaign/appsflyer-integration/appsflyer-app-reengagement-campaign-settings.md) for the Integrated Partner setup.

{% hint style="info" %}

### Relevant Material&#x20;

* [Appsflyer's Android deeplink setup guide](https://dev.appsflyer.com/hc/docs/dl_android_overview) **(For Developers)**
* [Appsflyer's iOS deeplink setup guide](https://dev.appsflyer.com/hc/docs/dl_ios_overview) **(For Developers)**
* [Appsflyer's create OneLinks template](https://support.appsflyer.com/hc/en-us/articles/207032246-Create-a-OneLink-template#add-redirection-logic-for-existing-app-users) **(For Marketers) \[Note: Step 5 is For Developers]**
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adcloud.appier.com/app-campaign/appsflyer-integration/appsflyer-app-reengagement-campaign-settings/onelink-template-creation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
