Helpshift APIs
Helpshift provides a way to use functional element of the SDK based on your requirements.
All the public APIs in the SDK should be called after initializing the SDK via Helpshift.install() API
Integrating Contact Us & In App Messaging
You can call Helpshift.showConversation(MyActivity.this, configurationMap)
to allow a user to directly send feedback or start a new conversation without having to first view FAQs. Once user starts a new conversation, this API call will show the conversation screen. The conversation will continue until it is resolved or rejected by the agent.
Example:
// config map
Map<String, Object> config = new HashMap<>();
// set tags for tracking
config.put("tags", new String[]{"foo", "bar"});
// set custom issue fields
Map<String, Object> cifMap = new HashMap<>();
Map<String, String> isPro = new HashMap<>();
isPro.put("type", "boolean");
isPro.put("value", "true");
cifMap.put("is_pro", isPro);
config.put("cifs", cifMap);
//..etc
// pass the config map in the api
Helpshift.showConversation(MainActivity.this, config);
Helpshift.showConversation(MyActivity.this, configMap);
where MyActivity.this
is the Activity you're calling Helpshift from and configMap
is the configuration map that you want to pass to configure the SDK.
Supports these API Options.
Integrating FAQs
You can use the API call Helpshift.showFAQs(Activity a, Map<String, Object> configMap)
to provide a way for the user to invoke the purpose built help/support section in your app. This is the easiest approach to enable help in your app as it bundles all the capabilities of the Helpshift SDK in a simple and intuitive interface. You can wire this api call to a "Help" or "Support" action in your app.
This Activity combines the FAQ, Search and Contact Us functionality together in a single interface. In this view, a user can search for a specific question in the FAQ failing which they can report an issue. When you respond back to their question from the Helpshift Agent Dashboard, the reply will be shown as a count besides Contact Us, clicking on which will open up the conversation.
Example:
Helpshift.showFAQs(MyActivity.this, configMap);
where MyActivity.this
is the Activity you're calling Helpshift from and configMap
is the configuration map that you want to pass to configure the SDK.
Supports these API Options.
Showing a Particular FAQ Section
You can use the API call
Helpshift.showFAQSection(Activity a, String sectionPublishId, Map<String, Object> configMap)
to show FAQs from a particular FAQ section.
You will need the publish-id
of the FAQ section to use this API:
This feature works like a permalink for displaying specific FAQ sections as context sensitive help in your app. For example, if your app requires the user to login to using email, facebook and twitter, you could wire a help action on the login screen that can link to the Helpshift FAQ section called "Login help" which has several questions related to login methods.
Example:
Helpshift.showFAQSection(MyActivity.this, "11", configMap);
where MyActivity.this
is the Activity you're calling Helpshift from and "11" is the FAQ section publish-id
Supports these API Options.
Showing a Particular FAQ
You can use the API call Helpshift.showSingleFAQ(Activity a, String questionPublishId, Map<String, Object> configMap)
to show a single FAQ.
You'll need the publish-id
of the FAQ to use this API:
Example: Helpshift.showSingleFAQ(MyActivity.this, "51", configMap);
where MyActivity.this
is the Activity you're calling Helpshift from and "51" is the FAQ publish-id.
Supports these API Options.
Set SDK language
For more info about this API and languages you can refer here.
Getting SDK Version
You can use getSDKVersion
API to get the current version of Helpshift SDK X.
This API is available from 10.3.0 version
// Returns SDK version as a string eg. "10.3.0"
String helpshiftVersion = Helpshift.getSDKVersion();
Closing a Helpshift Session
You can use Helpshift.closeSession
API to close an active SDK session. If no SDK session is active, calling this API will have no effect.
This API is available from 10.3.0 version.
// closes Helpshift sdk session
Helpshift.closeSession();
User Hub APIs
Our new Identity system - User Hub, introduces various APIs for managing users and their data. Refer to the linked section for details.