SDK Configuration
Helpshift provides several config options which can be used to customize behaviour of the SDK.
All the public APIs in the SDK should be called after initializing the SDK via HelpshiftSdk.install() API
Install time configurations
enableLogging
Upon setting enableLogging to true
, Helpshift SDK logs will be generated in the Xcode console. Turning on logging can help developers resolve common integration issues.
Flag | HelpshiftSdk.ENABLE_LOGGING |
Values | true /false |
Default | false |
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake(){
this.help = HelpshiftSdk.GetInstance();
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add(HelpshiftSdk.ENABLE_LOGGING, true);
help.Install(appId, domainName, configMap);
}
}
enableInAppNotification
If you do not want the in-app notifications support provided by the Helpshift SDK, set this flag to false
.
This behaviour is different for Android, please refer here
Flag | HelpshiftSdk.ENABLE_INAPP_NOTIFICATION |
Values | true /false |
Default | true |
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake(){
this.help = HelpshiftSdk.GetInstance();
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add(HelpshiftSdk.ENABLE_INAPP_NOTIFICATION, true);
help.Install(appId, domainName, configMap);
}
}
inAppNotificationAppearance
Customization of the appearance of in-app notification using the flag inAppNotificationAppearance
. This config represents the appearance of the in-app notification in the SDK. When the agent/bot sends a message and the user is using the app, an in-app banner is shown and the appearance of that banner can be customized using this dictionary
Flag | HelpshiftSdk.INAPP_NOTIFICATION_APPEARANCE |
Sub-Options: | bannerBackgroundColor / textColor |
bannerBackgroundColor
The bannerBackgroundColor represents the background color of the banner of the in-app notification. The value for this key should be a 6-characters string representing the HEX value of the color.
textColor
The textColor represents the text color of the text shown in the in-app notification. The value for this key should be a 6-characters string representing the HEX value of the color
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake(){
this.help = HelpshiftSdk.GetInstance();
Dictionary<string, object> configMap = new Dictionary<string, object>();
Dictionary<string, object> inAppNotificationAppearance = new Dictionary<string, object>();
inAppNotificationAppearance.Add(HelpshiftSdk.INAPP_NOTIFICATION_BANNER_BACKGROUND_COLOR, "000000");
inAppNotificationAppearance.Add(HelpshiftSdk.INAPP_NOTIFICATION_BANNER_TEXT_COLOR, "FFFFFF");
configMap.Add(HelpshiftSdk.INAPP_NOTIFICATION_APPEARANCE, inAppNotificationAppearance);
help.Install(appId, domainName, configMap);
}
}
Enable Contact Us
Controls the visibility of the Helpshift Contact Us button when a user is viewing FAQs. You can customize this option to make it easier or more difficult to contact support. If specified, this configuration takes precedence over the value of Enable Contact Us set on admin dashboard.
Possible values are "ALWAYS"
/ "AFTER_VIEWING_FAQS"
/ "AFTER_MARKING_ANSWER_UNHELPFUL"
/ "NEVER"
.
For example
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake() {
this.help = HelpshiftSdk.GetInstance();
help.Install(appId, domainName);
}
void OpenHelpshift() {
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add("enableContactUs", "AFTER_VIEWING_FAQS");
help.ShowFAQs(configMap);
}
}
Conversation prefill text
Setting conversationPrefillText
in the config allows you to set some text in the user's input box. This text will be inserted provided that:
- There is no ongoing (active) issue for the user.
- Text inputs are enabled for new conversations (e.g. the User Reply Input Type is not "Only Intent Menu").
The end-user can edit this text before sending it. There is a limit of 1,000 characters for this configuration value, so only the first 1,000 characters will be kept in the user input.
We recommend keeping your actual text even shorter for a better user experience, since the user has to read and edit it before sending it.
Example:
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake() {
this.help = HelpshiftSdk.GetInstance();
help.Install(appId, domainName);
}
void OpenHelpshift() {
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add("conversationPrefillText", "INSERT YOUR PREFILL TEXT");
help.ShowConversation(configMap);
}
}
Conversation Initial User Message
Initial user message configuration, initialUserMessage
, helps you send the first message in a conversation on behalf of the user so that certain workflows are automatically triggered based on that message.
You should set this configuration before a conversation starts. In other words, it works only when there is no active conversation for the user i.e. when a new user opens the chat screen for the first time or existing user has already closed an ongoing conversation.
If you set this configuration in the middle of an existing conversation, it will not have any effect.
Example:
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake() {
this.help = HelpshiftSdk.GetInstance();
help.Install(appId, domainName);
}
void OpenHelpshift() {
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add("initialUserMessage", "INSERT YOUR INITIAL USER MESSAGE");
help.ShowConversation(configMap);
}
}
Clearing Initial User Message
If the end user starts a new conversation immediately in the same session,
then, by default, the initial user message is applied to all subsequent issues in the same session.
You can change this behaviour by setting the initialUserMessage
key in subsequentIssuesInSameSessionConfig
to an appropriate value.
You can set the initial user message to an empty string, which will clear it and allow the end-user to type a message for their subsequent issues. Alternatively, you can also supply a non-empty string which will be used for all subsequent issues in the same session.
We recommend setting this value to an empty string unless you want to run specific automation flows for subsequent issues in the same session.
Currently, only the initial user message can be reset. Tags, Custom Issue Fields, and Conversation Prefill Text values stay the same for subsequent issues in the same session.
Example:
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake() {
this.help = HelpshiftSdk.GetInstance();
help.Install(appId, domainName);
}
void OpenHelpshift() {
Dictionary<string, object> subsequentIssuesInSameSessionConfigMap = new Dictionary<string, object>();
subsequentIssuesInSameSessionConfig.Add("initialUserMessage", "")
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add("initialUserMessage", "INSERT YOUR INITIAL USER MESSAGE");
configMap.Add("subsequentIssuesInSameSessionConfig", subsequentIssuesInSameSessionConfig)
help.ShowConversation(configMap);
}
}
Best Practices
- Provide tier-based support by setting enableContactUs to
ALWAYS
for paid users andAFTER_VIEWING_FAQS
for unpaid ones. - Provide country based support by setting enableContactUs to
ALWAYS
for local users andAFTER_VIEWING_FAQS
for foreign ones.
Full privacy
In the config
dictionary of help.ShowConversation(config);
API at the time of calling this API, setting the fullPrivacy
option to true
ensures COPPA compliance by:
- Disabling user-initiated screenshots (users will not be able to attach files, including images, using SDK).
- Making sure that Personally Identifiable Information (PII) such as name and email are not collected by SDK (using Identity Bot and/or the helpshiftConfig object). This means that if you set
userName
anduserEmail
, withfullPrivacy
set totrue
, Helpshift will not use theuserName
anduserEmail
values.
Moreover, in scenarios where the user attaches objectionable content, it becomes a huge COPPA compliance concern. This option helps to solve this problem.
For example
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake() {
this.help = HelpshiftSdk.GetInstance();
help.Install(appId, domainName);
}
void OpenHelpshift() {
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add("fullPrivacy", true);
help.ShowConversation(configMap);
}
}
Full Screen on iPad
The presentFullScreenOniPad
flag will determine whether to present support views in UIModalPresentationFullScreen
or UIModalPresentationFormSheet
modal presentation style on iPad. This config has no effect on iPhones.
The default value is false
, which presents support views in UIModalPresentationFormSheet
. When the value is set to true
, support views are presented in UIModalPresentationFullScreen
. Use this setting to show Helpshift in full-screen mode.
Option | presentFullScreenOniPad |
Values | true / false |
Default | false |
Min SDK | v10.0.0 |
Supported by | showConversation/showFAQs/showFAQSection/showSingleFAQ |
For example
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake() {
this.help = HelpshiftSdk.GetInstance();
help.Install(appId, domainName);
}
void OpenHelpshift() {
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add("presentFullScreenOniPad", true);
help.ShowConversation(configMap);
}
}
Initiate new conversation on chat screen load
In config dictionary of showConversation:
, setting the initiateChatOnLoad
option to true
will start a new conversation if the previous issue is resolved, without the end user clicking the New Conversation button or going through the post resolution flows like feedback bots of the previous issue.
Option: | initiateChatOnLoad |
Values: | true / false |
Default: | false |
Min SDK | v10.0.0 |
Supported by: | showConversation |
using Helpshift;
// other imports
public class MyGameControl : MonoBehaviour
{
private HelpshiftSdk help;
void Awake() {
this.help = HelpshiftSdk.GetInstance();
help.Install(appId, domainName);
}
void OpenHelpshift() {
Dictionary<string, object> configMap = new Dictionary<string, object>();
configMap.Add("initiateChatOnLoad", true);
help.ShowConversation(configMap);
}
}
UI Configurations
This config represents the theming of Helpshift SDK. For more information check design.
Tracking
This config represents the tracking user actions. For more information check tracking.