# Zendesk Ticket Sync to Salesforce

> Keep your CRM in the loop on every support interaction. No more blind spots between support and sales.

Source: https://cotera.co/solutions/support/zendesk-ticket-to-salesforce

---

- **Team:** Support
- **Tools:** Zendesk, Salesforce
- **Difficulty:** medium
- **Setup time:** 10 min
- **Time saved:** 45 min/day

## How it works
1. **Match Contacts** — Look up ticket requesters in Salesforce by email
2. **Update Accounts** — Log ticket activity and resolution notes to CRM records
3. **Flag At-Risk** — Surface accounts with high ticket volume or repeat escalations
4. **Prevent Duplicates** — Tag synced tickets so they aren't processed twice

## Example requests
- Sync all resolved tickets from this week to Salesforce
- Flag any Salesforce account with more than 5 tickets this month
- Update Salesforce contacts with their latest support interaction

## Prompt

```markdown
## Task

Take resolved Zendesk tickets and sync their details to Salesforce. Use @Salesforce/Find Contact by Email to match the ticket requester to a Salesforce contact, then use @Salesforce/Find Account by Name to find the parent account. Update the Salesforce contact with the latest support activity using @Salesforce/Update Contact, and tag the Zendesk ticket as synced using @Zendesk/Update Tickets.

**Example:** After closing a batch of tickets, update the corresponding Salesforce contacts with the resolution summary and flag any accounts with high ticket volume.

## Input

The user will provide:
1. Resolved Zendesk tickets (individual or batch)
2. Optional: specific Salesforce fields to update
3. Optional: threshold for flagging at-risk accounts

**Example:** "Sync today's resolved tickets to Salesforce and flag any account with 5+ tickets this month"

## Context

### What to Sync

**Per ticket:**
- Match requester email to Salesforce contact
- Find the parent account
- Log the ticket subject, resolution, and date
- Note priority level and category

**Per account (aggregate):**
- Total open tickets
- Total tickets in the last 30 days
- Most recent ticket date and subject
- Any unresolved high-priority issues

### Sync Strategy

1. For each resolved ticket, look up the requester in Salesforce by email
2. If the contact exists, find their parent account
3. Update the contact record with last support interaction date and summary
4. If ticket volume exceeds the threshold, flag the account as at-risk
5. Tag the Zendesk ticket with "synced-to-salesforce" to prevent duplicate syncs
6. Add an internal Zendesk comment noting the Salesforce sync

### What Counts as a Good Sync

- Every resolved ticket is matched to a Salesforce contact (or flagged as unmatched)
- Account-level aggregates reflect the latest ticket data
- At-risk accounts are clearly flagged with reasoning
- Zendesk tickets are tagged so the same data isn't pushed twice

## Output

**Sync Summary:**

**Tickets Processed:** [count]
**Contacts Matched:** [count]
**Accounts Updated:** [count]
**Unmatched Tickets:** [count]

---

**Per-Ticket Sync Details:**

| Ticket # | Requester | SF Contact | SF Account | Status |
|----------|-----------|------------|------------|--------|
| #[ID] | [Email] | [Contact name] | [Account name] | Synced |
| #[ID] | [Email] | Not found | — | Unmatched |

---

**At-Risk Account Flags:**

### [Account Name]
**Tickets (30 days):** [count]
**Latest Issue:** [Subject] — [Priority]
**Reason for Flag:** [Volume spike / Repeat escalations / Unresolved P1]

**Recommended Action:** [Suggested next step for the account team]

---

**Zendesk Updates Applied:**
- Tagged [X] tickets with "synced-to-salesforce"
- Added internal comments with Salesforce contact/account IDs

---

**Unmatched Tickets (Action Required):**
These ticket requesters don't have a Salesforce contact:
- Ticket #[ID]: [email] — consider creating a new contact
- Ticket #[ID]: [email] — possible typo in email
```

## Related reading
- [AI Customer Support Shopify](https://cotera.co/articles/ai-customer-support-shopify.md)
- [Best AI Customer Support Tools](https://cotera.co/articles/best-ai-customer-support-tools.md)
- [Slack Bot Customer Support Guide](https://cotera.co/articles/slack-bot-customer-support-guide.md)

