Dazza in your app
Add the same agent to your iOS, Android, React Native or Flutter app, with the same knowledge and inbox.
Dazza works in your own app, with the same agent, knowledge and inbox as your website. Settings → Install → In your app shows the snippet for each platform, with your agent’s key already in it.
Platforms
- React Native and Expo. Install with
npm i @dazzaio/react-native react-native-webview. Show the chat withDazzaChatorDazzaChatModal, or addDazzaButton, which has an unread badge. - iOS. In Xcode, choose File → Add Package Dependencies, enter
https://github.com/dazzaio/dazza-sdkand pickDazza. iOS 15 and later. UseDazza.present(from:)in UIKit, orDazzaChatViewin SwiftUI. - Android. Add
maven("https://jitpack.io")to your repositories andimplementation("com.github.dazzaio:dazza-sdk:1.0.0")to your app. Kotlin or Java, minSdk 23. CallDazza.configure, thenDazza.open(context). - Flutter. Add
dazza: { git: { url: https://github.com/dazzaio/dazza-sdk, path: flutter } }to your dependencies. CallDazzaChat.open, or use theDazzaChatwidget.
Any other app
Open your agent’s chat link with ?embed=app in any web view: https://app.dazza.io/w/<your agent key>?embed=app. Add #token=<signed login> for a signed-in customer. The page sends your app a JSON message, { "source": "dazza", "type": "ready" }, "message" for each new reply, or "close" when the customer closes it. Run window.Dazza.identify(token) in the page to sign in later, or identify(null) to sign out.
How it works
- Replies from your team in the inbox reach the app.
- Conversations are kept on the device between launches.
- Links in answers open in the phone’s browser.
Signed-in customers
If customers sign in to your app, pass the same login your server signs for the website chat as the user token. Set it up in Settings → Install → Signed-in customers: the token holds { email, name, sub, exp } and, optionally, attributes such as the customer’s plan, is signed with HS256 and expires within 30 days. See Verify your customers.
Sign the token on your server, never in the app. When the customer signs out, call identify(null). The next person starts a new conversation.
Unread badges
While the chat is open, a callback or event fires for each new reply, so you can show an unread badge.
Push notifications when the app is closed aren’t included.