Handle Custom URLs in Chat
Have your agents pass along custom URLs to perform specific actions in your mobile app.
The legacy chat product is scheduled for retirement on February 14, 2026, and is in maintenance mode until then. During this phase, you can continue to use chat, but we no longer recommend that you implement new chat channels. To avoid service interruptions to your customers, migrate to Messaging for In-App and Web before that date. Messaging offers many of the chat features that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in Help.
When an agent sends a standard link to a user in your app, a preview tile appears that the user can tap to view in a browser. However, you can come up with your own URL scheme that displays a custom tile and performs a custom action within your app.
-
Create a custom URL scheme and expression.
Create a URL scheme using the
AppEventListclass. This class allows you to add URLs either for specific paths (such asaction/settings) or using regular expressions (such asaction\\/a.*). Patterns are matched in the order that you add them to theAppEventListobject. Be sure to add items starting with the most specific and ending with the most generic. -
Implement the
AppLinkClickListenerso that you can handle when the user taps on the URL.In order to minimize or maximize the chat window, you need access to the
ChatUIClientthat you used when creating the chat UI. -
Configure the chat SDK using the
ChatUIConfigurationbuilder. Add theAppEventListobject and theAppLinkClickListener.