Table of Contents

Class ZendeskMessaging

public class ZendeskMessaging : MessagingInstance
Inheritance
ZendeskMessaging
Inherited Members

Methods

ClearConversationFields()

Clears the locally stored conversation fields

public override void ClearConversationFields()

ClearConversationTags()

Clears the locally stored conversation tags

public override void ClearConversationTags()

GetUnreadMessageCountAsync(Action<int>, bool)

Retrieves the unread message count

public override Task<UnreadCountResult> GetUnreadMessageCountAsync(Action<int> onUnreadCountChanged = null, bool shouldSubscribe = true)

Parameters

onUnreadCountChanged Action<int>

Action to be called when the unread count changes

shouldSubscribe bool

Whether to subscribe to the websocket event outside of conversation

Returns

Task<UnreadCountResult>

Number of unread messages

LoginAsync(string)

Authenticates (or re-authenticates) a User using their JSON Web Token. If the current user is anonymous, that user will be merged with the user you are attempting to log in, and after the merge, the current user will become the authenticated user.

public override Task<LoginResult> LoginAsync(string jwt)

Parameters

jwt string

The JSON Web Token used for authentication

Returns

Task<LoginResult>

A task that represents the asynchronous login operation. The task result contains a LoginResult object, where TError is LoginError. This object encapsulates the result of the login attempt, including any error information if the login fails.

Logout()

///

Performs the logout action for the current user session.

A ZendeskResult indicating the success or failure of the logout operation. In the event of a failure, ErrorMessage contains the error message detailing the reason for the failure.
public override ZendeskResult Logout()

Returns

ZendeskResult

SetConversationFieldsAsync(Dictionary<string, object>)

Asynchronously sets custom fields for the user's conversations and associated tickets.

public override Task<ZendeskResult> SetConversationFieldsAsync(Dictionary<string, object> ticketFields)

Parameters

ticketFields Dictionary<string, object>

A dictionary containing pairs of ticket field IDs and their associated values to be set.

Returns

Task<ZendeskResult>

A task that represents the asynchronous operation of setting conversation fields. The task result contains a ZendeskResult indicating the success or failure of the operation. In case of failure, ErrorMessage contains a relevant error message.

SetConversationTags(List<string>)

///

Sets the conversation tags on the user's conversations and associated tickets

A list of tags to associate with the conversation. A ZendeskResult indicating the success or failure of the operation. In case of failure, ErrorMessage contains a relevant error message.
public override ZendeskResult SetConversationTags(List<string> ticketTags)

Parameters

ticketTags List<string>

Returns

ZendeskResult

ShowMessagingAsync(Transform)

Show the conversation screen. InitializeAsync(Action<ISdkConfiguration>, CancellationToken) must have been successfully completed to call this method.

public override Task ShowMessagingAsync(Transform parentTransform = null)

Parameters

parentTransform Transform

Optional

Returns

Task