Skip to main content

product_review.deleted

Fired when a product review is deleted from the store.

Event Structure

{
"event_type": "product_review.deleted",
"payload": { ... }
}

Payload

{
"id": "6753a1b2c3d4e5f6a7b8c9d0",
"product_id": "6753a1b2c3d4e5f6a7b8c9d1",
"store_id": "store_abc123",
"customerName": "Ahmed Ali",
"email": "ahmed@example.com",
"avatar": {
"id": "img_avatar_001",
"fileName": "avatar.jpg",
"fileUrl": "https://cdn.example.com/images/avatar.jpg"
},
"images": [
{
"id": "img_review_001",
"fileName": "review-photo.jpg",
"fileUrl": "https://cdn.example.com/images/review-photo.jpg"
}
],
"rating": 5,
"comment": "Excellent product quality, highly recommended!",
"status": "approved",
"createdAt": "2025-12-01T10:30:00.000Z",
"updatedAt": "2025-12-05T14:15:00.000Z"
}

Payload Fields

FieldTypeDescription
idstringUnique review ID
product_idstringThe reviewed product ID
store_idstringStore ID that owns this review
customerNamestringName of the reviewer
emailstringReviewer email address
avatarobject | nullReviewer avatar image
avatar.idstringAvatar image ID
avatar.fileNamestringAvatar file name
avatar.fileUrlstringFull avatar URL
imagesarrayReview attached images
images[].idstringImage ID
images[].fileNamestringImage file name
images[].fileUrlstringFull image URL
ratingnumberReview rating
commentstringReview text content
statusstringReview status (e.g. approved, pending)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp

Example Handler

app/routes/webhooks.reviews.tsx
import { authenticate } from "~/qumra.server";

export async function action({ request }: { request: Request }) {
const { payload, topic, storeId } =
await authenticate.admin(request);

if (topic === "product_review.deleted") {
console.log(`Review deleted: ${payload.id} for product ${payload.product_id}`);

// Recalculate product rating, clean up related data, etc.
}

return Response.json({ success: true });
}