Launch Critizr interfaces using the SDK

Create your own buttons and trigger Critizr widgets when you want

❗️

You enter a Developer Zone

Items described in this page are advanced usages of Critizr SDKs. These items requires the intervention of a technical expert to be implemented on your side.

Why are those advanced functions useful?

Critizr widgets described in this documentation are standard elements designed and developed by Critizr. It provides you with easy to implement and neat look-and-feel.
However, sometimes you may want to add a more personalized touch, whether it is purely aesthetic or based on a specific behaviour you want to address.

The functions described in this page allows you to develop your own triggers and Call-To-Actions to have a deeper implementation of Critizr in your interfaces.

📘

Please read the article about Critizr SDKs

The following functions can only operate if Critizr SDK is already installed within you interface. Please read this article to learn more.

Display a store locator

This interface opens the Store Locator interface which displays the points of sales closest to the customer. It is also possible to search for point of sales belonging to a specific city.

When the customer chooses a point of sales, he is redirected to the corresponding "Send Feedback" interface.

The code

CritizrSDK.open("modal:store_locator", null, params);
#import <Critizr/Critizr.h>

CRFeedbackDialog *feedbackDialog = [CRFeedbackDialog feedbackDialog];
NSDictionary *params = @{
  // add any paramaters with the following model ; learn more about these parameters at the end
    @"field" : @"value"
};
[feedbackDialog presentFeedbackDialogFrom:self withParams:params];
CritizrSDK critizrSDK = CritizrSDK.getInstance(CRITIZR_API_KEY);
JSONObject params = new JSONObject();
try {
  // add any paramaters with the following model ; learn more about these parameters at the end
   object.put("field", "value");
} catch (JSONException e) {
   e.printStackTrace();
}
critizrSDK.openFeedbackActivity(this, this, null, params);

"Send Feedback" on a specific point of sales

These interface allow the customer to open the Critizr Send Feedback interface for a specific point of sales.

The code

CritizrSDK.open("modal:send_feedback", placeId, params);
#import <Critizr/Critizr.h>

CRFeedbackDialog *feedbackDialog = [CRFeedbackDialog feedbackDialog];
NSString *placeID = @"PLACE_ID"; // Replace place_id by the identifier of the related place.
NSDictionary *params = @{
  // add any paramaters with the following model ; learn more about these parameters at the end
    @"field" : @"value"
};
[feedbackDialog presentFeedbackDialogFrom:self withStoreIdString:placeID withParams:params];
CritizrSDK critizrSDK = CritizrSDK.getInstance(CRITIZR_API_KEY);
String placeID = "PLACE_ID"; // Replace place_id by the identifier of the related place.
JSONObject params = new JSONObject();
try {
  // add any paramaters with the following model ; learn more about these parameters at the end
   object.put("field", "value");
} catch (JSONException e) {
   e.printStackTrace();
}
critizrSDK.openFeedbackActivity(this, this, placeId, params);

"Send Feedback" at the opening of the web page

open: allows you to automatically open a widget right after SDK initialization.

The code

window.CritizrSDK = {
    config: {
        open: "send_feedback:<place_id>"
    }
};

Parameters

When launching Critizr widgets with functions, you are able to add parameters.

Name

Type

By default

Effect

mode

feedback
quiz
quizonly

feedback

Collection process to be adopted by the widget.
feedback : feedback first, then quiz
quiz : Quiz first, then feedback
quizonly : only quiz

user

user_tag separated by | following customer configuration

'first_name | last_name | email | phone | crm_id'

Transmits information about the customer to the interface. Use this information to pre-fill the verbatim's fields, as well as for other purposes such as dissatisfaction alerts.
Should be encoded in Base64

tag

string

null

Name of the survey (slug) that will be used by the interface If you leave this field blank, the default process will be used.

answer

integer

null

Automatically responds to the first question with the value provided.
Useful when coming from email.
Mode quiz/quizonly only

lang

code name : fr, en...

Default point of sale language value

Lang of the interface.
By default fr

closable

true/false

true

Activate or not the cross icon to close the interface.

on_close

URL (absolute or relative)

null

When the customers click on the cross to close the interface, they will be redirected to this URL:

  • If this is a relative URL, the location iframe will be change.
  • If this is an absolute URL, the parent frame will be change.
  • If this is a null value, the cross will behave as normal and close the pop-in.

on_success

URL (absolute or relative)

on_close value

Similar to on_close but applies to the close buttons that appears on the success screen.

x_*

string

null

Additional information to bring contextual data to participation.