Skip to main content

SDK Configuration

Helpshift provides several configuration options that you can use to customize the behavior of the SDK. Use these options in conjunction with our Helpshift APIs.

Note

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

Common configurations

Common configurations apply to both iOS and Android platforms.

Enable Logging

Upon setting enableLogging to true, Helpshift SDK logs will be generated in the Visual Studio console. These logs can be useful for debugging the SDK during integration. Turning on logging can help developers resolve common integration issues. The verbosity of the logs will change depending on whether the app is compiled for Debug or Release mode. We log more information in debug mode than in release mode.

Option:enableLogging
Values:true / false
Default:false
Min SDKv10.2.0
Supported by:Install()

Example:

using HelpshiftApi;

namespace App
{
public class AppDelegate : UIApplicationDelegate
{
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
Dictionary<string, object> installConfig = new Dictionary<string, object>();
installConfig.Add("enableLogging", true);
// Add any other install config parameters
Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig);
}
}
}

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.

OptionenableContactUs
Values"ALWAYS" / "AFTER_VIEWING_FAQS" / "AFTER_MARKING_ANSWER_UNHELPFUL" / "NEVER"
Defaultnull
Min SDKv10.2.0
Supported byShowFAQs(), ShowFAQSection(), ShowSingleFAQ()

Example:

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("enableContactUs", "AFTER_VIEWING_FAQS");
// other configs...
Helpshift.ShowFAQs(this, config);

Best Practices

  • Provide tier-based support by setting enableContactUs to ALWAYS for paid users and AFTER_VIEWING_FAQS for unpaid ones.
  • Provide country based support by setting enableContactUs to ALWAYS for local users and AFTER_VIEWING_FAQS for foreign ones. Example Code:
using CoreTelephony;

CTTelephonyNetworkInfo netinfo = new CTTelephonyNetworkInfo();
CTCarrier carrier = netinfo.SubscriberCellularProvider;
string enableContactUsValue = "AFTER_VIEWING_FAQS";
if (carrier.MobileCountryCode == "<LOCAL_COUNTRY_CODE>")
{
enableContactUsValue = "ALWAYS";
}
Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("enableContactUs", value);
Helpshift.ShowFAQs(this, config);

Full privacy

Full privacy option helps ensure COPPA compliance by:

  1. Disabling user-initiated screenshots (users will not be able to attach files, including images, using SDK).
  2. 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 and userEmail, and with fullPrivacy set to true, Helpshift will not use the userName and userEmail values.
  3. Not collecting any of the following personal information:
    • Mobile country code, mobile network code and carrier name.
    • Custom meta-data that is labeled "private-data".

Moreover, in scenarios where the user attaches objectionable content, it becomes a huge COPPA compliance concern. This option helps to solve this problem.

OptionfullPrivacy
Valuestrue / false
Defaultfalse
Min SDKv10.2.0
Supported byShowConversation, ShowFAQs

Example:

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("fullPrivacy", true);
// other configs...
Helpshift.ShowConversation(this, config);

Best Practices

In your registration process, ask your user for their age. If the user's age is 13 or younger, set fullPrivacy to true. This way, you comply with COPPA for your under-age users, but collect valuable user and device data for your other users.

Enable In-App Notifications

If you do not want the in-app notifications support provided by the Helpshift SDK, set this flag to false.

On setting this flag to false, the SDK will stop showing notifications in the notification tray of the device but it will fetch messages in background.

The default value of this flag is true i.e., the in-app notifications will be enabled.

Option:enableInAppNotification
Values:true / false
Default:true
Min SDKv10.2.0
Supported by:Install()

Example:

using HelpshiftApi;

namespace App
{
public class AppDelegate : UIApplicationDelegate
{
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
Dictionary<string, object> installConfig = new Dictionary<string, object>();
installConfig.Add("enableInAppNotification", true);
// Add any other install config parameters
Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig);
}
}
}

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 SDKv10.2.0
Supported by:ShowConversation()

Example:

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("initiateChatOnLoad", true);
// other configs...
Helpshift.ShowConversation(this, config);

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").
Note

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.

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("initialUserMessage", "YOUR INITIAL USER MESSAGE");
// other configs...
Helpshift.ShowConversation(this, config);

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.

Note

