Table of Contents

Class MessagingInstance

public abstract class MessagingInstance
Inheritance
MessagingInstance
Derived
Inherited Members

Methods

ClearConversationFields()

Clears the locally stored conversation fields

public abstract void ClearConversationFields()

ClearConversationTags()

Clears the locally stored conversation tags

public abstract void ClearConversationTags()

GetUnreadMessageCountAsync(Action<int>, bool)

Retrieves the unread message count

public abstract 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>

A task that represents the asynchronous operation, resulting in an UnreadCountResult. The result indicates success with the number of unread messages, or contains a specific error from the UnreadCountError enumeration on failure.

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 abstract 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.

public abstract ZendeskResult Logout()

Returns

ZendeskResult

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.

SetConversationFieldsAsync(Dictionary<string, object>)

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

public abstract 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

public abstract ZendeskResult SetConversationTags(List<string> tags)

Parameters

tags List<string>

A list of tags to associate with the conversation.

Returns

ZendeskResult

A ZendeskResult indicating the success or failure of the operation. In case of failure, ErrorMessage contains a relevant error message.

ShowMessagingAsync(Transform)

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

public abstract Task ShowMessagingAsync(Transform parentTransform = null)

Parameters

parentTransform Transform

Optional

Returns

Task