Skip to main content

Helpshift Delegates

The Helpshift SDK provides delegate callbacks to help app developers track a user's activities within the help section.

Helpshift Delegate implementation

Bind the event delegate by using BindEventDelegate()

You can listen to the events fired by Helpshift. All the events are defined in HelpshiftConstants.h

Events

Helpshift session started event

This event gets fired when the Helpshift session starts

  • Event name: HelpshiftEventSDKSessionStarted
  • Event data: null

Helpshift session ended event

This event gets fired when the Helpshift session ends.

  • Event name: HelpshiftEventSDKSessionEnded
  • Event data: null

Unread Message Count Event

This event gets fired when you call RequestUnreadMessageCount(FetchFromServer) API to request unread messages count.

  • Event name: HelpshiftEventReceivedUnreadMessageCount
  • Event data keys:
    • HelpshiftEventDataMessageCount (int)
    • HelpshiftEventDataMessageCountFromCache

Conversation Status Event

This event contains information about the current ongoing conversation.

  • Event name: HelpshiftEventConversationStatus
  • Event data:
    • HelpshiftEventDataLatestIssueId (string)
    • HelpshiftEventDataLatestIssuePublishId (string)
    • HelpshiftEventDataIsIssueOpen (bool)

Widget Toggle Event

This event is triggered when the user opens or exits the chat screen. This event is triggered with a boolean value of "visible" key. For your reference, see the below example:

  • Event name: HelpshiftEventWidgetToggle
  • Event data: HelpshiftEventDataSDKVisible (bool)

Conversation Start Event

This event triggers when the user sends the first message in a conversation. The event data object has a key, message, which includes the message string the end-user sent to start the conversation. For your reference, see the below example.

  • Event name: HelpshiftEventConversationStart
  • Event data: HelpshiftEventDataMessage (string)

Message Add Event

This event is triggered when the user adds a message in a conversation. It might be a text message, response via bot input, or an attachment. The event data object has type and body keys, which indicates the type and body of the message added by the user. For your reference, see the below example.

  • Event name: HelpshiftEventMessageAdd
  • Event data keys:
    • HelpshiftEventDataMessageType - HelpshiftEventDataMessageTypeAttachment or HelpshiftEventDataMessageTypeText
    • HelpshiftEventDataMessageBody (string)

CSAT Submit Event

This event is triggered when the user submits a CSAT rating after the conversation ends. The event data object has rating and additionalFeedback keys, which indicates the (star) rating and the additional comments provided by the user with the CSAT form. For your reference, see the below example.

  • Event name: HelpshiftEventCsatSubmit
  • Event data keys:
    • HelpshiftEventDataCsatRating (int)
    • HelpshiftEventDataAdditionalFeedback (string)

Conversation End Event

This event is triggered when the conversation ends (resolved or rejected) and it cannot be reopened.

  • Event name: HelpshiftEventConversationEnd()
  • Event Data: none

Conversation Rejected Event

This event is triggered when an agent rejects the conversation.

  • Event name: HelpshiftEventConversationRejected
  • Event data: none

Conversation Resolved Event

This event is triggered when an agent resolves the conversation.

  • Event name: HelpshiftEventConversationResolved
  • Event data: none

Conversation Reopened Event

When resolution question is enabled, the users are asked if they're satisfied with the resolution. If the user rejects it and sends a new message, then the conversation is reopened and the Conversation Reopened event is triggered.

  • Event name: HelpshiftEventConversationReopened
  • Event data: none

User Authentication Failed Event

If you have user authentication feature enabled on the Dashboard and if you pass an invalid token in the Login(userDataMap), then you will receive this event with reason string. Check here for more info

You have to use BindAuthFailureDelegate to listen to Authentication failure events.

The authentication failure reason is wrapped in an enum EHelpshiftAuthenticationFailureReason Example:

Reason type :

  • EHelpshiftAuthenticationFailureReason.REASON_INVALID_AUTH_TOKEN
  • EHelpshiftAuthenticationFailureReason.REASON_AUTH_TOKEN_NOT_PROVIDED
  • EHelpshiftAuthenticationFailureReason.UNKNOWN