EXPPredictive Class Reference
Inherits from | NSObject |
---|---|
Declared in | EXPPredictive.h |
Overview
The EXPPredictive class provides the main interface to the Verint EXPPredictive module. You must add a
exp_configuration.json
file to your project that defines the behavior of the Trigger module (e.g. defines the
triggering criteria for inviting a user to participate in a survey).
Configuration
Most configuration is done through the exp_configuration.json
file. Behavior such as trigger criteria,
invitation modes, repeat days, are done through the configuration file. If you want to customize runtime behavior
e.g. displaying custom invitations, you can provide a delegate with the setInviteDelegate: method.
Debugging
When testing your configuration, it is recommended you enable debug log mode. Useful information regarding internal state will be posted to the console for inspection.
Notifications
The EXPPredictive module will post a number of notifications to the default NSNotificationCenter
:
EXPInviteDidShowNotification
( Posted when the default invitation was displayed. )EXPInviteWasDeclinedNotification
( Posted when the default invitation was declined. )EXPPostInviteActionWasCompletedNotification
( Posted when the default post invite action was completed. )EXPInviteWasAcceptedNotification
( Posted when the default invitation was accepted. )EXPSurveyWasCompletedNotification
( Posted when the survey was completed. )EXPSurveyWasAbandonedNotification
( Posted when the survey was abandoned. )EXPSurveyDidShowNotification
( Posted when the survey was presented. )
+ setInviteDelegate:
Sets an invite lifecycle delegate
+ (void)setInviteDelegate:(id<EXPInviteDelegate>)delegate
Parameters
delegate |
An object conforming to the EXPInviteDelegate protocol |
---|
Discussion
Objects conforming to the EXPInviteDelegate protocol and registered with the SDK using this method will be notified of events in the SDK’s lifecycle
Declared In
EXPPredictive.h
+ setInviteHandler:
Sets a custom invite handler
+ (void)setInviteHandler:(id<EXPInviteHandler>)inviteHandler
Parameters
inviteHandler |
An object conforming to the EXPInviteHandler protocol |
---|
Discussion
Use an object conforming to the EXPInviteHandler protocol to display a custom invite. Objects will be told when to show and hide custom views, based on the user’s state.
Declared In
EXPPredictive.h
+ incrementSignificantEventCountWithKey:
Increments the event count for a given key
+ (void)incrementSignificantEventCountWithKey:(NSString *)key
Parameters
key |
The key of the event |
---|
Discussion
Significant events are defined in the exp_configuration.json file.
Declared In
EXPPredictive.h
+ incrementSignificantEventCountAndCheckEligibilityWithKey:
Increments the event count for a given key and checks eligibity after
+ (void)incrementSignificantEventCountAndCheckEligibilityWithKey:(NSString *)key
Parameters
key |
The key of the event |
---|
Declared In
EXPPredictive.h
+ setSignificantEventCount:forKey:
Sets the significant event count to a specific value for a given key
+ (void)setSignificantEventCount:(NSInteger)value forKey:(NSString *)key
Parameters
value |
The value to set for the event |
---|---|
key |
The key of the event |
Discussion
Significant events are defined in the exp_configuration.json file.
Declared In
EXPPredictive.h
+ resetSignificantEventCountForKey:
Resets the significant event count for a given key
+ (void)resetSignificantEventCountForKey:(NSString *)key
Parameters
key |
The key of the event |
---|
Discussion
Significant events are defined in the exp_configuration.json file.
Declared In
EXPPredictive.h
+ resetSignificantEvents
Resets all significant events
+ (void)resetSignificantEvents
Discussion
Significant events are defined in the exp_configuration.json file.
Declared In
EXPPredictive.h
+ incrementPageViews
Increments the view controller load count (“page views”). This is done automatically for most view controllers.
+ (void)incrementPageViews
Declared In
EXPPredictive.h
+ showSurveyForSurveyID:
Force a survey to display for a given surveyID
+ (void)showSurveyForSurveyID:(NSString *)surveyID
Parameters
surveyID |
The ID of the survey you wish to display. |
---|
Discussion
Calling this method will display a survey regardless of the user’s current eligibility.
Declared In
EXPPredictive.h
+ showInviteForSurveyID:
Force a invite to display for a given surveyID
+ (void)showInviteForSurveyID:(NSString *)surveyID
Parameters
surveyID |
The ID of the survey you wish to invite the user to take. |
---|
Discussion
Calling this method will display an invite regardless of the user’s current eligibility.
Declared In
EXPPredictive.h
+ checkIfEligibleForSurvey
Checks to see if the user is currently eligible to be invited to a survey.
+ (void)checkIfEligibleForSurvey
Discussion
In order to be eligible, a number of conditions must be fulfilled:
- The library is in an enabled state. If the user has previously declined an invite or completed a survey, the library will be in a disabled state. Otherwise, the library is in an enabled state.
- The user has met the loyalty threshold defined in your exp_configuration.json file.
- The user is in the sampling pool. If the previous two conditions have been met, the library makes an HTTP call to our servers to determine if the user is in the sampling pool. If s/he is, the invite will be presented. If not, the invite will not be shown. Disable this remote check with setSkipPoolingCheck:
Declared In
EXPPredictive.h
+ cancelPendingNotifications
Cancels any pending exit invite or exit survey notifications
+ (void)cancelPendingNotifications
Declared In
EXPPredictive.h
+ cancelPendingInvites
Cancels any pending exit invite or survey invitations (Deprecated: v7.0.2)
+ (void)cancelPendingInvites
Declared In
EXPPredictive.h
+ surveyIdForNotificationResponse:
Returns the surveyId for the notification that triggered an invite.
+ (NSString *)surveyIdForNotificationResponse:(UNNotificationResponse *)response
Parameters
response |
The notification that was sent to the user. |
---|
Return Value
The surveyID of the measure that triggered the invitation. *
Discussion
Also, cancels the pending notification.
Declared In
EXPPredictive.h
+ showSurveyForNotificationResponse:
Shows the survey associated with a notification.
+ (void)showSurveyForNotificationResponse:(UNNotificationResponse *)response
Parameters
response |
The notification that was presented to the user. |
---|
Discussion
Also, cancels the pending notification.
Declared In
EXPPredictive.h
+ contactDetailsForType:
Retrieves a user’s contact details for the given contact type.
+ (NSString *)contactDetailsForType:(EXPContactType)type
Parameters
type |
an EXPContactType |
---|
Availability
v5.1.0
Discussion
This method can be used to provide a user’s contact information, so that they do not need to enter it manually. When provided, the default invite will auto-populate the contact input field for CONTACT surveys.
Declared In
EXPPredictive.h
+ setContactDetails:forType:
Sets a user’s contact details.
+ (void)setContactDetails:(NSString *)contactDetails forType:(EXPContactType)type
Parameters
contactDetails |
The customer’s contact information (e.g. a phone number or email address) |
---|---|
type |
an EXPContactType that specifies the type of information prodvided in contactDetails |
Availability
v5.1.0
Discussion
This method can be used to provide a user’s contact information, so that they do not need to enter it manually. When provided, the default CONTACT invite will auto-populate the provided details for the user. Only valid for CONTACT surveys.
Declared In
EXPPredictive.h
+ setPreferredContactType:
Sets a preferred contact details type.
+ (void)setPreferredContactType:(EXPContactType)type
Parameters
type |
the preferred EXPContactType |
---|
Declared In
EXPPredictive.h
+ preferredContactType
Gets the preferred contact details type.
+ (EXPContactType)preferredContactType
Declared In
EXPPredictive.h
+ allContactDetails
Retrieves all user contact details for every type.
+ (NSDictionary<NSNumber*,NSString*> *)allContactDetails
Return Value
an NSDictionary where the keys are NSNumbers containing the EXPContactType and the values are the actual contact details for that type
Availability
v5.1.0
Declared In
EXPPredictive.h
+ clearUserData
Clears any and all previously-set user data
+ (void)clearUserData
Availability
v5.1.0
Declared In
EXPPredictive.h
+ customInviteAccepted
Tells the SDK that a custom invite was accepted.
+ (void)customInviteAccepted
Discussion
You should call this method whenever a user accepts a custom invite that you’ve presented.
Declared In
EXPPredictive.h
+ customInviteDeclined
Tells the SDK that a custom invite was declined.
+ (void)customInviteDeclined
Discussion
You should call this method whenever a user declines a custom invite that you’ve presented.
Declared In
EXPPredictive.h
+ setSkipPoolingCheck:
Disables the pooling check.
+ (void)setSkipPoolingCheck:(BOOL)shouldSkip
Parameters
shouldSkip |
YES to skip the pooling check. |
---|
Discussion
When debugging your implementation of the Verint SDK, it may be useful to disable the pooling check. This ensures that the invite will always show if the loyalty criteria has been fulfilled.
Declared In
EXPPredictive.h
+ shouldSkipPoolingCheck
Get pooling check setting
+ (BOOL)shouldSkipPoolingCheck
Return Value
YES if pooling check is skipped, NO otherwise
Declared In
EXPPredictive.h