Helpshift APIs iOS

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.

All the public APIs in the SDK should be called after initializing the SDK via HelpshiftSdk.install() API

Integrating Contact Us & In App Messaging

newConversation.png

You can use the API call 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 the conversation screen, you can pass various config options in a Dictionary<string, object>. Checkout more config options here

Example :

using Helpshift;

private HelpshiftSdk help;

// install call here
void Awake(){
    help = HelpshiftSdk.GetInstance();
    help.Install(appId, domainName, null);
}

// configuration map
Dictionary<string, object> configMap = new Dictionary<string, object>
        {
            { "tags", new String[] { "foo", "bar" } },
        };

// open the support chat screen
help.ShowConversation(configMap);

Integrating FAQs

You can use the API call 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.

To configure the FAQs screen, you can pass various config options in a Dictionary<string, object>. Checkout more config options here

Example :

using Helpshift;

private HelpshiftSdk help;

// install call here
void Awake(){
    help = HelpshiftSdk.GetInstance();
    help.Install(appId, domainName, null);
}

// configuration map
Dictionary<string, object> configMap = new Dictionary<string, object>
        {
            { "tags", new String[] { "foo", "bar" } },
        };

// open the FAQs screen
help.ShowFAQs(configMap);

Showing a Particular FAQ Section

You can use the API call ShowFAQSection(sectionId, configMap) to invoke a particular section of your FAQs with its FAQ section publish-id

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 :

using Helpshift;

private HelpshiftSdk help;

// install call here
void Awake(){
    help = HelpshiftSdk.GetInstance();
    help.Install(appId, domainName, null);
}

// configuration map
Dictionary<string, object> configMap = new Dictionary<string, object>
        {
            { "tags", new String[] { "foo", "bar" } },
        };

string sectionId = "your_section_id";

// open the particular section
help.ShowFAQSection(sectionId,configMap);

Showing a Particular FAQ

You can use the API ShowSingleFAQ(faqId,configMap) to show a single FAQ. You will need to pass the publish-id of the FAQ to be shown to this API.

Example :

using Helpshift;

private HelpshiftSdk help;

// install call here
void Awake(){
    help = HelpshiftSdk.GetInstance();
    help.Install(appId, domainName, null);
}

// configuration map
Dictionary<string, object> configMap = new Dictionary<string, object>
        {
            { "tags", new String[] { "foo", "bar" } },
        };

string faqId = "your_faq_id";

// open the particular FAQ
help.ShowSingleFAQ(faqId,configMap);

Set SDK language

You can set the SDK language for the given locale using the method SetLanguage("<language-code>") For more info about languages you can refer here

For example :

Setting SDK language for the given locale with only language code.

HelpshiftSdk.GetInstance().SetLanguage("fr");

Setting the SDK language for the given locale with both language code and country code.

HelpshiftSdk.GetInstance().SetLanguage("zh-SG");