Looking for older SDK 3.X docs? Click here →

Helpshift Delegates

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

Session begin

If you want to keep track of when helpshift session starts in your app, you can implement this delegate callback. The delegate will get fired every time the Helpshift session starts.

Session end

If you want to keep track of when helpshift session ends in your app, you can implement this delegate callback. The delegate will get fired every time the Helpshift session ends.

New conversation delegate

If you want to keep a track of when your app users start a new conversation through Helpshift, you can implement this delegate callback. The delegate will get fired every time the user starts a new conversation. The delegate method will receive the conversation message in it's arguments.

For example:

- (void) newConversationStartedWithMessage:(NSString *)newMessage {
    // your code for tracking new conversation
}

New message delegate

If you want to keep a track of when your app users send new messages to an ongoing conversation, you can implement this delegate. This delegates will get called every time a user replies to a conversation. The delegate method will receive the new message in it's arguments. There are four static string constants to check the type of the message that was filed.

static NSString *HelpshiftSupportUserAcceptedTheSolution = @"User accepted the solution";
static NSString *HelpshiftSupportUserRejectedTheSolution = @"User rejected the solution";
static NSString *HelpshiftSupportUserSentScreenShot = @"User sent a screenshot";
static NSString *HelpshiftSupportUserReviewedTheApp = @"User reviewed the app";

Example usage:

- (void) userRepliedToConversationWithMessage:(NSString *)newMessage {
  if ([newMessage isEqualToString:HelpshiftSupportUserAcceptedTheSolution]) {
    // your code here
  }
}

Conversation ended delegate

This delegate is called whenever the ongoing Conversation is resolved, rejected from the Dashboard, or archived.

- (void) conversationEnded {
    // your code here
}

Customer satisfaction survey delegate

If you want to keep track of when your app user completes the customer satisfaction survey for a conversation, you can implement this delegate. This delegates will get called every time a user completes the customer satisfaction survey. The customer satisfaction survey is shown after an issue gets resolved.

Example usage:

- (void) userCompletedCustomerSatisfactionSurvey:(NSInteger)rating withFeedback:(NSString *)feedback {
    // your code here
}

New message received count delegate

This delegate is the response to the getNotificationCountFromRemote: method with isRemote set to YES. It provides the number of unread messages in the current conversation.

Example usage:

- (void) didReceiveNotificationCount:(NSInteger)count {
    // your code here
}

New in-app message received count delegate

This delegate method is called when a Helpshift in-app notification is received and displayed. In-app notifications are push notifications that are received when the app is in the foreground.

Example usage:

- (void) didReceiveInAppNotificationWithMessageCount:(NSInteger)count {
    // your code here
}

Display attachment delegate

Agents can attach a wide variety of files when replying to users. This delegate is called when the user taps on downloaded attachment file to view it. If the app chooses to display the attachment file itself, you can implement this delegate. If the app does not wish to handle the attachment, and this delegate is not implemented , in this case, the SDK will display the attachment using Quicklook Framework.

Example usage:

- (void) displayAttachmentFileAtLocation:(NSURL *)fileLocation onViewController:(UIViewController *)parentViewController {
    // your code here
}