Review Process¶
The Review Process feature manages how and when customers are invited to leave reviews after completing an order.
It determines which product(s) are eligible, prioritizes certain categories, and selects the review method (e.g. Trustpilot, Google, Facebook, Kieskeurig).
Configuration¶
The review invite distribution is managed in the configuration of the brekz_productreviews module.
- Make sure the correct shop is selected before adjusting the ratios.
- In the form provided by the module, fill in what percentage of invites should go to which review site.
- A higher number means a larger share of invites goes to that provider.
Example¶
If configured as follows:
- Trustpilot = 80
- Facebook = 4
- Google = 4
- Prijsvergelijk = 4
- Nederland Review = 4
- Kieskeurig = 4
Then 80% of all review invites will go via Trustpilot, while each of the other sites receives ~4%.
Key Business Rules¶
- Review invites are triggered when an order status updates to PS_OS_PAYMENT and the order is valid.
- Running the
review:invitecommand multiple times for the same order never sends duplicate invites. - Every invite must be linked to a valid product from the order.
- A Customer ID + Product ID combination can only receive one invite ever (tracked in
ps_trustpilot_customer_product). - If a product cannot be resolved from the order, the invite process stops.
- Review methods are chosen randomly with configurable weighted percentages per shop.
- Trustpilot invites can include both product and shop reviews.
- Google, Facebook, Kieskeurig, Prijsvergelijk, Nederland Review only allow shop reviews.
- All invites are delayed by a per-shop delay (see
DAYS_ADD_BEFORE_REVIEW_INVITE, default3days if not configured). - Before sending, the system checks if the customer has a Copernica opt-out; if opted out, no invite is sent.
- Console commands handle logic:
review:invite(entry point & product selection)trustpilot:send-product-review-invite(Product review)trustpilot:send-invite-mail(Shop review)review:invite-generic-mail(Google, Facebook, Prijsvergelijk, Nederland Review, Kieskeurig = Shop review)- Every invite attempt is logged in
ps_trustpilot_customer_productfor auditing and deduplication.
Product vs. Shop Review Mapping¶
| Command | Review Type | Destination / Link Pattern |
|---|---|---|
trustpilot:send-product-review-invite |
Product | Trustpilot product review URL (SKU/GTIN + product URL). |
trustpilot:send-invite-mail |
Shop | Trustpilot shop/company review page. |
review:invite-generic-mail + template=review_invitation_google |
Shop | https://www.brekz.nl/uw-mening-via/google. |
review:invite-generic-mail + template=review_invitation_facebook |
Shop | https://www.brekz.nl/uw-mening-via/facebook. |
review:invite-generic-mail + template=review_invitation_kieskeurig |
Shop | https://www.brekz.nl/uw-mening-via/kieskeurig. |
review:invite-generic-mail + template=review_invitation_prijsvergelijk |
Shop | https://www.brekz.nl/uw-mening-via/prijsvergelijk. |
review:invite-generic-mail + template=review_invitation_nederland-review |
Shop | https://www.brekz.nl/uw-mening-via/nederland-review. |
Process Flow¶
flowchart TD
A[Order placed] --> B[Status updated]
B --> C[Order paid]
C --> D[Review process is started]
D --> E{Does the order exist?}
E -- no --> F[End review process]
E -- yes --> H[Loop through orderlines]
H --> I{Has this product already been reviewed by this user?}
I -- yes --> J[Skip product] --> U
I -- no --> K[Add to normal product list]
K --> L{Does the product/category have review-priority?}
L -- yes --> M[Add it to priority list]
M --> N
L -- no --> N{Is this the last product?}
N -- no --> U[Get the next product]
U --> I
N -- yes --> O{Does priority list have products?}
O -- yes --> P[Grab random product from priority list]
O -- no --> Q[Grab random product from normal list]
P --> R
Q --> R
R[Select review method (weighted %)] --> Y{Which method?}
Y -- Trustpilot product --> S[trustpilot:send-product-review-invite]
Y -- Trustpilot shop --> T[trustpilot:send-invite-mail]
Y -- Generic (Google/Facebook/Kieskeurig/etc.) --> V[review:invite-generic-mail]
S --> W[User may submit product + shop review]
T --> Z[User may submit shop review]
V --> Z
W --> X[Reviews are imported daily]
Z --> X