Note: Display 3 documentation is provided as a courtesy for clients on this legacy version of PowerReviews. It is no longer supported. We recommend contacting your Account Manager to discuss upgrading to our newer Display 4.1 version as soon as possible.
Reponsive WAR Configuration
The list below contains variables that can be used to configure the Write-a-Review experience.
Variable Name | Description | Is Required |
pr_merchant_id | The client's merchant identifier | Either the Merchant ID or the combination of the Merchant Group ID + Site ID is required |
pr_merchant_group_id | The client's merchant group identifier | Either the Merchant ID or the combination of the Merchant Group ID + Site ID is required |
pr_site_id | The identifier of a site within the client's merchant group. | Either the Merchant ID or the combination of the Merchant Group ID + Site ID is required |
pr_page_id | Represents the concept that is being reviewed | Yes |
pr_page_id_variant | Represents the variation within the Page ID such as different colors, different sizes or other variations | No |
pr_locale | The locale of the site - defaults to "en_US" | No |
pr_unique_review_id | The client's internal unique identifier for this review (to ensure that duplicate reviews are not created.) | No |
pr_merchant_user_id |
Internal client-side unique identifier of the consumer who created this review. Warning: If you do not assign user IDs to all of your customers, and therefore have no values for this field, you must set its value to an empty string, "". Do NOT use the null character value (NULL); a quoted string value of "0", "NULL", "null"; nor a string of just blank (space) character(s). |
No |
pr_merchant_user_email | Email address of the consumer who created this review. | No |
pr_source |
Used to designate a source for the review. Supported values are:
|
No |
pr_order_id | The ID of the consumer's order associated with the review | No |
pr_campaign_id | The ID of the campaign associated with the consumer's review | No |
pr_promo_code | The promotional code associated with the consumer's review | No |
pr_return_url | When set, a "Continue Shopping" link will appear on the WAR Thank You Page that will link to the URL provided | No |
pr_style_sheet | The URL to the client's custom override stylesheet | No |
pr_disclosure_code |
Used to designate sampling or sweepstakes campaigns. Supported Values :
|
No |
Pre-populating form fields
Clients can pre-set form field values (excluding image uploads) via page-level JavaScript variables or URL parameters.
The general syntax for pre-populating form fields is:
pr_[key]=[value]
Where [key] would be replaced by the key of the field that should be pre-populated, and [value] would be replaced by the desired pre-set value.
pr_name=John
In the case of simple text inputs, [value] would be a string - this string would appear in the text input. In the case of 'collection' (or Tag Group inputs), [value] would be a comma-delimited list of indexes/numbers of the desired tags that should be selected:
pr_pros=1,4,5
Populating form fields programmatically
You have the ability to dynamically populate form fields after the review form has been rendered. This can be useful if, for example, your site is a single page application and a review form field value is dependent on data that can change after the review form is rendered. In this scenario, the WAR form would only be initialized once - so the pre-population technique detailed above wouldn't be something that could be utilized to accomplish this use case. Instead, you can set form field values in an already rendered review form using code like this:
POWERREVIEWS.submission.set(fieldKey, fieldValue)
Example:
POWERREVIEWS.submission.set("headline", "Test Headline")
At the moment, this functionality is only supported for simple inputs - text inputs, star inputs, text area inputs. Tag group inputs, dropdowns, and image inputs are not currently supported.
Callbacks
We offer you the ability to hook your own functionality and behavior into certain milestones within the Responsive WAR user flow via JavaScript - specifically, when the form loads or when the form is submitted.
The onLoad callback
The following JavaScript code can be used to trigger behavior when the WAR loads:
POWERREVIEWS.submission.onLoad(function() {
// Insert custom onLoad behavior here.
});
The onComplete callback
The following JavaScript code can be used to trigger behavior when the WAR is submitted:
POWERREVIEWS.submission.onComplete(function(response) {
// Insert custom onComplete behavior here
});
In order to allow the creation of dynamic behavior based off of the user's review, a JavaScript object that contains review data as a JSON representation is passed as a parameter into the onComplete callback function. This allows, for example, you to display different messaging when a user submits a 5-star review versus a 1-star review.
The form employs standard responsive design using CSS media queries. A breakpoint exists at 480px such that elements are displayed in a single column when the device screen is below 480px and two columns when the device screen is greater.