Skip to content

Reviews.io Integration

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.

Provide credentials via Rails encrypted credentials or environment variables:

  • reviews_io.store_id (or REVIEWS_IO_STORE_ID)
  • reviews_io.api_key (or REVIEWS_IO_API_KEY)
  • Optional: reviews_io.base_url (or REVIEWS_IO_BASE_URL) – defaults to https://api.reviews.io

If store ID or API key are missing the invitation sender logs a warning and skips the API call.

We call POST https://api.reviews.io/invitation with headers:

  • Content-Type: application/json
  • store: <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.

  • Responses with a non-success status or explicit error message are logged and marked as failures without blocking invoicing.
  • Successful responses reset review_snoozed_until to ensure reminders work with existing review workflows.
  • Existing review_request_processed flags prevent duplicate invitations if the order re-enters the invoiced state.