Skip to main content

Helpshift APIs

Helpshift provides a way to use each functional element of the SDK separately based on your requirements. You can call only specific screens from the SDK based on the functionality you want to expose in your app.

Note

All the public APIs in the SDK should be called after initializing the SDK via install API

Integrating Contact Us & In App Messaging

You can use the API call HelpshiftCocos2dx::showConversation(configMap) to allow a user to directly send feedback or start a new conversation without having to first view FAQs. Once, a 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. To configure SDK, you can pass various config options in a cocos2d::ValueMap. Checkout more config options here.

newConversation.png

Example :

cocos2d::ValueMap getConfig() {
cocos2d::ValueMap configMap;
// Add config value.
return configMap;
}

cocos2d::ValueMap chatConfig = getConfig();
HelpshiftCocos2dx::showConversation(chatConfig);

Integrating FAQs

You can use the API call HelpshiftCocos2dx::showFAQs(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.

showFAQs.png

To configure the FAQs screen, you can pass various config options in a cocos2d::ValueMap. Checkout more config options here.

Example :

cocos2d::ValueMap faqConfig = getConfig();
HelpshiftCocos2dx::showFAQs(faqConfig);

Showing a Particular FAQ Section

You can use the API call HelpshiftCocos2dx::showFAQSection(sectionId, configMap) to invoke a particular section of your FAQs with its FAQ section id. Checkout more config options here.

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.

showFAQSection.png

You'll need the publish-id of the section in this case:

You can use the API HelpshiftCocos2dx::showFAQSection(sectionId, faqConfig) to show a FAQ Section. You will need to pass the section-id of the FAQ section to be shown to this API. Checkout more config options here.

Example :

cocos2d::ValueMap faqConfig = getConfig();
HelpshiftCocos2dx::showFAQSection(sectionId, faqConfig);

Showing a Particular FAQ

You can use the API HelpshiftCocos2dx::showSingleFAQ(publishId, faqConfig) to show a single FAQ. You will need to pass the publish-id of the FAQ to be shown to this API. Checkout more config options here.

showSingleFAQ.png

You'll need the publish-id of the FAQ in this case:

Example :

cocos2d::ValueMap faqConfig = getConfig();
HelpshiftCocos2dx::showSingleFAQ(publishId, faqConfig);

Set SDK language

For more info about this API and languages you can refer here.

Getting SDK Version

You can use sdkVersion API to get the current version of Helpshift SDK X Cocos plugin.

Note

This API is available from 10.3.0 version

  // Returns SDK version as a string eg. "10.3.0"
const char* version = HelpshiftCocos2dx::sdkVersion();

Closing a Helpshift Session

You can use HelpshiftCocos2dx::closeSession API to close an active SDK session. If no SDK session is active, calling this API will have no effect.

Note

This API is available from 10.3.0 version.

  // closes Helpshift sdk session
HelpshiftCocos2dx::closeSession();