Skip to main content

Scenario

Your TrustScore dropped from 4.5 to 4.2 this month. Why? You pull recent negative reviews, send them to Mave for root cause analysis, then generate response strategies and specific reply drafts. This creates a rapid-response loop: detect score drops → understand causes → respond systematically. Flow: Trustpilot GET /business-units/{id} (score) → Compare to baseline → If dropped: GET /reviews (recent 1-3 star) → Mavera POST /mave/chat (root cause) → POST /generations (response drafts)

Architecture

Code

Example Output

Error Handling

TrustScore is rounded to 1 decimal. A 0.1 change can represent dozens of reviews. Track review volume alongside score for context.
Store your baseline TrustScore in a database or config file. The code uses a hardcoded baseline — replace with dynamic comparison in production.
Reading reviews uses the API key. Posting replies requires OAuth 2.0 (POST /reviews/{id}/reply). Set up OAuth before automating responses.