> ## Documentation Index
> Fetch the complete documentation index at: https://help.statisfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DevRev Integration

> Connect DevRev with Statisfy to sync support tickets and timeline activity into your customer timeline.

### Connect DevRev with Statisfy

The DevRev integration pulls support tickets (works of type `ticket`) and their timeline entries from your DevRev workspace into Statisfy. Tickets are linked to the matching customer account so support context appears alongside the rest of the customer timeline.

**Prerequisites:**

* **Admin access** to both **DevRev** and **Statisfy**
* A DevRev **Personal Access Token (PAT)** with read access to works and timeline entries
* A connected CRM (Salesforce or HubSpot) — non-CRM integrations are gated until at least one CRM sync has completed

### What Gets Synced

| Data Type               | Description                                                                                             |
| ----------------------- | ------------------------------------------------------------------------------------------------------- |
| **Tickets**             | DevRev works with `type=ticket`, scoped to the configured time window                                   |
| **Timeline Entries**    | Comments, status changes, and other timeline activity for each ticket                                   |
| **Customer (Rev Org)**  | The external customer organization linked to the ticket                                                 |
| **Created By / Owners** | Both rev\_users (external customers) and dev\_users (internal agents) are resolved to full user records |

### Generate a DevRev Personal Access Token (PAT)

1. Sign in to your DevRev workspace as an admin.

2. Create a Personal Access Token with permissions to read works and timeline entries. See the [DevRev API documentation](https://developer.devrev.ai/) for current PAT instructions.

3. Copy the token — you'll provide it to Statisfy in the next step.

<Warning>
  Keep the token secure. Anyone with the token can read ticket data from your DevRev workspace.
</Warning>

### Steps to Connect with Statisfy

1. **Log in to Statisfy.**

2. Contact [support@statisfy.com](mailto:support@statisfy.com) to enable the DevRev connector for your tenant and provide your DevRev PAT. Credentials are stored encrypted in Google Cloud Secret Manager.

3. Once connected, the bootstrap job runs a one-time historical backfill (default 30 days). Tickets and their timeline entries flow into Statisfy.

4. Periodic sync runs every **4 hours** with a **12-hour lookback window** so updates to existing tickets are picked up alongside new tickets.

5. Find synced tickets under each Account → **AI Timeline** → Timeline Activity → **Source: DevRev**.

### Sync Behavior

**Time-Bounded Pulls:**

* Tickets are fetched by `modified_date` so both new and recently updated tickets are included.
* All timestamps are sent to DevRev in UTC RFC3339 format.

**Pagination:**

* Tickets and timeline entries are paginated transparently — there is no page-size or ticket-count cap on a single sync run.

**Rate Limiting:**

* Statisfy proactively throttles DevRev API calls below the documented public ceiling (600 requests/minute per PAT).
* On HTTP 429, Statisfy honors `Retry-After` and retries up to 5 times with jittered backoff before failing the affected request.

**Error Handling:**

* A failure on a single ticket does not abort the batch — other tickets continue to process.
* If any ticket fails after retries, the overall job is marked **FAILED** in the integrations audit log so the failure is visible.

### Troubleshooting

<Accordion title="Authentication failed">
  * Verify the PAT has not expired or been revoked in DevRev.
  * Confirm the token has read access to works and timeline entries.
  * If Statisfy detects an HTTP 401, the credential is automatically marked invalid — contact support to re-enter a fresh token.
</Accordion>

<Accordion title="Tickets not appearing in Statisfy">
  * Ensure your CRM integration (Salesforce or HubSpot) has completed at least one successful sync. Until then, DevRev periodic jobs are skipped.
  * Verify the customer's DevRev `rev_org` is linked to a Statisfy account via CRM ID or domain.
  * Check whether the ticket's `modified_date` falls inside the periodic window (last 12 hours). Older tickets are picked up by the bootstrap backfill only.
</Accordion>

<Accordion title="Some tickets are missing timeline entries">
  * The integration logs and skips individual ticket failures so a transient error on one ticket doesn't block the rest.
  * If a ticket is repeatedly missing its timeline, contact [support@statisfy.com](mailto:support@statisfy.com) with the ticket's `display_id` so support can investigate the audit log.
</Accordion>

### Need Help?

If you face any challenges with the DevRev integration, please contact [support@statisfy.com](mailto:support@statisfy.com). Our team will assist you.
