Getting Started
Note: The Unity SDK with messaging feature described here is currently in an Early Access Program (EAP). To use this feature, sign up for our early access program. For documentation on the currently released Unity SDK, see Unity SDK overview.
Getting Started
Back in 2020, we launched our first Native Unity SDK. That SDK was designed to give you, our gaming customers, a quick and easy way to bring the power of Zendesk seamlessly in your games. Since then, Zendesk has announced messaging, our newest product that is helping our customers to deliver rich conversational experiences which are connected across web, mobile or social apps. Zendesk’s messaging provides customers with the unique flexibility to pop in and out of the conversation at their leisure, while giving your support teams the tools to automate answers to get back to customers faster (using Answer Bot with Flow Builder), and easily manage all conversations from a unified workspace.
Today we are excited to announce that we will be releasing a new version of the Unity SDK with messaging capabilities included, and we are inviting you all to sign up for our early access program to be our partner to bring this product to market.
Prerequisites
Before starting the integration of the Zendesk SDK, please ensure that the following prerequisites are fulfilled.
Supported Unity versions
Supported versions: 2019.4, 2020LTS.
Checking your account requirements
You must have a Zendesk account with messaging enabled. See Checking your account requirements for information.
Adding the Zendesk SDK for Unity package
In the Unity Editor, click Assets > Import Package > Custom Package and select the Zendesk SDK for Unity package.
Add the SDK dependencies
Please consult the list of dependencies used in our SDK.
Note on Newtonsoft.Json Dependency
Our SDK uses Newtonsoft.Json and maintains compatibility with Unity's fork. For more information, see Newtonsoft Json Unity Package.
Obtain a channel key from Zendesk's Admin Center
Before you initialize your SDK, you'll need to obtain a channel key. The channel key is a unique identifier that the SDK requires to initialize correctly. You can obtain it from the Zendesk Admin Center. For instructions, see Working with messaging in the Zendesk SDKs for Android and iOS. If you're not a Zendesk admin on your account, ask one to get it for you.
Initialize the SDK
-
Add the following import to your project:
C#
using Zendesk.Runtime.Messaging;
-
Call
ZendeskMessaging.Initialize(channelKey);
.Optional parameters:
successCallback
: Callback on successful initialization of the SDK.failureCallback
: Callback on failed initialization of the SDK.language
: Language of the SDK of type "ZendeskLanguage". If not set, it defaults to the device language.
C#
ZendeskMessaging.Initialize("channelKey",
() => Debug.Log("Zendesk initialized with success."),
() => Debug.Log("Zendesk failed to initialize."),
ZendeskLanguage.English);
Show the conversation
-
Call the
ShowMessaging()
method from the ZendeskMessaging instance.Optional parameters:
parentTransform
: Parent transform that the Zendesk prefab will be child of, or null (zendesk prefab will be instantiated at the root of the first canvas).
C#
ZendeskMessaging.Instance.ShowMessaging();
Once ShowMessaging()
is called, the Zendesk Messaging UI is displayed.
Next Steps
Once you complete the above steps, you are now in good shape to explore the SDK and understand how messaging will work for your business and your end users.