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