Introduction

Messaging metadata lets you attach additional information to conversations in the Zendesk SDK. This metadata can be used to provide context to agents, automate routing, and personalize the support experience for your users.

For more details, see the Using messaging metadata with the Zendesk Web Widget and SDKs.

For example, you can tag conversations with promotion codes, set custom fields for order numbers, or indicate user segments—all directly from your app.

Use cases

Here are some common use cases showing how tags and custom fields can enhance ticket management in Zendesk:

  • Tagging conversations: Add tags such as promo_code, vip_user, or bug_report to help agents quickly identify the context of a conversation.
  • Custom fields: Set custom ticket fields (for example: order number, flight number, subscription type) to pass structured data to Zendesk.
  • Routing: Use tags or fields to automate routing to the right department or agent group.

Setting conversation fields

You can set values for conversation fields to add structured data to a conversation. Conversation fields must be created as custom ticket fields in Zendesk Admin Center and configured to allow end user input.

var fieldToAdd = new Dictionary<string, object>{    {        "10093547287955", //id        548832222 // Value    }};
ZendeskSdk.Instance.Messaging.SetConversationFieldsAsync(fieldToAdd);

Note: Supported types for object are string, number and boolean.

For more information, see Using messaging metadata with the Zendesk Web Widget and SDKs.

Clearing conversation fields

Clear all stored conversation fields when the client-side context changes (for example, when the user logs out or switches context).

ZendeskSdk.Instance.Messaging.ClearConversationFields();

Setting conversation tags

Tags are simple string labels you can attach to conversations for quick filtering, routing, or reporting.

var conversationTags = new List<string>() {"tag1","tag2","tag3"};ZendeskSdk.Instance.Messaging.SetConversationTags(conversationTags);

Clearing conversation tags

Clear all stored conversation tags when the client-side context changes.

ZendeskSdk.Instance.Messaging.ClearConversationTags();

FAQ

Q: When are conversation fields and tags actually applied to a conversation?
A: Fields and tags are only applied when the user starts a new conversation or sends a new message. Setting them in the SDK does not immediately update existing conversations.

Q: Can system ticket fields (such as Priority) be used as conversation fields?
A: No. Only custom ticket fields created in Zendesk Admin Center and configured for end-user input are supported. System fields are not supported.

Q: What types of values can be used for conversation fields?
A: Supported types are string, number, and boolean.

Q: Will clearing fields or tags remove them from existing conversations?
A: No. Clearing fields or tags only removes them from the SDK's local storage. Any fields or tags already applied to existing conversations remain unchanged.