Find Salesforce renewals with aging Freshdesk tickets
Prioritize renewal accounts using Freshdesk ticket age and priority, with explicit status mapping, missing-account handling and a tested SQL example.
Give your account team a renewal queue informed by support reality. Combined brings Salesforce renewal opportunities and Freshdesk tickets into one queryable workflow. Define the renewal window, count aging high-priority tickets at account level, and keep missing support mappings visible instead of turning them into zero risk.
Start with the business decision
Ask: “Which accounts with renewals due in the next 30 days have high-priority unresolved tickets at least seven days old?” The answer gives sales and support a concrete list to review together, with the renewal owner and ticket IDs attached.
Ticket age is a triage rule, not an SLA breach calculation. A contractual response or resolution SLA can depend on business hours, pauses, calendars and priority changes. This tutorial uses elapsed time since creation because it is easy to define and check; use the actual SLA data for contractual reporting.
Connect the records the question needs
Connect Salesforce and Freshdesk. Discover Salesforce Account, Opportunity and the fields your organization uses for renewal classification. Freshdesk's referenced datasets include tickets, companies, contacts and ticket_fields.
Retain opportunity account, type, stage, expected close, amount and currency. For tickets, retain company linkage, ID, creation time, status and priority. Freshdesk's default codes use 2/3 for open/pending and 3/4 for high/urgent priority. Freshdesk ticket reference. Inspect custom status choices rather than assuming every workspace has only the defaults.
Make the identity map explicit
Maintain a Freshdesk company ID to Salesforce account ID map. Normalize that relationship before combining tickets with renewal opportunities. Multiple opportunities under one account should increase the renewal-value total, not duplicate each support ticket. Where several support companies belong to an account, aggregate their distinct tickets together.
The fixture includes Dune, an account with a renewal but no support-company mapping. Dune must stay in the result with an unknown ticket count. Dropping it or filling its count with zero would hide the exact account that still needs data coverage before the team can assess its renewal risk.
Define the metric and reporting window
Renewal opportunities are open, classified as renewals, in USD, and expected to close at or after September 10 but before October 10, 2026 UTC. Salesforce renewal type is an organization-specific rule; confirm its values rather than searching the opportunity name for a keyword.
The support snapshot is September 10 at 00:00 UTC. Include default open or pending tickets with high or urgent priority created at or before September 3 at 00:00 UTC. A ticket created one second later has not reached seven complete days. Exclude resolved tickets and younger tickets even when their priority is high.
Run the worked example
Atlas has $15,000 across two renewal opportunities and one qualifying urgent ticket. Its younger high-priority ticket and resolved urgent ticket are excluded. Birch has $7,000 in renewals but no qualifying ticket; its oldest ticket is low priority, while another misses the age boundary by one second. Dune keeps its $4,000 renewal with a mapping-missing flag.
Download the runnable SQL fixture and its expected result. The fixture uses synthetic records and normalized teaching tables. Run it in DuckDB; discover your own Combined datasets before adapting the calculation.
| Account | Renewal pipeline | Aged high-priority tickets | Coverage |
|---|---|---|---|
| Atlas | $15,000 | 1 | Mapped |
| Birch | $7,000 | 0 | Mapped |
| Dune | $4,000 | Unknown | Mapping missing |
Give your agent an exact assignment
Use Salesforce and Freshdesk through Combined.
Discover source schemas, renewal classification, custom ticket status
choices and the support-company/account mapping. Confirm freshness.
Aggregate open USD renewal opportunities expected to close in
[2026-09-10, 2026-10-10), UTC, by account.
At 2026-09-10 00:00 UTC, count distinct unresolved high/urgent tickets
created at least seven complete days earlier. This is age, not SLA breach.
Join the account summaries. Preserve unmapped renewal accounts with
unknown ticket counts; report mapping gaps separately from true zeros.
Return account, renewal value, owner if available, ticket IDs, exact age,
coverage timestamps and query receipt. Do not change or send anything.Return supporting records and the next decision for each account. Display a bounded list while calculating over the complete dataset.
Check coverage before acting on the answer
Source status is current as of its successful sync, so a solved ticket may still appear in a delayed snapshot. Confirm that the ticket extraction includes older unresolved records, not merely records created inside the renewal window. If you need a past-day backlog, retain status history or dated snapshots. The current record alone cannot establish which tickets were unresolved at an earlier moment.
Combined gives your agent a managed data layer across these sources, so the next question does not require another export. Start with 5 million MAR without a card, connect your apps, and use the Claude Code walkthrough or MCP setup reference.
Sources and further reading
Explore the documentation behind this guide. Product details checked on September 10, 2026.