When you integrate the Support SDK into your application, it has to authenticate as a Zendesk Support user to access Help Center or to submit tickets to Zendesk Support. If you haven't done this yet, check out our guidance on how to choose an authentication method.
This article gives additional guidance for the following scenario:
- You are using the anonymous identification method
- You wish to add an External ID to the end-user's identity
What is an External ID?
An External ID is a unique identifier that is linked with an end-user of your app. For example, it could be an account ID or user ID that is not used by any other users of your app.
If you have a unique identifier for your end-user, you should seriously consider using the JWT authentication method instead of anonymous. This provides a much more pleasant end-user experience, giving them access to all of their tickets. It also treats that end-user as a trusted user.
What behaviour can I expect?
If you decide to continue using an anonymous identity with an External ID set, you can expect the following behaviour:
- All tickets created by end-users with that External ID will be grouped together.
- Anyone associated with that External ID with the ability to log in to your Help Center will be able to see all tickets that are associated with the External ID.
This means that you must ensure that the External ID is always unique to a given end-user, and never reused. If you use the same External ID for multiple end-users, any one of them with access to your Help Center would be able to see all of that External ID's tickets, regardless of source.
How can I set an External ID?
Your app should set the end-user's identity using conditional logic, as follows:
- If you do not have a unique identifier for the end-user, do not set an identity with External ID. Authenticate using an empty anonymous identity (instructions: Android, iOS) or one with some useful information (instructions: Android, iOS).
- Else If you do have a unique identifier for the end-user, set the identity with the External ID (instructions: Android, iOS).
Under no circumstances use a generic string or value as the External ID. For example, setting it to unknown, null, nil, 0, 123456789 etc. Any string will be treated as a valid external ID.