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

# Deep-link templates

> Make the conversations Forepost mentions clickable — one URL pattern per helpdesk.

The Daily Brief and Watchlist reference specific conversations (*"the worst-CSAT exchange this week was about billing portal access"*). Without a deep-link template, you'd have to copy the topic into your helpdesk search to find it. With one, the conversation opens in one click.

## What you configure

Per helpdesk, two URL patterns:

<CardGroup cols={2}>
  <Card title="Conversation URL" icon="message">
    Required. Use `{id}` for the conversation id. Intercom also accepts `{appId}` for your workspace.
  </Card>

  <Card title="Account URL" icon="building">
    Optional. Same `{id}` substitution. Used by the Accounts view when sourced from this helpdesk.
  </Card>
</CardGroup>

<CodeGroup>
  ```text Intercom theme={null}
  https://app.intercom.com/a/inbox/{appId}/conversation/{id}
  ```

  ```text Zendesk theme={null}
  https://acme.zendesk.com/agent/tickets/{id}
  ```

  ```text Front theme={null}
  https://app.frontapp.com/open/{id}
  ```

  ```text Plain theme={null}
  https://app.plain.com/thread/{id}
  ```
</CodeGroup>

## Where to configure

**Settings → Integrations → Deep-link templates**. One card per provider. Save independently. Owners and admins only.

## How the brief uses them

When a deep-link template is configured for Intercom (today's only live OAuth source), the brief's worst-CSAT ticket-context block injects a real conversation URL alongside each item. The brief prompt is then instructed to **weave the link inline as a parenthetical** the first time it references that conversation:

> "the billing-portal exchange ([https://app.intercom.com/a/inbox/.../conversation/123](https://app.intercom.com/a/inbox/.../conversation/123)) ended with a reset apology"

Email and Slack renderers auto-linkify URLs, so the link appears as a clickable anchor in both delivery channels.

<Note>
  If no template is configured, the brief reads identically — just without the URLs. Backwards-compatible by design.
</Note>

The Coaching drawer renders the **Open** button next to each sample using the sample's stored `external_url` (populated at sample-capture time, independent of the template).

## API

```bash theme={null}
GET  /deeplinks              # list configured templates
PUT  /deeplinks              # upsert — body { source, conversationPattern, accountPattern? }
```

## Validation

* `source` must be one of `intercom`, `front`, `zendesk`, `plain`
* Both URL patterns must start with `http://` or `https://`
* Max length 500 characters each

## Privacy

Templates are workspace-scoped. They never leave Forepost — they're rendered into the HTML / Slack blocks at brief generation time and into the in-app surfaces at render time. The templates themselves are never sent to the language model.
