Deep links for different platforms

Furlenco has lot of CTA buttons in the chat bot.

The same chat bot they would be deploying it in the android and IOS.

Can we put condition to set different deep links based on different platforms as the code for the bot is the same.

Hey @Vaseem_Kolyari,

Can you share a use case for this? What sort of links are you planning to use?

There would be CTA buttons, which would re direct.

Attaching some screenshots for reference:
Buy from furlenco is a CTA button which would redirect to client website if the bot is hosted on Website.

The same Buy from furlenco CTA button when the bot is hosted on mobile should redirect to internal page of the furlenco mobile app.

PS: 2 different CTA links would be provided by the customer for web and mobile app.

As the script is usually the same for mobile app and web bot will it be possible.

Understood.

Let me discuss this with the team and get back to you on this.

1 Like

Hi @Vaseem_Kolyari
In mobile sdk, customer need to manage the deeplink and navigation.
When customer clicks on a button which contains Deeplink/ URL, in case of mobile sdk you can pass it as an event using code sendIOSEvent.
What ever you will pass in data will be forwarded to client implementing the SDK.
This is how client can listen to event- Android Chatbot SDK | yellow.ai

2 Likes

@Sukrit_Gupta @Purush Please help us with the steps so that the Bot developer can integrate the same into the flows.

CC: @Harshitha_MH

@vaseem here are steps to for deep

Sample flow for adding deeplinking


linking

getQuickReplyDependingOnPlatform

return new Promise(resolve => {
  let payload = data.profile.payload
  if (typeof (payload) == "string") {
    payload = JSON.parse(payload)
  }
  if (payload.Platform == "Android-App") {
    resolve(
      {
        "title": "This is deeplink quick reply reply",
        "options": [
          {
            "title": "Click me",
            "text": "Android deep link"
          }
        ]
      }
    )
  }
  else if (payload.Platform == "iOS-App") {
    resolve({
      "title": "This is deeplink quick reply reply",
      "options": [
        {
          "title": "Click me",
          "text": "iOS deep link"
        }
      ]
    }
    )
  }
  else {
    resolve(
      {
        "title": "This is deeplink quick reply reply",
        "options": [
          {
            "title": "Click me",
            "url": "https://picsum.photos/200"
          }
        ]
      }
    )
  }
});                     

Sending event event

{
  "code":"tokensForProfileFetching",
  "data": "{\"deeplink\":\"app://open.my.AndroidApp\"}"
}

Samples tested on android

Sample test on iOS

Event should be handled by client in SDK code, doc link can be found here

 EventChannel _ymEventChannel = const EventChannel("YMChatEvent");
    _ymEventChannel.receiveBroadcastStream().listen((event) {
      Map ymEvent = event;
      log("event received");
      log("${ymEvent['code']} : ${ymEvent['data']}");
    });

cc: @akshay_bhat

1 Like