Reviews.io Integration
Overview
Section titled “Overview”When an order transitions to the invoiced state we queue a standard Reviews.io invitation inline using Api::ReviewsIo::InvitationSender. The service builds the payload from the order reviewer information and non-shipping line items and records the request on success (review_request_processed and first_review_request_processed_date).
The integration is intentionally synchronous inside the state machine so that review invitations are emitted as soon as the order is invoiced. Failures are logged and do not block the invoicing workflow.
Credentials & Configuration
Section titled “Credentials & Configuration”Provide credentials via Rails encrypted credentials or environment variables:
reviews_io.store_id(orREVIEWS_IO_STORE_ID)reviews_io.api_key(orREVIEWS_IO_API_KEY)- Optional:
reviews_io.base_url(orREVIEWS_IO_BASE_URL) – defaults tohttps://api.reviews.io
If store ID or API key are missing the invitation sender logs a warning and skips the API call.
Payload
Section titled “Payload”We call POST https://api.reviews.io/invitation with headers:
Content-Type: application/jsonstore: <store_id>apikey: <api_key>
Body example:
{ "name": "Jane Doe", "email": "jane@example.com", "order_id": "SO12345", "country": "USA", "currency": "USD", "products": [ { "sku": "TEST-SKU-1", "name": "Test Item TEST-SKU-1" }, { "sku": "TEST-SKU-2", "name": "Test Item TEST-SKU-2" } ]}The products list includes unique non-shipping line items to support product review invitations. Fields without values (e.g., missing reviewer email) cause the integration to skip the API call.
Operational Notes
Section titled “Operational Notes”- Responses with a non-success status or explicit error message are logged and marked as failures without blocking invoicing.
- Successful responses reset
review_snoozed_untilto ensure reminders work with existing review workflows. - Existing
review_request_processedflags prevent duplicate invitations if the order re-enters the invoiced state.