Inherits from NSObject
Declared in Wootric.h

Tasks

Class Methods

configureWithClientID:clientSecret:accountToken:

+ (void)configureWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret accountToken:(NSString *)accountToken
Discussion

It configures the SDK with required parameters.

Parameters

clientID

Found in API section of the Wootric’s admin panel.

clientSecret

Found in API section of the Wootric’s admin panel.

accountToken

Found in Install section of the Wootric’s admin panel.

Declared In

Wootric.h

endUserProperties

+ (NSDictionary *)endUserProperties
Discussion

Returns an NSDictionary of the end user properties.

Return Value

NSDictionary of endUserProperties.

Declared In

Wootric.h

forceSurvey:

+ (void)forceSurvey:(BOOL)flag
Discussion

If forceSurvey is set to YES, the survey is displayed skipping eligibility check AND even if user was already surveyed.

Warning: This is for test purposes only as it will display the survey every time and for every user.

Parameters

flag

A boolean to force the survey.

Declared In

Wootric.h

passScoreAndTextToURL:

+ (void)passScoreAndTextToURL:(BOOL)flag
Discussion

If you enable this setting, score and feedback text will be added as wootric_score and wootric_text params to the “thank you” URL you have provided. (Check “Custom Thank You” section)

Parameters

flag

A boolean to set if the score and text should be passed to the custom “thank you” URL

Declared In

Wootric.h

setCustomAudience:

+ (void)setCustomAudience:(NSString *)audience
Discussion

It sets the audience of the survey. e.g. How likely are you to recommend this product or service to customAudience?

Parameters

audience

NSString of the custom audience.

Declared In

Wootric.h

setCustomFinalThankYou:

+ (void)setCustomFinalThankYou:(NSString *)finalThankYou
Discussion

It sets the final Thank You message shown at the end of the survey. The default Thank You message is “Thank you for yor response, and your feedback!”

Parameters

finalThankYou

NSString of the custom final Thank You message.

Declared In

Wootric.h

setCustomFollowupPlaceholderForPromoter:passive:detractor:

+ (void)setCustomFollowupPlaceholderForPromoter:(NSString *)promoterPlaceholder passive:(NSString *)passivePlaceholder detractor:(NSString *)detractorPlaceholder
Discussion

This method allows you to set custom placeholder text in feedback text view for each type of end user. Be advised that this setting takes precedence over values set in Wootric’s from admin panel.

Parameters

promoterPlaceholder

NSString placeholder for promoters (score 9-10).

passivePlaceholder

NSString placeholder for passives (score 7-8).

detractorPlaceholder

NSString placeholder for detractors (score 0-6).

Declared In

Wootric.h

setCustomFollowupQuestionForPromoter:passive:detractor:

+ (void)setCustomFollowupQuestionForPromoter:(NSString *)promoterQuestion passive:(NSString *)passiveQuestion detractor:(NSString *)detractorQuestion
Discussion

This method allows you to set custom question for each type of end user (detractor, passive or promoter). Passing nil for any of the parameters will result in using defaults set in Wootric’s admin panel for that type of end user.

Parameters

promoterQuestion

NSString question for promoters (score 9-10).

passiveQuestion

NSString question for passives (score 7-8).

detractorQuestion

NSString question for detractors (score 0-6).

Declared In

Wootric.h

setCustomLanguage:

+ (void)setCustomLanguage:(NSString *)languageCode
Discussion

It sets the language of the survey e.g. ‘ES’, ‘FR’, ‘CN_S’.

Parameters

languageCode

NSString of the language code.

See Also

Declared In

Wootric.h

setCustomNPSQuestion:

+ (void)setCustomNPSQuestion:(NSString *)npsQuestion
Discussion

It sets the question of the survey.

Parameters

npsQuestion

NSString of the custom NPS question.

Declared In

Wootric.h

setCustomProductName:

+ (void)setCustomProductName:(NSString *)productName
Discussion

It sets the product name for the end user. This will change the default question. e.g. How likely are you to recommend customProductName to a friend or co-worker?

Parameters

productName

NSString of the product name to be shown to the end user.

Declared In

Wootric.h