If you set this configuration in the middle of an existing conversation, it will not have any effect.

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("initialUserMessage", "YOUR INITIAL USER MESSAGE");
// other configs...
Helpshift.ShowConversation(this, config);

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.

Note

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:

Dictionary<string, object> subsequentIssuesInSameSessionConfig = new Dictionary<string, object>();
subsequentIssuesInSameSessionConfig.Add("initialUserMessage", "");

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("initialUserMessage", "YOUR INITIAL USER MESSAGE");
config.Add("subsequentIssuesInSameSessionConfig", subsequentIssuesInSameSessionConfig)

Helpshift.ShowConversation(this, config);

iOS Specific Configurations

In-App Notificaton Appearance

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.

Option:inAppNotificationAppearance
Sub-Options:bannerBackgroundColor / textColor
Min SDKv10.2.0
Supported by:Install()

Example:

var config = new Dictionary<string, Dictionary<string, string>>
{
{
"inAppNotificationAppearance", new Dictionary<string, string>
{
{ "bannerBackgroundColor", "000000" },
{ "textColor", "FFFFFF" }
}
}
};

Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", config);

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.

OptionpresentFullScreenOniPad
Valuestrue / false
Defaultfalse
Min SDKv10.2.0
Supported byShowConversation(), ShowFAQs()

Example:

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add("presentFullScreenOniPad", true);
// other configs...
Helpshift.ShowConversation(this, config);

Android specific configurations

Screen Orientation

The screen orientation of Helpshift SDK screens can be fixed by setting the screenOrientation to constants available in the Android.Content.PM.ScreenOrientation class.

For example, you may want to fix the orientation to ScreenOrientation.Portrait for mobile users and ScreenOrientation.Landscape for tablet users.

FlagscreenOrientation
valuesinteger values for orientation from Android.Content.PM.ScreenOrientation class
defaultScreenOrientation.Unspecified

Example:

using HelpshiftApi;
using Android.Content.PM;

namespace App
{
[Application]
public class MyApplication : Application
{
override public void OnCreate()
{
base.OnCreate();
Dictionary<string, object> installConfig = new Dictionary<string, object>();
installConfig.Add("screenOrientation", ScreenOrientation.Portrait);
// Add any other install config parameters
Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig);
}
}
}

Notification Icon

By default the application icon is used as the notification icon. You can customize the notification icon using the config in the Install() call.

Example:

using HelpshiftApi;

namespace App
{
[Application]
public class MyApplication : Application
{
override public void OnCreate()
{
base.OnCreate();
Dictionary<string, object> installConfig = new Dictionary<string, object>();
installConfig.Add("notificationIcon", Resource.Drawable.notification_icon);
// Add any other install config parameters
Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig);
}
}
}

Large Notification Icon

By default the application icon is used as the notification icon. If you want to specify the large notification icon also to show up in the notification tray, you can specify that using the config in the Install() call.

Example:

using HelpshiftApi;

namespace App
{
[Application]
public class MyApplication : Application
{
override public void OnCreate()
{
base.OnCreate();
Dictionary<string, object> installConfig = new Dictionary<string, object>();
installConfig.Add("notificationLargeIcon", Resource.Drawable.large_icon);
// Add any other install config parameters
Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig);
}
}
}

Notification Sound

By default the default device notification sound is used for Helpshift notifications. You can customize the notification sound using the config in the install call.

Example:

using HelpshiftApi;

namespace App
{
[Application]
public class MyApplication : Application
{
override public void OnCreate()
{
base.OnCreate();
Dictionary<string, object> installConfig = new Dictionary<string, object>();
installConfig.Add("notificationSoundId", Resource.Raw.notification_sound);
// Add any other install config parameters
Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig);
}
}
}

Notification channels

Starting from Android Oreo, Helpshift notifications will create a default channel named In-app Support. If you want to customize the name and description for the default channel, you can do so by using the config in the Install() call.

Example:

using HelpshiftApi;

namespace App
{
[Application]
public class MyApplication : Application
{
override public void OnCreate()
{
base.OnCreate();
Dictionary<string, object> installConfig = new Dictionary<string, object>();
installConfig.Add("notificationChannelId", "your channel name here");
// Add any other install config parameters
Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig);
}
}
}

Theming the SDK

Please check design page to apply your styles and theming to the SDK.

Tracking

This config represents the tracking of user actions. For more information, please check tracking.