# What API integration patterns connect external ticketing platforms with Salesforce Service Cloud backend systems?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, API Architecture, Integration Patterns

Read it on the site: https://www.forcechallenges.com/interview-questions/what-api-integration-patterns-connect-external-ticketing-platforms-with-salesforce-service-cloud-backend

## Answer

**Basics:** An external ticketing system (Jira, ServiceNow, a legacy helpdesk) must create, update and read cases. Integration pattern choice depends on volume, latency and who owns the data.

**How it works:**
- Remote call-in: the external system authenticates (OAuth 2.0 JWT bearer or client credentials, via a Connected App or External Client App) and calls REST `/services/data/vXX.X/sobjects/Case`. Use an External ID field for idempotent upsert.
- Remote call-out: Flow or Apex calls the other system through Named Credentials.
- Event-driven: Salesforce publishes Platform Events or Change Data Capture; the subscriber (Pub/Sub API, CometD) updates the other side.
- Batch sync: Bulk API 2.0 for large nightly loads.
- Data virtualization: External Objects through Salesforce Connect, no copy.

**Advanced / deep dive:** Use Composite API (up to 25 subrequests) or sObject Collections (up to 200 records) to reduce round trips. Avoid polling; use events. Keep status mapping and ownership rules explicit; decide the system of record per field to avoid update loops (add a source flag). Handle API limits, retries with exponential backoff, and dead-letter logging. Use a dedicated integration user with least privilege and a permission set. For high-volume inbound requests consider middleware (MuleSoft) for transformation, throttling and monitoring. Callout limits: 100 per transaction, with 120 s cumulative timeout.

**Code / config example:**
```bash
# Upsert a case by external ID (idempotent)
curl -X PATCH "$INSTANCE/services/data/v61.0/sobjects/Case/External_Ticket_Id__c/TCK-1001" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"Subject":"Printer offline","Status":"New","Origin":"API"}'
```

**Hidden gotchas & must-remember points:**
- Daily API request limits are per org by edition and licenses; verify allocations.
- Case assignment rules do not run on API inserts unless you set the assignment rule header.
- Required fields and validation rules also apply to API calls.
- Update loops occur when both systems write each other's changes.
- Platform event delivery is at-least-once, so subscribers must be idempotent.
- Prefer External Client Apps or Connected Apps per current guidance; verify for your release.

**Best practice:** Use External IDs, events over polling, and a least-privilege integration user with monitored error handling.

---
Source: ForceChallenges · last updated 2026-11-02