setCustomValueForResurveyThrottle:visitorPercentage:registeredPercentage:dailyResponseCap:

+ (void)setCustomValueForResurveyThrottle:(NSNumber *)resurveyThrottle visitorPercentage:(NSNumber *)visitorPercentage registeredPercentage:(NSNumber *)registeredPercentage dailyResponseCap:(NSNumber *)dailyResponseCap
Discussion

This method will alter the values of resurvey throttle, tested visitor, registered users percentage and daily response cap used for eligibility check.

Parameters

resurveyThrottle

NSNumber representing number of days for resurvey throttle.

visitorPercentage

NSNumber from 0-100.

registeredPercentage

NSNumber from 0-100.

dailyResponseCap

NSNumber greater than 0.

Declared In

Wootric.h

setDetractorThankYouLinkWithText:URL:

+ (void)setDetractorThankYouLinkWithText:(NSString *)detractorThankYouLinkText URL:(NSURL *)detractorThankYouLinkURL
Discussion

If configured, a custom thank you button will display detractors (score 0-6).

Parameters

detractorThankYouLinkText

NSString with the detractor’s link text.

detractorThankYouLinkURL

NSURL with the address to which the detractor end user will be redirected.

Declared In

Wootric.h

setDetractorThankYouMessage:

+ (void)setDetractorThankYouMessage:(NSString *)detractorThankYouMessage
Discussion

If configured, a custom thank you message will display for detractors (score 0-6).

Parameters

detractorThankYouMessage

NSString of thank you message for detractors.

Declared In

Wootric.h

setEndUserCreatedAt:

+ (void)setEndUserCreatedAt:(NSNumber *)externalCreatedAt
Discussion

It sets end user’s account creation date to provided value (UNIX Timestamp truncated to seconds).

Parameters

externalCreatedAt

UNIX Timestamp truncated to seconds.

Declared In

Wootric.h

setEndUserEmail:

+ (void)setEndUserEmail:(NSString *)endUserEmail
Discussion

It sets end user’s email.

Parameters

endUserEmail

NSString of the end user’s email.

Declared In

Wootric.h

setEndUserProperties:

+ (void)setEndUserProperties:(NSDictionary *)customProperties
Discussion

It sets an NSDictionary with properties to be added to the end user. An example of this would be to add a ‘company’ and ‘type’: @code NSDictionary *endUserProperties = @{@“company” : @“Wootric”, @“type” : @“awesome”}; [Wootric setEndUserProperties:endUserProperties];

Parameters

customProperties

NSDictionary containing custom properties.

Declared In

Wootric.h

setFacebookPage:

+ (void)setFacebookPage:(NSURL *)facebookPage
Discussion

If configured, a third screen for promoters (score 9-10) will show a Facebook like (thumbs up) button and a share button

Parameters

facebookPage

A NSURL to the Facebook page.

Declared In

Wootric.h

setFirstSurveyAfter:

+ (void)setFirstSurveyAfter:(NSNumber *)firstSurveyAfter
Discussion

Used to check if end user was created/last seen earlier than ago and therefore if survey is required.

Parameters

firstSurveyAfter

An NSNumber representing the days after the first survey should be shown.

Declared In

Wootric.h

setPassiveThankYouLinkWithText:URL:

+ (void)setPassiveThankYouLinkWithText:(NSString *)passiveThankYouLinkText URL:(NSURL *)passiveThankYouLinkURL
Discussion

If configured, a custom thank you button will display passive end users (score 7-8).

Parameters

passiveThankYouLinkText

NSString with the passive end user’s link text.

passiveThankYouLinkURL

NSURL with the address to which the passive end user will be redirected.

Declared In

Wootric.h

setPassiveThankYouMessage:

+ (void)setPassiveThankYouMessage:(NSString *)passiveThankYouMessage
Discussion

If configured, a custom thank you message will display for passive end users (score 7-8).

Parameters

passiveThankYouMessage

NSString of thank you message for passive end users.

Declared In

Wootric.h

setProductNameForEndUser:

+ (void)setProductNameForEndUser:(NSString *)productName
Discussion

Adds a product name to end user’s properties.

Parameters

productName

NSString of the end user’s product name.

