Add Recharge subscription context to new Gorgias tickets

By General Input

When a subscriber writes in, their subscriptions, next billing date and recent order history land on the ticket as an internal note before an agent opens it.

Integrations

  • Gorgias
  • Recharge

Type

Agentic Task

Categories

  • Customer Support

When a new ticket is created in Gorgias, I want an agent to look up that person's subscription billing state in Recharge and attach it to the ticket as an internal note, so my support agents stop hunting across two systems before they can answer a subscriber.

Trigger this from a Gorgias webhook on the ticket created event, configured under Settings > Account > HTTP integration. Gorgias enforces a 5 second timeout per webhook request and retries up to 3 times, so acknowledge the webhook immediately and do all of the Recharge lookups and the note write asynchronously after acking. Do not make Gorgias wait on the lookups, or it will time out and redeliver, and you will end up posting duplicate notes.

Start from the ticket. Take the ticket id from the webhook payload and use Gorgias Retrieve Ticket to load the full ticket, then read the requester's email address off it. That email is the join key into Recharge.

Look the person up with Recharge List Customers filtered by that email. If a customer matches, take their Recharge customer id and pull three things for that customer: List Subscriptions, List Charges, and List Orders. Use those to work out the active subscriptions and the products on them, the next upcoming charge date and its amount, any charges in the last 90 days that failed or were skipped, and the single most recent order along with its status.

Then write the summary back onto the same Gorgias ticket with Create Message. This has to be an internal note, not a public reply to the customer, so set it up as an internal note rather than an outgoing customer message. Keep the whole note under roughly 150 words so an agent can read it at a glance. Cover, in this order: active subscriptions and their products, the next charge date and amount, any failed or skipped charges in the last 90 days, and the most recent order with its status. Write it as short scannable lines rather than prose paragraphs, and leave out any section that has nothing to report rather than padding it.

Handle the no match case explicitly. When Recharge List Customers returns no customer for that email, do not post an empty note and do not skip the note entirely. Post a single plain line saying the person has no subscription on file, so the agent knows the lookup ran and there was genuinely nothing to find.

Two Recharge details to get right. Single resource responses wrap the object under a singular key and list responses use the plural key, so read customers, subscriptions, charges and orders out of the plural key. Money fields are decimal strings in the store currency, like "12.99", not integer cents, so render amounts as they come back instead of dividing by 100.

Related prompts

Explore more prompts
One screen returns desk for Loop and Gorgias support repsRepeat question coverage board for Gorgias support teamsWeekly support quality review board for Gorgias ticketsWhere is my order triage desk for ecommerce support teamsTurn negative Yotpo reviews into ready-to-work Gorgias ticketsTriage failed Recharge payments before subscribers churnRoute cancelled Recharge subscribers into Klaviyo win-back listsWeekly Recharge subscription health report in SlackLog daily Loop returns to Sheets and flag big refundsDaily Gorgias support ticket digest, posted to Slack