Support Tools Integration for Android
To debug support tickets effortlessly, all you have to do is extract the session URL from Instabug and send it as a custom attribute to your preferred support tools. This enables your support team to view Session Replays for every issue reported, assisting in the debugging process. You can use the below API to extract the session URL.
val callback = object: OnSessionReplayLinkReady{
override fun onSessionReplayLinkReady(link: String?){
//TODO: Do something with the link
}
}
// or
val callback = {link: String? ->
//TODO: Do something with the link
}
SessionReplay.getSessionReplayLink(callback)
// or
SessionReplay.getSessionReplayLink{link->
//TODO: Do something with the link
}
OnSessionReplayLinkReady callback = new OnSessionReplayLinkReady() {
@Override
public void onSessionReplayLinkReady(@Nullable String id) {
//TODO: Do something with the link
}
};
SessionReplay.getSessionReplayLink(callback)
// or
SessionReplay.getSessionReplayLink((String)->{
//TODO: Do something with the link
})
Zendesk Example
To automatically attach the session URL to every support ticket submitted through Zendesk, insert the following snippet into your application's code.
Send Session URLs as tags:
var zendeskRequest: CreateRequest? = null
SessionReplay.getSessionReplayLink { replayLink ->
zendeskRequest = CreateRequest().apply {
subject = "Session replay"
description = "Adding session replay url"
tags = listOf(replayLink)
}
}
CreateRequest zendeskRequest = new CreateRequest();
SessionReplay.getSessionReplayLink((replayLink) -> {
zendeskRequest.setSubject("Session replay");
zendeskRequest.setDescription("Adding session replay url");
zendeskRequest.setTags(Collections.singletonList(replayLink));
});
Send Session URLs as custom fields:
var zendeskRequest: CreateRequest? = null
SessionReplay.getSessionReplayLink { replayLink ->
zendeskRequest = CreateRequest().apply {
subject = "Session replay"
description = "Adding session replay url"
val field = CustomField(1234, replayLink)
customFields = listOf(field)
}
}
CreateRequest zendeskRequest = new CreateRequest();
SessionReplay.getSessionReplayLink((replayLink) -> {
zendeskRequest.setSubject("Session replay");
zendeskRequest.setDescription("Adding session replay url");
CustomField linkField = new CustomField(1234L, replayLink);
zendeskRequest.setCustomFields(Collections.singletonList(linkField));
});
Intercom Example
To automatically include the Session URL with each support ticket received via Intercom, integrate the following code snippet into your application. This will send the session URL to the recent events section.
SessionReplay.getSessionReplayLink { replayLink ->
Intercom.client().apply {
logEvent("session-replay-url", mapOf("url" to replayLink))
present()
}
}
SessionReplay.getSessionReplayLink((replayLink) -> {
Intercom client = Intercom.client();
client.logEvent("session-replay-url", Collections.singletonMap("url", replayLink));
client.present();
});
Updated 6 months ago