Deeplinks
Deeplinks are special links to open specific pages or sections inside your app. They follow a pattern and can include information about wich page to open and wich details to show up or load.
Eitri App Shopping comes from out of box with an integrated solution to resolve most common deeplinks used in main ecommerce providers but letting you setup your customized rules, routes and paths.
There are two types of deeplinks that we will talk about in this documentation:
- Traditional deeplinks
- Universal Link (iOS) / App Link (Android)
Requirements
To use deeplinks with Eitri you will need:
- A deeplink resolver addon setup ready in you Eitri App.
- If you are using default deeplink resolver, you need to ask for activation to Eitri team.
- If you plan to use Universal Links (iOS) or App Links (Android) you need to setup your website well-know files as explained in this documentation.
Traditional deeplinks
Deeplinks that use an specific opening protocol to open your app in user's device.
Example:
myapp://category/female/jeans
Structure
Deeplinks may have different structures based on what they do but they have basically 3 main parts:
prefix://action?params
Global supported actions
Eitri App Shopping supports the following a lot of actions for deeplinks by default:
Open Product
Open Product
prefix://product/id/product_id
or
prefix://product/slug/product_slug
Where:
prefix = prefix used for your app
product_id = product id to open (you should use product id, not sku id)
product_slug = product slug to open (you can get it from your vtex website for example)
VTEX: Websites product pages url usually ends with "/p". You need to remove it since it's not part of product slug.
Examples:
Open Product List Page (Vtex categories / Wake hotsites)
Open Product List Page
prefix://category/path_to_category?filter=filters&order=list_order
Where:
prefix = prefix used for your app
path_to_category = full path to category (like: female/jeans)
filters (optional) = filters to consider when showing products
list_order (optional) = order to consider when showing products
Order options:
OrderByPriceDESC: Higher price first
OrderByPriceASC: Lower price first
OrderByTopSaleDESC: Top sales first
OrderByReviewRateDESC: Better reviews first
OrderByNameDESC: Alphabetical from Z-A
OrderByNameASC: Alphabetical from A-Z
OrderByReleaseDateDESC: Release date first
OrderByBestDiscountDESC: Better discount first
OrderByScoreDESC: Better score first
WARNING: We recommend that you encode filters to ensure that special characters will be recognized correctly. Example: "{"color": "black"}" should be sent as "%7B%22color%22%3A%20%22black%22%7D". To encode a content use a lib or website like urlencoder.org
INFO: In apps using Wake Commerce system you can just copy-paste the filters from your website. Example:
prefix://category/blusas?filtro=FiltroCor__AZUL&filtro=Tamanho__P
Examples:
Open Search
Open Search
prefix://search/term_to_search?filter=filters&**order=list_order
Where:
prefix = prefix used for your app
term_to_search = term(s) to search
filters (optional) = filters to consider when showing products
list_order (optional) = order to consider when showing products
Order options:
OrderByPriceDESC: Higher price first
OrderByPriceASC: Lower price first
OrderByTopSaleDESC: Top sales first
OrderByReviewRateDESC: Better reviews first
OrderByNameDESC: Alphabetical from Z-A
OrderByNameASC: Alphabetical from A-Z
OrderByReleaseDateDESC: Release date first
OrderByBestDiscountDESC: Better discount first
OrderByScoreDESC: Better score first
WARNING: We recommend that you encode search terms and filters to ensure that special characters will be recognized correctly. Example: "female tshirts" should be sent as "female%20tshirts". To encode a content use a lib or website like urlencoder.org
INFO: In apps using Wake Commerce system you can just copy-paste the filters from your website. Example:
prefix://search/blusas?filtro=FiltroCor__AZUL&filtro=Tamanho__P
Examples:
Open cart
Open cart
prefix://cart/cart_id
Where:
prefix = prefix used for your app
cart_id (optional) = id of a specific cart. When used loads a specific cart overriding actual user's cart.
WARNING: When using cart_id, the user's cart items will be OVERWRITTEN with the new ones.
Examples:
Open account
Open account
prefix://account
Where:
prefix = prefix used for your app
Examples:
Open Browser/URL
Open Browser/URL
prefix://webview/inapp/url
Where:
prefix = prefix used for your app
url = url address to open
inapp (optional) = if used, it will open the URL inside internal app webview
We recommend that you uri encode the URL content to ensure your special characters are correctly readed. Example: "https://www.mywebsite.com.br/male/shirts" should be passed as "https%3A%2F%2Fwww.mywebsite.com.br%2Fmale%2Fshirts". To encode a content use a lib or website like urlencoder.org
Examples:
Open Wishlist
Open Wishlist
prefix://account/favorites
Where:
prefix = prefix used for your app
Example:
Open Orders List
Open Orders List
prefix://account/orderlist
Where:
prefix = prefix used for your app
Example:
Open Account Pages (Wishlist, Orders and others)
Account module pages can be opened using page enums listed in account eitri-app module. To know all avaliable enums for your app check your developer team.
Open Account Pages
prefix://account/page_enum
Where:
prefix = prefix used for your app
page_enum = enum listed on your account eitri-app module
Examples:
Exclusive Vtex actions
Open Collection
Open Collection
prefix://collection?filters=collection_id&O=order
Where:
prefix = prefix used for your app
collection_id = numeric id to collection
order (optional) = order used to show items from collection
Order options:
OrderByPriceDESC: Higher price first
OrderByPriceASC: Lower price first
OrderByTopSaleDESC: Top sales first
OrderByReviewRateDESC: Better reviews first
OrderByNameDESC: Alphabetical from Z-A
OrderByNameASC: Alphabetical from A-Z
OrderByReleaseDateDESC: Release date first
OrderByBestDiscountDESC: Better discount first
OrderByScoreDESC: Better score first
Examples:
App Link (Android) / Universal Link (iOS)
They need an specific setup in your website to be bound to your domain. Once it's configured, users that have your app installed will be redirected from web site pages directly to your app in respective app pages.
You will need to configure your website to have 2 files hosted in specific paths to work with Android and iOS. Those files will be provided by Eitri.
With most e-commerce providers you can create/update those files by opening a ticket asking for it.
App Link (Android)
File path: https://www.mywebsite.com/.well-known/assetlinks.json
File example:
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target" : {
"namespace": "android_app",
"package_name": "app_bundle_id",
"sha256_cert_fingerprints": ["app_bundle_fingerprint"]
}
}]
Where:
app_bundle_id is your app bundle id in Google Play store.
Example: com.myapp.store
app_bundle_fingerprint is sha256 fingerprint generated for your app.
Example: F8:57:A0:0C:AB:8B:B2:59:92:F7:3D:1D:38:6C:05:17:A8:3F:B1:19:B5:E7:05:5F:ED:B5:B8:27:EA:0C:E3:57
Universal Link (iOS)
File path: https://www.mywebsite.com/.well-known/apple-app-site-association
File example:
Where:
app_bundle_id is your app bundle id in Apple App Store.
Example: com.myapp.store
paths are the url patterns that you want to redirect to your app
Example: "*/p" redirects all urls finishing with "/p" to app since usually they are product pages.