Helpshift Delegates

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

All Helpshift delegate methods are optional.

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.

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

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.

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

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.

- (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";

- (void) userRepliedToConversationWithMessage:(NSString *)newMessage {
  if ([newMessage isEqualToString:HelpshiftSupportUserAcceptedTheSolution]) {
    // 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.

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

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

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