FaxStore
This page covers how Review Booster works under the hood: the events it sends and listens for, how a support app can plug into it, its routes, and its database tables. For setting it up, see Review Booster.
Table of Contents
File | Purpose |
|---|---|
| Entry file: settings, license check, database tables, page injection, app registration |
| Detection and happiness score, the 15 minute check, sending, click and review tracking, coupons, alerts, QR codes, insights |
| Customer pages and links, staff pages, staff API |
|
|
| Settings, edited from Review Booster → Configure |
|
|
Review Booster needs the qr-image npm package, which the App Store installs with it. Its tables are created when FaxStore starts. Nothing is added to installme.sql.
Every prompt is a row in rvb_requests. kind is review (a purchase) or support (a support follow-up).
Status | Meaning |
|---|---|
| Not due yet, or due but the customer doesn't qualify yet. |
| The customer was asked. On-site prompts show for this request. |
| The customer clicked a message or prompt. |
| A review was credited to this request ( |
| A support follow-up the customer answered ( |
| Closed without asking. |
| Closed after waiting too long, or after being asked and not reviewing. |
| A purchase that's never asked about (free, added by staff, an excluded product, a duplicate). Left out of insights. |
skipReason is one of: account, already-reviewed, refunded, support-contact, support-open, not-downloaded, low-score, opted-out, no-response, staff. For ignored rows it's one of: free, granted, excluded, physical, duplicate, cooldown.
signals stores what the last check found, as JSON: account, optedOut, reviewed, priorPositive, repeat, accountDays, owned, delivered (true, false, or null when there's nothing to download), downloads, refunded, supportContact and supportResolved.
Review Booster emits these on the faxstore object. Request objects don't include the link token.
Event | Payload | When |
|---|---|---|
|
| A request, reminder ( |
|
| The customer clicked a message or prompt. |
|
| A review was credited to a request. |
|
| A customer rated their support for the first time. |
Reviews posted from Review Booster's own review page also emit core's reviewCreated event, so anything listening for new reviews still works.
faxstore.on('reviewbooster:reviewed', ({request, channel, stars}) => {
console.log(`${request.productName} got ${stars} stars via ${channel}`);
});Event | Used for |
|---|---|
| Runs a check a few seconds after a purchase. |
| Credits reviews made from the normal review form to a request, or counts them as organic. Sends low rating alerts. |
| Records a refund. |
| Records a download, alongside |
| A support contact (Live Chat app). |
| A resolved support contact. When a staff member replied, a support follow-up is created. |
| A support contact (see below). |
| A resolved support contact, and a support follow-up. |
Any app can feed Review Booster's If they contacted support check and the support follow-up by emitting two events:
// When a customer opens a ticket
faxstore.emit('support:ticketOpened', {userId: '284019384756102938', ticketId: 'T-1042', at: Date.now()});
// When the ticket is closed
faxstore.emit('support:ticketClosed', {userId: '284019384756102938', ticketId: 'T-1042', at: Date.now()});userId is the customer's users.userId. at is optional and defaults to now. Closing a ticket creates a support follow-up (with source support and sourceRef set to the ticket ID) unless the customer had one in the last few days.
const booster = faxstore.apps.get('review-booster');
if(booster) {
await booster.api.sweep(); // run the check now: {at, created, sent, reminders}, or null if unlicensed, off or already running
const data = await booster.api.insights(30); // the Insights page numbers: 7, 30, 90, 365 or 'all'
}app.locals.apps['review-booster'] holds {version, state}. state.licensed says whether the license is verified.
The channel on clicks, reviews and events, and reviewChannel on requests:
Channel | |
|---|---|
| Messages |
| On-site prompts ( |
| The QR code in a request email |
| A QR code or link from QR codes & links |
| A review left after a good support rating |
| Asked, but reviewed from the normal review form without clicking |
| A review from someone who wasn't asked |
All routes have at least two path segments, so they never clash with FaxStore's /:pageName pages.
Method | Path | |
|---|---|---|
GET |
| Every link in a message or prompt. Counts the click, then opens the review or support page. |
GET |
| Review page for one request. Needs the customer to be signed in. |
POST |
|
|
GET |
| Pick a product to review (QR codes and links). |
POST |
|
|
GET |
| Thank-you page after a review |
GET |
| Support rating page. A rating in |
POST |
|
|
GET |
| A QR code or link. Counts the scan, then opens the product picker. |
GET |
| A customer's QR code, used in emails |
GET, POST |
| Confirm, then stop review requests for that customer |
POST |
| On-site prompt impressions and dismissals. Needs |
GET |
| Client scripts and styles |
Path | |
|---|---|
| Insights. |
| Settings |
| A QR code. |
All need the Manage Store permission and X-Requested-With: rvb, and answer JSON.
Method | Path | |
|---|---|---|
POST |
| Ask now, skipping the checks |
POST |
| Ask again |
POST |
| Stop asking |
POST |
|
|
POST |
| Same body. Sends the message to the staff member. |
POST |
| Runs the check now |
POST |
| The settings form |
Column | |
|---|---|
| Snowflake ID |
| 32 character link token, unique |
|
|
|
|
| The |
| |
|
|
| |
| Happiness score and what the last check found |
| Timestamps in milliseconds |
| 0, or 1 once the reminder is sent |
| Comma separated, e.g. |
| |
| The credited review |
| Support follow-ups |
| The thank-you coupon in |
One row per thing that happened, which the Insights page counts.
Column | |
|---|---|
| Auto increment |
| The request, when there is one |
| The customer, when known |
| See Channels. Support and download events use |
|
|
| The star rating for |
| Milliseconds |
Review Booster wraps res.render and adds its data and site.js before </body>, so themes need no changes. It only does this for signed-in customers who have a request in the sent or clicked status, and never on the staff panel, cart, checkout, login or review pages.
Other apps, like Live Chat, wrap res.render too. Review Booster's wrapper works whichever app loads first, so both apps' additions appear on the page.
The script finds what it needs on each page:
Prompt | Where it goes |
|---|---|
Popup, floating badge | Fixed to the corner of the page |
Footer badge | The top of the page's |
Order and receipt banner | The top of the first |
Downloads |
|
Custom themes that keep these elements get every prompt. If a theme leaves one out, only that prompt is missing.