Declared In

Wootric.h

setPromoterThankYouLinkWithText:URL:

+ (void)setPromoterThankYouLinkWithText:(NSString *)promoterThankYouLinkText URL:(NSURL *)promoterThankYouLinkURL
Discussion

If configured, a custom thank you button will display promoters (score 9-10).

Parameters

promoterThankYouLinkText

NSString with the promoter’s link text.

promoterThankYouLinkURL

NSURL with the address to which the promoter end user will be redirected.

Declared In

Wootric.h

setPromoterThankYouMessage:

+ (void)setPromoterThankYouMessage:(NSString *)promoterThankYouMessage
Discussion

If configured, a custom thank you message will display for promoters (score 9-10).

Parameters

promoterThankYouMessage

NSString of thank you message for promoters.

Declared In

Wootric.h

setSendButtonBackgroundColor:

+ (void)setSendButtonBackgroundColor:(UIColor *)color
Discussion

Changes the color of the Send button and the No thanks button on the sharing view.

Parameters

color

UIColor for the Send button.

Declared In

Wootric.h

setSliderColor:

+ (void)setSliderColor:(UIColor *)color
Discussion

Changes the color of the score slider and the Edit Score button on the feedback view.

Parameters

color

UIColor for the slider and Edit Score button.

Declared In

Wootric.h

setSocialSharingColor:

+ (void)setSocialSharingColor:(UIColor *)color
Discussion

Changes the color of Facebook, Twitter and Thumbs up button on the sharing view.

Parameters

color

UIColor for social sharing buttons.

Declared In

Wootric.h

setSurveyedDefault:

+ (void)setSurveyedDefault:(BOOL)flag
Discussion

Right after a vote or dismiss we are setting a NSUserDefault that lasts for 90 days and indicates that end user was already surveyed on this device. We are doing this to lower the requests amount to our eligibility server. If your survey throttle is different than 90 days and/or you don’t want to set the surveyed “cookie” you can set this option to NO.

Parameters

flag

A boolean to set the surveyed default.

Declared In

Wootric.h

setThankYouButtonBackgroundColor:

+ (void)setThankYouButtonBackgroundColor:(UIColor *)color
Discussion

Changes the color of the Thank You button on the sharing view.

Parameters

color

UIColor for the Thank You button.

Declared In

Wootric.h

setThankYouLinkWithText:URL:

+ (void)setThankYouLinkWithText:(NSString *)thankYouLinkText URL:(NSURL *)thankYouLinkURL
Discussion

If configured, a default custom thank you button will display for any score.

Parameters

thankYouLinkText

NSString with the link text.

thankYouLinkURL

NSURL with the address to which the end user will be redirected.

Declared In

Wootric.h

setThankYouMessage:

+ (void)setThankYouMessage:(NSString *)thankYouMessage
Discussion

If configured, a default custom thank you message will display for any score.

Parameters

thankYouMessage

NSString of thank you message.

Declared In

Wootric.h

setTwitterHandler:

+ (void)setTwitterHandler:(NSString *)twitterHandler
Discussion

If configured, a third screen for promoters (score 9-10) will show a Twitter share button

Parameters

twitterHandler

NSString with the Twitter handler.

Declared In

Wootric.h

showSurveyInViewController:

+ (void)showSurveyInViewController:(UIViewController *)viewController
Discussion

It shows survey if end user is eligible.

Parameters

viewController

View controller in which you would like to display the survey.

Declared In

Wootric.h

skipFeedbackScreenForPromoter:

+ (void)skipFeedbackScreenForPromoter:(BOOL)flag
Discussion

With this option enabled, promoters (score 9-10) will be taken directly to third screen, skipping the second (feedback) one.

Parameters

flag

A boolean to set if the feedback screen should be skipped.

Declared In

Wootric.h

surveyImmediately:

+ (void)surveyImmediately:(BOOL)flag
Discussion

If surveyImmediately is set to YES and user wasn’t surveyed yet - eligibility check will return “true” and survey will be displayed.

Warning: This shouldn’t be used on production.

Parameters

flag

A boolean to set if the end user should be surveyed immediately.

Declared In

Wootric.h