> For the complete documentation index, see [llms.txt](https://lionstudios.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lionstudios.gitbook.io/readme/third-party-sdks/helpshift-customer-support.md).

# Helpshift - Customer Support

Helpshift is a tool for handling support tickets.

### Installation

* Go to **Package Manager** → **My Registries** in Unity menu
* Under **Lion Studios - Advanced**, install **Lion - HelpShift** package

<figure><img src="/files/neeNiJXnwf3kh3sdvls2" alt=""><figcaption></figcaption></figure>

### Setup

* Go to **LionStudios** → **Settings Manager** in Unity menu
* Switch to the **Helpshift** tab
* Click on the **Install** Button

![](/files/AoraueM9zjLolRfQXj8z)

* Make sure the **Enable auto-initialization** checkbox is checked

![](/files/pkdiE7iFLYSNfgLmQ0hN)

### Show the Helpshift Popup

```
HelpshiftSdk.GetInstance().ShowConversation(Dictionary<string, object> configMap = null);
```

Example:

<pre><code><strong>private void AssignButtonEvent()
</strong>{
        GetComponent&#x3C;Button>().onClick.AddListener(OnFeedbackButtonClick);
}

private async void OnFeedbackButtonClick()
{
        HelpshiftSdk.GetInstance().ShowConversation(Dictionary&#x3C;string, object> configMap);
}
</code></pre>

#### LionStudios required Data

Support can only triage a ticket from the dashboard if the player's context comes with it. Helpshift is strict about the format — fields that don't match the expected shape are dropped rather than displayed. The example below shows every required field and how to pass it in. Make use of the `SingleLineField`, `NumberField`, `CheckboxField`, and `Field` helper methods from the example below to ensure proper data formatting.

```
    public static Dictionary<string, object> SingleLineField(string value) => Field("singleline", value);

    public static Dictionary<string, object> NumberField(object value) => Field("number", value?.ToString() ?? "0");
        
    public static Dictionary<string, object> CheckboxField(bool value) => Field("checkbox", value.ToString());
    
    private static Dictionary<string, object> Field(string type, object value)
    {
        return new Dictionary<string, object> {{"type", type}, {"value", value}};
    }

    private void Awake()
    {
        GetComponent<Button>().onClick.AddListener(OnFeedbackButtonClick);
    }

    private async void OnFeedbackButtonClick()
    {
        string playerId = await WhoAmIService.GetPersistentIdAsync();
        bool isPayer = await WhoAmIService.Shared.IsPayer();

        // Custom Issue Fields — keys must match the ones configured in the Helpshift dashboard.
        var cifs = new Dictionary<string, object>
        {
            { "register_time", SingleLineField(LionUserData.InstallDate.ToString()) },
            { "player_id", SingleLineField(playerId) },
            { "vendor_id", SingleLineField(playerId) },
            { "player_30d", NumberField(LionUserData.GetFilteredRevenue(30)) },
            { "player_60d", NumberField(LionUserData.GetFilteredRevenue(60)) },
            { "Is_Payer", CheckboxField(isPayer) },
            { "player_ltv", NumberField(LionUserData.AdRevenue + LionUserData.IapRevenue) }
        };

        var metadata = new Dictionary<string, object>
        {
            { "InstallDate", LionUserData.InstallDate.ToString() },
            { "PlayerTenure", (System.DateTime.UtcNow - LionUserData.InstallDate).Days },
            { "PlayTime", LionAnalytics.GetTotalTimeInApp() },
            { "AdRevenue", LionUserData.AdRevenue },
            { "IapRevenue", LionUserData.IapRevenue },

            // Most useful for "I watched an ad but got no reward" tickets.
            { "last_rewarded", LionUserData.RewardedCreativeIds },
            { "last_rewarded_list", JsonConvert.SerializeObject(LionUserData.RewardedCreativeIds) },
            { "last_inter", LionUserData.InterstitialCreativeIds},
            { "last_banner", LionUserData.BannerCreativeIds},
        };

        var configMap = new Dictionary<string, object>
        {
            { "cifs", cifs },
            { "customMetadata", metadata }
        };

        HelpshiftSdk.GetInstance().ShowConversation(configMap);
}

```

{% hint style="info" %}
Helpshift support screen will not be triggered on the editor; it only works in an Android or iOS build.

For more information on helpshift usage: <https://developers.helpshift.com>
{% endhint %}

{% embed url="<https://developers.helpshift.com/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lionstudios.gitbook.io/readme/third-party-sdks/helpshift-customer-support.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
