Net Promoter Score (iOS SDK)

Saving the NPS review

Method Objective

The method allows saving the results of the NPS survey.

Syntax and parameters

sdk.review(params) { callback }

NameTypeRequirementDescription
paramsparamsrequiredRequest parameters.
callbackFunctionrequiredThe callback function will be executed if the request is successful.

Request parameters

Name

TypeRequirement

Description

channel

stringrequired

The NPS channel code.

categorystringrequiredThe NPS category code.
ratenumberrequired

The rating got from the user.

The value must be an integer between 1 and 10.

commentstringoptionallyUser comment.
order_idstringoptionallyOrder ID, related to the current survey

Example of use

sdk.review(rate: 9, channel: "ios_app", category: "delivery", order_id: "ORDER-100500", comment: "It's not bad, but it could be better.") { _ in
    // when the survey is successfully saved
}

Copyright 2018-2024 PersonaClick