Skip to main content

SDK Configuration

Helpshift provides several config options which can be used to customize the behaviour of the SDK.

Install call configurations

Enable Logging

Upon setting enableLogging to true, Helpshift SDK logs will be generated in the Android logcat/ Xcode console. Turning on logging can help developers resolve common integration issues.

KeyenableLogging
valuestrue/false
defaultfalse

Example :

let installConfig = {
'enableLogging': true,
}

install(<appId>, <domain>, installConfig);

Enable In-App Notifications

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

For Android, setting this flag as false will stop showing notifications in the notification tray of the device but it will fetch messages in the background.

For iOS, setting this flag as false will just disable the in-app notifications, push notifications will still be shown in the device’s notification center.

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

KeyenableInAppNotification
valuestrue/false
defaulttrue

Example :

let installConfig = {
'enableInAppNotification': true,
}

install(<appId>, <domain>, <installConfig>);

Full privacy

In the config dictionary of the showConversation API at the time of calling this API, setting the fullPrivacy option to true ensures COPPA compliance by:

  1. Disabling user-initiated screenshots (users will not be able to attach files, including images, using SDK).
  2. Make 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, with fullPrivacy set to true, Helpshift will not use the userName and userEmail values.
FlagfullPrivacy
valuestrue/false

Moreover, in scenarios where the user attaches objectionable content, it becomes a huge COPPA compliance concern. This option helps to solve this problem. This config is common for both iOS and Android.

Example :

let config = {
fullPrivacy: true,
}

showConversation(config);

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 the admin dashboard.

KeyenableContactUs
values"ALWAYS" / "AFTER_VIEWING_FAQS" / "AFTER_MARKING_ANSWER_UNHELPFUL" / "NEVER"
defaultnone

Example :

showFAQsWithConfig({
enableContactUs: "AFTER_VIEWING_FAQS",
});

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.

Initiate new conversation on chat screen load

In config map of showConversation(config); API, 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.

Example:

let config = {
... other configs ,
initiateChatOnLoad: true/false,
}

showConversation(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.

KeyconversationPrefillText
ValueAny string value

Example:

let config = {
conversationPrefillText: "<INSERT YOUR CONVERSATION PREFILL TEXT HERE>",
}

showConversation(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.

KeyinitialUserMessage
ValueAny string value

Example:

let config = {
initialUserMessage: "<INSERT YOUR INITIAL MESSAGE HERE>",
}

showConversation(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:

let config = {
initialUserMessage: "<INSERT YOUR INITIAL MESSAGE HERE>",
subsequentIssuesInSameSessionConfig: {
initialUserMessage: ""
}
}

showConversation(config);

For outbound support scenarios make sure to add this config in the user specific config.

let config = {
initialUserMessage: "<INSERT YOUR INITIAL MESSAGE HERE>",
subsequentIssuesInSameSessionConfig: {
initialUserMessage: ""
}
}

handleProactiveLink(notificationData.helpshift_proactive_link, config);

Android Specific Configurations

Notification Icon

By default, the application icon is used as the notification icon. You can customize the notification icon in the install call.

You do not need to specify the file extension for the icon image. If your icon image's file name is "icon.png", you just need to pass "icon" to helpshift config and add the "icon.png" file at <project-dir>/android/src/main/res/drawable.

KeynotificationIcon
valuesstring - Name of the file
defaultApplication Icon

Example:

let installConfig = {
'notificationIcon': 'icon',
}

install(<appId>, <domain>, 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 in the install call.

You do not need to specify the file extension for the icon image. If your icon image's file name is "large_icon.png", you just need to pass "large_icon" to helpshift config and add the "icon.png" file at <project-dir>/android/src/main/res/drawable.

KeynotificationLargeIcon
valuesstring - Name of the file
defaultApplication Icon
Example:
let installConfig = {
'notificationLargeIcon': 'large_icon',
}

install(<appId>, <domain>, installConfig);

Notification Sound

Note
  • The sound provided here would only be set for the default notification channel that the SDK creates on its own on Android OS 8.0 & above. This sound can only be set once on the default channel and it won’t change if a different sound resource is passed.

  • If the sound needs to be changed later on, it is recommended to create your notification channels. Refer this.

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

You do not need to specify the file extension for the sound file. If your sound file name is "notificaton_sound.mp3", you just need to pass "notification_sound" to the Helpshift config and add the "notification_sound.mp3" file at <project-dir>/android/src/main/res/raw.

KeynotificationSoundId
valuesstring - Name of the file
defaultDevice Notification Sound
Example:
let installConfig = {
'notificationSoundId': 'notificaton_sound',
}

install(<appId>, <domain>, 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 for the default channel, you can do so by using the config in the install call.

KeynotificationChannelId
valuesstring - Name of the channel
default"In-app Support"

Example:

let installConfig = {
'notificationChannelId': 'your channel name here',
}

install(<appId>, <domain>, installConfig);

iOS Specific Configurations

presentFullScreenOniPad

The presentFullScreenOniPad will determine whether to present support views in UIModalPresentationFullScreen or UIModalPresentationFormSheet modal presentation style on iPad. This config does not affect iPhones.

The default value is false, and presents support views as 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

Example :

let installConfig = {
'presentFullScreenOniPad': true,
}

install(<appId>, <domain>, installConfig);

inAppNotificationAppearance

The inAppNotificationAppearance 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 map

Option:inAppNotificationAppearance
Sub-Options:bannerBackgroundColor / textColor
Values:String representing hex color. Eg - "FFFEEF"

Example :

let installConfig = {
'inAppNotificationAppearance': {
'bannerBackgroundColor': <HEX_COLOUR>,
'textColor': <HEX_COLOUR>,
},
}

install(<appId>, <domain>, installConfig);

UI Configurations

This config represents the theming of Helpshift SDK. For more information check design.

Tracking

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