### Initialize and Install Helpshift SDK Source: https://developers.helpshift.com/sdkx-unity/support-tools-android This snippet shows the basic setup for initializing the Helpshift SDK using `GetInstance()` and `Install()`. Ensure this is called before any other public APIs. ```csharp using Helpshift; private HelpshiftSdk help; // install call here void Awake(){ help = HelpshiftSdk.GetInstance(); help.Install(appId, domainName, null); } ``` -------------------------------- ### SDK X Install Call Configurations (Map) Source: https://developers.helpshift.com/sdkx_android/migration-guide SDK X replaces the `InstallConfig` class with a `Map` for initialization configurations. This example demonstrates how to map legacy `InstallConfig` builder methods to their corresponding keys in the SDK X configuration map. ```java // Example mapping for InstallConfig.Builder.setNotificationIcon to SDK X Map key // "notificationIcon" : R.drawable.notification_icon ``` ```java // Example mapping for InstallConfig.Builder.setLargeNotificationIcon to SDK X Map key // "notificationLargeIcon" : R.drawable.notification_large_icon ``` ```java // Example mapping for InstallConfig.Builder.setEnableInAppNotifications to SDK X Map key // "enableInAppNotification" : true/false ``` ```java // Example mapping for InstallConfig.Builder.setNotificationSound to SDK X Map key // "notificationSoundId" : R.raw.notification_sound ``` ```java // Example mapping for InstallConfig.Builder.setSupportNotificationChannelId to SDK X Map key // "notificationChannelId" : "ABC App Channel" ``` ```java // Example mapping for InstallConfig.Builder.setScreenOrientation to SDK X Map key // "screenOrientation" : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ``` ```java // Example mapping for InstallConfig.Builder.setEnableLogging to SDK X Map key // "enableLogging" : true/false ``` -------------------------------- ### SDK Installation with Logging Enabled Source: https://developers.helpshift.com/sdkx-unity/sdk-configuration-ios Demonstrates how to install the Helpshift SDK and enable logging for debugging purposes. ```APIDOC ## Install SDK with Logging Enabled ### Description This configuration enables detailed logging in the Xcode console, which is helpful for diagnosing integration issues. ### Method `HelpshiftSdk.Install()` ### Parameters #### Request Body - **appId** (string) - Required - Your Helpshift application ID. - **domainName** (string) - Required - Your Helpshift domain name. - **configMap** (Dictionary) - Optional - A dictionary of configuration options. - **HelpshiftSdk.ENABLE_LOGGING** (boolean) - Optional - Set to `true` to enable logging. Defaults to `false`. ### Request Example ```csharp using Helpshift; using System.Collections.Generic; public class MyGameControl : MonoBehaviour { private HelpshiftSdk help; void Awake() { this.help = HelpshiftSdk.GetInstance(); Dictionary configMap = new Dictionary(); configMap.Add(HelpshiftSdk.ENABLE_LOGGING, true); help.Install(appId, domainName, configMap); } } ``` ### Response No specific response body is detailed for this configuration step. The SDK is initialized and configured. ``` -------------------------------- ### Install() Configuration Source: https://developers.helpshift.com/sdkx-xamarin/sdk-configuration Configures the Helpshift SDK during the initialization process. ```APIDOC ## Install() Configuration ### Description Initializes the Helpshift SDK with specific configuration parameters. ### Parameters #### Request Body - **enableLogging** (boolean) - Optional - Enables or disables SDK logs in the console. Default is false. ``` -------------------------------- ### Install Helpshift SDK using yarn Source: https://developers.helpshift.com/sdkx-react-native/getting-started Use this command to install the Helpshift SDK package via yarn. ```bash $ yarn add helpshift-plugin-sdkx-react-native ``` -------------------------------- ### Install Helpshift SDK using npm Source: https://developers.helpshift.com/sdkx-react-native/getting-started Use this command to install the Helpshift SDK package via npm. ```bash $ npm i helpshift-plugin-sdkx-react-native ``` -------------------------------- ### install(appId, domain, installConfig) Source: https://developers.helpshift.com/sdkx-react-native/sdk-configuration Initializes the Helpshift SDK with specific configuration options. ```APIDOC ## install(appId, domain, installConfig) ### Description Initializes the Helpshift SDK with global configuration settings. ### Parameters #### Request Body - **enableLogging** (boolean) - Optional - If true, SDK logs are generated in the console. Default: false. - **enableInAppNotification** (boolean) - Optional - If false, disables in-app notifications. Default: true. ### Request Example { "enableLogging": true, "enableInAppNotification": true } ``` -------------------------------- ### Install Configuration Mapping Source: https://developers.helpshift.com/sdkx-cocos2dx/migration-guide Map legacy install config keys to their SDK X equivalents. Deprecated configurations are no longer supported. ```APIDOC ## Install Configuration Mapping ### Description Map legacy install config dictionary keys to their SDK X equivalents. All other deprecated configurations have been removed and are not supported anymore. ### Legacy SDK Cocos2dx plugin install config dictionary key| SDK X Cocos2dx plugin install config dictionary key ---|--- `enableLogging`| `enableLogging` `enableInAppNotification`| `enableInAppNotification` ``` -------------------------------- ### Update Helpshift SDK Install Call Source: https://developers.helpshift.com/sdkx_android/migration-guide Modify the `Helpshift.install` method to use the new SDK X signature. This example shows the basic structure and includes error handling for unsupported OS versions (prior to Lollipop, SDK 21). ```java try { Helpshift.install(this, "", "", config); } catch (UnsupportedOSVersionException e) { // Android OS versions prior to Lollipop (< SDK 21) are not supported. } ``` -------------------------------- ### Handle Session Started Event Source: https://developers.helpshift.com/sdkx-react-native/delegates Listen for the session started event in both architectures. ```javascript helpshiftEmitter.addListener("onEventOccurred", (data) => { if (data.eventName == "helpshiftSessionStarted") { //Your code here. } }); ``` ```javascript const handleEvent = React.useCallback((data) => { if (data.eventName === "helpshiftSessionStarted") { // Your code here } }, []); ``` -------------------------------- ### Initialize and Install Helpshift SDK Source: https://developers.helpshift.com/sdkx-unity/support-tools-ios Call this after initializing the SDK via HelpshiftSdk.install(). This is a prerequisite for all other public APIs. ```csharp using Helpshift; private HelpshiftSdk help; // install call here void Awake(){ help = HelpshiftSdk.GetInstance(); help.Install(appId, domainName, null); } ``` -------------------------------- ### Update Helpshift Install Call Source: https://developers.helpshift.com/sdkx-xamarin/migration-guide Replace legacy install calls with the SDK X version. Ensure the correct platform-specific implementation is used. ```csharp using HelpshiftApi; namespace App { public class AppDelegate : UIApplicationDelegate { public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { Dictionary installConfig = new Dictionary(); // Add any install config parameters to installConfig Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig); } } } ``` ```csharp using HelpshiftApi; namespace App { [Application] public class MyApplication : Application { override public void OnCreate() { base.OnCreate(); Dictionary installConfig = new Dictionary(); // Add any install config parameters to installConfig Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig); } } } ``` -------------------------------- ### Initialize Helpshift SDK Source: https://developers.helpshift.com/sdkx-unity/getting-started-ios Use the Install method within your MonoBehaviour to initialize the SDK with your app credentials. ```csharp using Helpshift; public class MyGameControl : MonoBehaviour { private HelpshiftSdk help; ... void Awake() { help = HelpshiftSdk.GetInstance(); var configMap = new Dictionary(); help.Install(appId, domainName, configMap); } ... } ``` -------------------------------- ### Handle SDK Session Start Event in C# Source: https://developers.helpshift.com/sdkx-xamarin/delegates Implement this delegate to track when the Helpshift SDK session begins. This callback is invoked every time the session starts and does not carry specific data. ```csharp public void OnEventOccurred(string eventName, IDictionary data) { switch(eventName) { case HelpshiftEvent.SDK_SESSION_STARTED: // SDK session has started break; // other events... } } ``` -------------------------------- ### Handle Widget Toggle Event Source: https://developers.helpshift.com/sdkx_android/delegates Example of listening for the WIDGET_TOGGLE event to track SDK visibility. ```java Helpshift.setHelpshiftEventsListener(new HelpshiftEventsListener() { @Override public void onEventOccurred(@NonNull String eventName, Map data) { switch(eventName){ case HelpshiftEvent.WIDGET_TOGGLE: Log.d(TAG, data.get(HelpshiftEvent.DATA_SDK_VISIBLE)); } } }); ``` -------------------------------- ### Handle SDK Session Started Event Source: https://developers.helpshift.com/sdkx-unity/delegates-android Listen for the SDK_SESSION_STARTED event within the event handler. ```csharp public class HSEventsListener : IHelpshiftEventsListener { // ... public void HandleHelpshiftEvent(string eventName, Dictionary eventData) { if(eventName.Equals(HelpshiftEvent.SDK_SESSION_STARTED)) { Debug.Log("Helpshift session started."); } } //... } ``` -------------------------------- ### Link native iOS dependencies Source: https://developers.helpshift.com/sdkx-react-native/getting-started After installing the SDK, run this command to link the native iOS dependencies. ```bash $ npx pod-install ``` -------------------------------- ### Helpshift Session Started Event Source: https://developers.helpshift.com/sdkx_android/delegates If you want to keep track of when helpshift session starts in your app, you can implement this delegate callback. The delegate will get fired every time the Helpshift session starts. ```APIDOC ## Helpshift Session Started Event ### Description If you want to keep track of when helpshift session starts in your app, you can implement this delegate callback. The delegate will get fired every time the Helpshift session starts. ### Event Name `HelpshiftEvent.SDK_SESSION_STARTED` ### Code Example ```java Helpshift.setHelpshiftEventsListener(new HelpshiftEventsListener() { @Override public void onEventOccurred(@NonNull String eventName, Map data) { switch(eventName){ case HelpshiftEvent.SDK_SESSION_STARTED: //sdk session started } } }); ``` ``` -------------------------------- ### Disable In-App Notifications (iOS/C++ Example) Source: https://developers.helpshift.com/sdkx-cocos2dx/sdk-configuration Set `enableInAppNotification` to `false` in the configuration map when calling the `install` function to disable in-app notifications. This example uses C++ for cross-platform compatibility. ```cpp #include "HelpshiftCocos2dx.h" ... bool AppDelegate::applicationDidFinishLaunching() { ValueMap config; config["enableInAppNotification"] = false; HelpshiftCocos2dx::install( "", "", config); ... } ``` -------------------------------- ### Initialize Helpshift SDK X Source: https://developers.helpshift.com/sdkx-unity/migration-guide-android Replace the legacy install call with the SDK X initialization pattern using HelpshiftSdk.GetInstance(). ```csharp using Helpshift; ... public class MyGameControl : MonoBehaviour { private HelpshiftSdk _support; ... void Awake() { _support = HelpshiftSdk.GetInstance(); var configMap = new Dictionary(); _support.Install(platformId, domainName, configMap); } ... } ``` -------------------------------- ### Retrieve a Single Issue Source: https://developers.helpshift.com/rest-api/scenarios Example response body when performing a GET request for a specific issue ID. ```json { "page": 1, "page-size": 100, "issues": [ { "tags": ["b2c"], "meta": {}, "assignee_name": null, "app_id": "zatori_app_20170712203132970-1370923e4e06ab6", "title": "Coupon Code", "messages": [ { "body": "What happened to my coupon code? It showed up in my cart but then after editing an item I can no longer enter in the code. Boooo! ", "created_at": 1501869101896, "author": { "name": "doctor.awesome", "id": "zatori_profile_20170804173640732-9e0ce257391bdbc", "emails": ["doctor.awesome@starlabs.com"] } } ], "assignee_id": "unassigned", "id": 12, "author_name": "doctor.awesome", "author_email": "doctor.awesome@starlabs.com", "domain": "zatori", "state_data": { "state": "new", "changed_at": 1501869101896 }, "created_at": 1501869101896 } ], "total-hits": 1, "total-pages": 1 } ``` -------------------------------- ### Configure In-App Notifications (Android) Source: https://developers.helpshift.com/sdkx-xamarin/sdk-configuration Set `enableInAppNotification` to `true` during SDK installation to enable in-app notifications. This example is for Android. ```csharp using HelpshiftApi; namespace App { [Application] public class MyApplication : Application { override public void OnCreate() { base.OnCreate(); Dictionary installConfig = new Dictionary(); installConfig.Add("enableInAppNotification", true); // Add any other install config parameters Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig); } } } ``` -------------------------------- ### Configure In-App Notifications (iOS) Source: https://developers.helpshift.com/sdkx-xamarin/sdk-configuration Set `enableInAppNotification` to `true` during SDK installation to enable in-app notifications. This example is for iOS. ```csharp using HelpshiftApi; namespace App { public class AppDelegate : UIApplicationDelegate { public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { Dictionary installConfig = new Dictionary(); installConfig.Add("enableInAppNotification", true); // Add any other install config parameters Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig); } } } ``` -------------------------------- ### Customize Default Notification Channel Name Source: https://developers.helpshift.com/sdkx-cocos2dx/notifications-android Use the `config` map in the `install` call to customize the default notification channel name and description starting from Android Oreo. ```java import com.helpshift.HelpshiftCocosBridge; public class MyActivity extends Cocos2dxActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Add notification Channel Id config in install config map Map config = new HashMap<>(); config.put("notificationChannelId", "your channel name here"); //... // Install call HelpshiftCocosBridge.install( this, "", "", config); } } ``` -------------------------------- ### Standalone Jetifier Tool Usage Source: https://developers.helpshift.com/sdkx_android/troubleshooting Example command for using the standalone Jetifier tool to process a library. Ensure Java version 1.8 is installed. Replace `` and `` with actual paths. ```bash ./jetifier-standalone -i -o ``` -------------------------------- ### Initialize Helpshift SDK Source: https://developers.helpshift.com/sdkx-xamarin/getting-started Initialize the SDK using the Install method within your application's lifecycle methods. ```csharp using HelpshiftApi; namespace App { public class AppDelegate : UIApplicationDelegate { public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { Dictionary installConfig = new Dictionary(); // Add any install configurations to installConfig dictionary Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig); } } } ``` ```csharp using HelpshiftApi; namespace App { [Application] public class MyApplication : Application { override public void OnCreate() { base.OnCreate(); Dictionary installConfig = new Dictionary(); // Add any install configurations to installConfig dictionary Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig); } } } ``` -------------------------------- ### Register Push Token with Helpshift SDK Source: https://developers.helpshift.com/sdkx-unreal/notifications-android Call this function once your application receives a push token from your provider. For example, with Firebase Goodies, use `Get Instance Id Data` to fetch the token and then register it with the Helpshift SDK. ```cpp RegisterPushToken(pushToken); ``` -------------------------------- ### Show FAQs Screen with Configuration Source: https://developers.helpshift.com/sdkx-unity/support-tools-android Integrate the `ShowFAQs(configMap)` API to provide users with access to the help/support section. The `configMap` allows for customization, such as adding tags. ```csharp using Helpshift; private HelpshiftSdk help; // install call here void Awake(){ help = HelpshiftSdk.GetInstance(); help.Install(appId, domainName, null); } void ShowFAQs(){ // configuration map Dictionary configMap = new Dictionary { // other values { "tags", new String[] { "foo", "bar" } }, }; // open the FAQs screen help.ShowFAQs(configMap); } ``` -------------------------------- ### Example Expiry Configurations Source: https://developers.helpshift.com/web/helpshift-apis Demonstrates different ways to configure expiry for the support link, including time-based, view-count based, and combined options. ```json {"time": 1640422800000} ``` ```json {"viewcount": 10} ``` ```json { "time": "2h", "viewcount": 10 } ``` -------------------------------- ### Configure and Install SDK with In-App Notifications Disabled Source: https://developers.helpshift.com/sdkx-xamarin/notifications-ios Use this configuration during SDK installation to disable in-app notifications. Set the `enableInAppNotification` flag to `false` in the install configuration dictionary. ```csharp Dictionary installConfig = new Dictionary(); installConfig.Add("enableInAppNotification", false); // Add other install configs... Helpshift.Install("YOUR_APP_ID", "YOUR_DOMAIN_NAME", installConfig); ``` -------------------------------- ### Initialize Helpshift SDK X in AppDelegate Source: https://developers.helpshift.com/sdkx-cocos2dx/migration-guide Include the HelpshiftCocos2dx header and invoke the install method within the applicationDidFinishLaunching function. ```cpp #include "HelpshiftCocos2dx.h" ... bool AppDelegate::applicationDidFinishLaunching() { cocos2d::ValueMap config; // Add config value. HelpshiftCocos2dx::install( "", "", config); ... } ``` -------------------------------- ### Initialize Helpshift PC Widget with Base Configuration Source: https://developers.helpshift.com/pc-widget-unity/configuration Use this configuration for basic initialization. Ensure Domain, PlatformId, and AppId are replaced with your specific values. ```csharp using HSWidgetLibrary var config = new HelpshiftConfig { Domain = "", PlatformId = "", AppId = "" }; // Pass the configuration to the initialize API Helpshift.Initialize(Application.streamingAssetsPath, config); ``` -------------------------------- ### Example Expiry Configurations Source: https://developers.helpshift.com/pc-and-console/helpshift-apis Demonstrates different ways to configure link expiry using time-based and view-count based settings. ```json {"time": 1640422800000} ``` ```json {"viewcount": 10} ``` ```json { "time": "2h", "viewcount": 10 } ``` -------------------------------- ### Show FAQs API Source: https://developers.helpshift.com/sdkx-xamarin/support-tools Integrate this API to provide users with a help/support section that bundles FAQ, Search, and Contact Us functionalities. It's recommended to call this after initializing the SDK. ```csharp Helpshift.ShowFAQs(this, config) ``` -------------------------------- ### Install patch-package for React Native Notifications Source: https://developers.helpshift.com/sdkx-react-native/troubleshooting Install patch-package as a dev dependency to manage fixes for the react-native-notifications package. ```bash npm install patch-package --save-dev ``` -------------------------------- ### Show FAQ Screen Source: https://developers.helpshift.com/sdkx_ios/support-tools Displays the full FAQ interface including search and contact options. Requires a configuration dictionary. ```Objective-C [Helpshift showFAQsWithConfig:configDictionary]; ``` ```Swift Helpshift.showFAQs(withConfig: configDictionary) ``` -------------------------------- ### SDK Installation with In-App Notifications Disabled Source: https://developers.helpshift.com/sdkx-unity/sdk-configuration-ios Shows how to install the Helpshift SDK while disabling the default in-app notification feature. ```APIDOC ## Install SDK with In-App Notifications Disabled ### Description This configuration disables the in-app notification banners that appear when an agent or bot sends a message while the user is in the app. ### Method `HelpshiftSdk.Install()` ### Parameters #### Request Body - **appId** (string) - Required - Your Helpshift application ID. - **domainName** (string) - Required - Your Helpshift domain name. - **configMap** (Dictionary) - Optional - A dictionary of configuration options. - **HelpshiftSdk.ENABLE_INAPP_NOTIFICATION** (boolean) - Optional - Set to `false` to disable in-app notifications. Defaults to `true`. ### Request Example ```csharp using Helpshift; using System.Collections.Generic; public class MyGameControl : MonoBehaviour { private HelpshiftSdk help; void Awake() { this.help = HelpshiftSdk.GetInstance(); Dictionary configMap = new Dictionary(); configMap.Add(HelpshiftSdk.ENABLE_INAPP_NOTIFICATION, false); help.Install(appId, domainName, configMap); } } ``` ### Response No specific response body is detailed for this configuration step. The SDK is initialized and configured. ``` -------------------------------- ### Initialize Helpshift PC Widget with User Information (C#) Source: https://developers.helpshift.com/pc-widget-unity/users Use this configuration object to initialize the Helpshift PC Widget with user details. Providing UserId and/or UserEmail is required to create a logged-in user. Ensure all parameter values are strings. ```csharp using HSWidgetLibrary var config = new HelpshiftConfig { Domain = "", PlatformId = "", AppId = "", UserId = "", UserName = "", UserEmail = "", UserAuthToken = "", }; // Pass the configuration to the initialize API Helpshift.Initialize(Application.streamingAssetsPath, config); ``` -------------------------------- ### Configure Notification Sound in Install Source: https://developers.helpshift.com/sdkx_android/notifications Customize the notification sound by providing a raw resource ID for the notification sound during the Helpshift SDK installation. ```java public class MainApplication extends Application { @Override public void onCreate() { super.onCreate(); Map configurations = new HashMap<>(); configurations.put("notificationSoundId", R.raw.notification_sound); // Install call Helpshift.install(this, "", "", configurations); } } ``` -------------------------------- ### Example Help FAQ Filter Configuration Source: https://developers.helpshift.com/pc-and-console/helpshift-apis Illustrates how to use the help_faq_filter parameter to segment FAQs based on tags and an operator. ```json { "tags": ["tier1", "tier2"], "operator": "and" } ``` -------------------------------- ### POST /v1//console/qrcode Source: https://developers.helpshift.com/pc-and-console/helpshift-apis Generates a support experience link and QR code. The `` should be replaced with your specific Helpshift domain. ```APIDOC ## POST /v1//console/qrcode ### Description This API generates a support link that launches web chat directly and a QR code (PNG or SVG) for accessing the support experience. ### Method POST ### Endpoint /v1//console/qrcode ### Parameters #### Path Parameters - **domain** (string) - Required - Your Helpshift domain name. #### Query Parameters - **app_id** (string) - Required - The App Publish ID for the app with web chat enabled. - **format** (string) - Optional - Output format for the QR code. Supported formats: `png` (base64 Data URL), `svg`. Defaults to `png`. - **expiry** (object) - Optional - Specifies expiry conditions for the link. Can be time-based or view-count based, or both. - **time** (string or integer) - Optional - Expiry time. Can be a Unix timestamp (milliseconds) or a string like '2m', '6h', '1d'. Defaults to 24 hours if not provided. - **viewcount** (integer) - Optional - Expiry based on the number of views (max 32767). Defaults to unlimited views if not provided. - **uid** (string) - Optional - User ID. At least one of `uid`, `email`, or `phone_number` is required. - **email** (string) - Optional - User's Email. At least one of `uid`, `email`, or `phone_number` is required. - **phone_number** (string) - Optional - User's Phone Number (E.164 format). At least one of `uid`, `email`, or `phone_number` is required. - **user_auth_token** (string) - Optional - Token for Identity Verification. If invalid or not provided, webchat may not start. - **name** (string) - Optional - User's Full Name. - **language** (string) - Optional - Language to override the user's browser language. - **first_user_message** (string) - Optional - Message to be auto-sent by the user when creating the issue (max 500 characters). - **custom_fields** (object) - Optional - JSON encoded map of custom issue fields (e.g., `{"age": 23, "paiduser": false}`). Values must match CIF types. - **tags** (string) - Optional - JSON encoded string of tags to add to the issue. - **help_section** (string) - Optional - Section publish ID to display from the help center. - **help_faq** (string) - Optional - FAQ publish ID to display from the help center. Takes precedence over `help_section` if both are provided. - **help_search_term** (string) - Optional - Search text to perform in the help center. - **help_faq_filter** (object) - Optional - Filters FAQs based on tags. Format: `{"tags": ["tag1", "tag2"], "operator": "or"}`. Supported operators: `and`, `or`, `not`. - **intent** (string) - Optional - Parameter to start a conversation with a specific intent (currently not implemented). - **webchat_widget** (string) - Optional - Controls whether the webchat widget opens automatically. Valid values: `open`. ### Request Example ```json { "app_id": "your_app_id", "format": "svg", "expiry": { "time": "2h", "viewcount": 10 }, "uid": "user123", "name": "John Doe", "first_user_message": "I need help with my account.", "custom_fields": { "age": 30, "paiduser": true }, "tags": "[\"support\", \"billing\"]", "help_section": "section_id_123", "help_faq": "faq_id_456", "help_search_term": "login issue", "help_faq_filter": { "tags": ["tier1", "tier2"], "operator": "and" }, "webchat_widget": "open" } ``` ### Response #### Success Response (200) - **shortlink** (string) - The generated shortlink URL. - **qrcode** (string) - The QR code image data (base64 encoded for PNG, SVG content for SVG). #### Response Example ```json { "shortlink": "https://your.helpshift.com/chat/abc123xyz", "qrcode": "data:image/svg+xml;base64,PHN2ZyB4bWxucz..." } ``` ``` -------------------------------- ### Configure Notification Channel in Install Source: https://developers.helpshift.com/sdkx_android/notifications Customize the notification channel ID and name for Android Oreo and above by providing a string ID during the Helpshift SDK installation. ```java public class MainApplication extends Application { @Override public void onCreate() { super.onCreate(); Map configurations = new HashMap<>(); configurations.put("notificationChannelId", "your channel name here"); // Install call Helpshift.install(this, "", "", configurations); } } ``` -------------------------------- ### Configure Proactive Support with Initial User Message Source: https://developers.helpshift.com/sdkx-unity/sdk-configuration-android Implement `HelpshiftSdk.SetHelpshiftProactiveConfigCollector` to provide user-specific configurations for proactive support. This example shows how to set an initial user message and clear it for subsequent issues. ```csharp // initialise proactiveConfig collector public class ProactiveConfigCollector : IHelpshiftProactiveAPIConfigCollector { public Dictionary getLocalApiConfig() { Dictionary proactiveConfig = new Dictionary(); Dictionary subsequentIssuesInSameSessionConfig = new Dictionary(); // user specific config proactiveConfig.Add("initialUserMessage", "INSERT YOUR INITIAL USER MESSAGE"); subsequentIssuesInSameSessionConfig.Add("initialUserMessage", ""); proactiveConfig.Add("subsequentIssuesInSameSessionConfig", subsequentIssuesInSameSessionConfig) .. .. return proactiveConfig; } } ``` -------------------------------- ### Configure Notification Icons in Install Source: https://developers.helpshift.com/sdkx_android/notifications Customize notification icons by providing drawable resources for the notification icon and large icon during the Helpshift SDK installation. ```java public class MainApplication extends Application { @Override public void onCreate() { super.onCreate(); Map configurations = new HashMap<>(); configurations.put("notificationIcon", R.drawable.notification_icon); configurations.put("notificationLargeIcon", R.drawable.notification_large_icon); // Install call Helpshift.install(this, "", "", configurations); } } ``` -------------------------------- ### Handle Conversation Start Event in Objective-C Source: https://developers.helpshift.com/sdkx_ios/delegates Use this Objective-C code to log the message when a user starts a conversation. Ensure HelpshiftEventNameConversationStart and HelpshiftEventDataMessage are defined. ```objective-c - (void) handleHelpshiftEvent:(NSString *)eventName withData:(NSDictionary *)data { ... if([eventName isEqualToString:HelpshiftEventNameConversationStart]) { NSLog(@"Conversation started with text: %@", data[HelpshiftEventDataMessage]); } } ``` -------------------------------- ### Initialize Helpshift for China on iOS (C++ Example) Source: https://developers.helpshift.com/sdkx-cocos2dx/getting-started Configure the `isForChina` value to "yes" in the `ValueMap` for the `HelpshiftCocos2dx::install` call on iOS. Ensure this call is within `AppDelegate::applicationDidFinishLaunching`. ```cpp #include "HelpshiftCocos2dx.h" ... bool AppDelegate::applicationDidFinishLaunching() { ValueMap config; config["isForChina"] = Value("yes"); HelpshiftCocos2dx::install( "", "", config); ... } ``` -------------------------------- ### Listen for SDK Session Start Event Source: https://developers.helpshift.com/sdkx_android/delegates Implement the `onEventOccurred` method to detect when the Helpshift SDK session starts. The `HelpshiftEvent.SDK_SESSION_STARTED` event is triggered at the beginning of each SDK session. ```java Helpshift.setHelpshiftEventsListener(new HelpshiftEventsListener() { @Override public void onEventOccurred(@NonNull String eventName, Map data) { switch(eventName){ case HelpshiftEvent.SDK_SESSION_STARTED: //sdk session started } } }); ``` -------------------------------- ### Show FAQs with Configuration Source: https://developers.helpshift.com/sdkx-react-native/support-tools Integrate the purpose-built help/support section in your app. This API bundles all Helpshift SDK capabilities into a simple interface. ```javascript import { showFAQsWithConfig } from "helpshift-plugin-sdkx-react-native"; const config = {}; showFAQsWithConfig(config); ``` -------------------------------- ### Helpshift SDK Initialization Source: https://developers.helpshift.com/sdkx_ios/sdk-configuration Configures the SDK initialization, including enabling debug logs. ```APIDOC ## installWithPlatformId ### Description Initializes the Helpshift SDK with a platform ID, domain, and configuration dictionary. ### Parameters #### Request Body - **enableLogging** (boolean) - Optional - If set to YES, SDK logs are generated in the Xcode console. Default is NO. ### Request Example { "enableLogging": true } ``` -------------------------------- ### QR Code Base64 Data URL Example Source: https://developers.helpshift.com/web/helpshift-apis An example of a PNG QR code encoded as a base64 Data URL, which can be used to display the QR code image. ```dataurl data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUoAAAFKCAIAAAD0S4FSAAAGQElEQVR42u 3aQUIDMQwEwf3/p8MfIKxmpOp7IFgqc/HzkbS0xxFIeEvCWxLekvCWhLckvCW8JeEtCW9JeEvCWxLeEt ``` -------------------------------- ### Show Single FAQ Source: https://developers.helpshift.com/sdkx-unity/support-tools-android Display a single FAQ article using the `ShowSingleFAQ(faqId, configMap)` API, requiring the FAQ's publish-id. This is ideal for linking directly to specific answers. ```csharp using Helpshift; private HelpshiftSdk help; // install call here void Awake(){ help = HelpshiftSdk.GetInstance(); help.Install(appId, domainName, null); } void ShowFAQs(string faqPublishId){ // configuration map Dictionary configMap = new Dictionary { // other values { "tags", new String[] { "foo", "bar" } }, }; // open particular FAQ with provided faqid help.ShowSingleFAQ(faqPublishId, configMap); } ``` -------------------------------- ### Update Helpshift Install Call for SDK X Source: https://developers.helpshift.com/sdkx_ios/migration-guide Replace the existing Helpshift install call with the new signature for SDK X. Ensure to provide your platform ID, domain, and configuration dictionary. ```objective-c @import HelpshiftX; ... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... NSDictionary *config = @{} // Your config [Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID" domain:@"YOUR_DOMAIN" config:config]; ... return YES; } ``` -------------------------------- ### Initialize Helpshift SDK in iOS (AppDelegate.cpp) Source: https://developers.helpshift.com/sdkx-cocos2dx/getting-started Initialize the Helpshift SDK in the applicationDidFinishLaunching function of your AppDelegate.cpp by including HelpshiftCocos2dx.h and calling HelpshiftCocos2dx::install with the platform ID, domain name, and configuration map. ```cpp #include "HelpshiftCocos2dx.h" ... bool AppDelegate::applicationDidFinishLaunching() { cocos2d::ValueMap config; // Add install configs in the config map HelpshiftCocos2dx::install( "", "", config); ... } ``` -------------------------------- ### Import Helpshift Delegates Source: https://developers.helpshift.com/sdkx-react-native/delegates Import the necessary emitter and constants for the Old Architecture. ```javascript import { helpshiftEmitter , helpshiftConstants } from "helpshift-plugin-sdkx-react-native"; ``` -------------------------------- ### Example API Response Body for Creating an Issue Source: https://developers.helpshift.com/rest-api/custom-solutions This is an example of the JSON response body when an issue is successfully created via the API. It includes creation timestamp, issue ID, title, tags, and metadata. ```json { "created_at": 1502217904515, "id": "20", "title": "We hear you! Give us 1-2 hours to reply!", "tags": ["b2c", "technical"], "meta": {} } ``` -------------------------------- ### Initialize Helpshift PC Widget Source: https://developers.helpshift.com/pc-widget-unity/helpshift-apis Initializes the widget in the background to listen for notifications. Call this at game startup for timely event handling. ```csharp Helpshift.Initialize(Application.streamingAssetsPath, helpshiftConfig); ``` -------------------------------- ### Get Unread Messages API Parameters Source: https://developers.helpshift.com/pc-and-console/helpshift-apis Required parameters for the Get Unread Messages API include the App Publish ID (app_id) and at least one user identification field (uid, email, or phone_number). ```text parameters| Required| Notes ---|---|--- app_id| Yes| The App Publish ID for the app with web chat enabled. uid| At least one of these fields is required to identify an end user.| User ID email| User's Email phone_number| User's Phone Number ``` -------------------------------- ### Get Unread Messages API Endpoint Source: https://developers.helpshift.com/pc-and-console/helpshift-apis This optional supporting API endpoint, GET /v1//console/messages/unread, is used to check for any unread messages. It requires an app_id and at least one user identifier (uid, email, or phone_number). ```http GET /v1/ /console/messages/unread ``` -------------------------------- ### Initialize Helpshift PC Widget with Helpcenter and Webchat Source: https://developers.helpshift.com/pc-widget-unity/configuration Configure the widget to display both Helpcenter and Web Chat. This setting only works with `Helpshift.Initialize()`. ```csharp using HSWidgetLibrary var config = new HelpshiftConfig { Domain = "", PlatformId = "", AppId = "", WidgetType = "helpcenter_and_webchat" }; // Pass the configuration to the initialize API Helpshift.Initialize(Application.streamingAssetsPath, config); ``` -------------------------------- ### Initiate New Conversation on Chat Load Source: https://developers.helpshift.com/sdkx_ios/sdk-configuration Set `initiateChatOnLoad` to `YES` in the config to automatically start a new conversation when the chat screen loads, provided the previous issue is resolved. This bypasses the need for user interaction to start a new chat. ```Objective-C NSDictionary *config = @{ @"initiateChatOnLoad": @YES }; [Helpshift showConversationWith:self config:config]; ``` ```Swift let config = ["initiateChatOnLoad": true] Helpshift.showConversation(with:self, config:config) ``` -------------------------------- ### API Configuration Overview Source: https://developers.helpshift.com/custom-bots-api/getting-started General guidelines for setting up and executing API requests in the Helpshift Admin dashboard and Bot Builder. ```APIDOC ## API Configuration Guidelines ### Description Helpshift Custom Bots allow integration with external systems via API requests. These are configured in the Admin dashboard and consumed within the Bot Builder. ### Setup Requirements - **Title**: Mandatory - **URL**: Mandatory - **Type**: GET, POST, PUT (Mandatory) - **Authentication**: Basic HTTP or Custom (Mandatory) - **Encoding (POST/PUT)**: application/x-www-form-urlencoded or application/json ### Constraints - **Request Size**: Max 20 KB - **Response Size**: Max 100 KB - **Timeout**: 5 seconds - **Redirects**: Not supported ### Headers - **X-hs-request-id**: Used for request de-duplication. ``` -------------------------------- ### Getting the SDK version Source: https://developers.helpshift.com/sdkx-unity/support-tools-android Retrieves the current version of the Helpshift SDK. ```APIDOC ## GET /helpshift/version ### Description Retrieves the current version of the Helpshift SDK. ### Method GET ### Endpoint /helpshift/version ### Response #### Success Response (200) - **version** (string) - The current version of the Helpshift SDK (e.g., "10.3.0"). #### Response Example ```json { "version": "10.3.0" } ``` ``` -------------------------------- ### Show FAQs Source: https://developers.helpshift.com/sdkx_android/support-tools Integrate FAQs to provide users with a help/support section. This API bundles FAQ, Search, and Contact Us functionality. ```java Helpshift.showFAQs(MyActivity.this, configMap); ```