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

# Ozonetel ticket embed

> Open the latest matching ticket inside Ozonetel’s CTI iframe via a screen-pop URL.

The Ozonetel ticket embed is a Tickets route that Ozonetel can load in its CTI iframe. On a screen-pop, Oration finds workspace customer(s) by phone, then opens the latest eligible ticket for those customers.

The embed does not create tickets. It only opens work that already exists — or retries briefly while that work is still being written. Create tickets from the [inbox](https://docs.oration.ai/guides/tickets/working/create.md) or the [Create ticket](https://docs.oration.ai/api-reference/endpoint/tickets/post.md) API.

## Mental model

Public URL:

```
https://www.oration.ai/app/{workspaceSlug}/tickets/embed/ozonetel?phoneNumber={phoneNumber}&maxAgeMinutes={maxAgeMinutes}
```

Both query parameters are required. Parameter keys are case-insensitive.

| Parameter | Required | Purpose |
| - | - | - |
| `phoneNumber` | Yes | Caller number from Ozonetel. Oration normalizes common Indian local formats to E.164, then exact-matches customer phone in the workspace. |
| `maxAgeMinutes` | Yes | Positive integer only. Lookup considers tickets whose `updatedAt` falls within this many minutes. Non-digits and values ≤ 0 are rejected. |

Lookup, in order:

1. Find workspace customer(s) whose phone exact-matches the normalized E.164 number.
2. Among those customers’ tickets, take the latest **non-merged** ticket with `updatedAt` inside `maxAgeMinutes`.
3. Open that ticket’s [detail](https://docs.oration.ai/guides/tickets/working/inbox.md).

Other Ozonetel query parameters (`ucid`, `apiKey`, and similar) are ignored for lookup.

The path provider is `ozonetel`. That is the only registered embed provider. An unknown provider renders the empty state.

## Configure the screen-pop URL

Paste the URL into your Ozonetel screen-pop / iframe configuration.

**1. Copy the workspace slug**

Open the [Tickets](https://docs.oration.ai/guides/tickets/working/inbox.md) app. The slug is the URL segment after `/app/`: `https://www.oration.ai/app/{workspaceSlug}/...`.

**2. Build the URL**

Substitute `{workspaceSlug}` and keep both query parameters. Map `phoneNumber` to the caller number Ozonetel already substitutes into screen-pop URLs. Set `maxAgeMinutes` to a positive integer for the lookback window on ticket `updatedAt`.

**3. Paste into Ozonetel**

Put the URL in Ozonetel’s screen-pop / iframe config so the CTI panel loads Oration when Ozonetel fires the screen-pop.

Agents need `ticket: read` permission. They must sign in **inside** the iframe. A first-party session on oration.ai in another tab is not reused by Ozonetel’s frame.

## Phone number normalization

Ozonetel often sends local Indian formats. Oration normalizes `phoneNumber` before lookup:

| Incoming value | Shape | Lookup value |
| - | - | - |
| `9876543210` | 10-digit | `+919876543210` |
| `09876543210` | 11-digit starting with `0` | `+919876543210` (strip the leading `0`, then prefix `+91`) |
| `919876543210` | 12-digit starting with `91` | `+919876543210` |
| `+919876543210` | already starts with `+` | kept as sent |

Lookup is an exact match on the customer’s stored E.164 phone.

## What agents see

After the embed loads, one of these outcomes appears:

| State | What happens |
| - | - |
| Ticket found | Ticket detail opens — the same work surface as the inbox (title, status, [messages](https://docs.oration.ai/guides/tickets/working/messages.md), [linked conversations](https://docs.oration.ai/guides/tickets/working/conversations.md), and the side panel). |
| Customer found, no ticket yet (`noTicket`) | Oration polls every 2 seconds, up to 10 attempts. The UI shows “Ticket not found. Retrying in N” / “Retrying...”. |
| No matching customer (`noCustomer`) | Polling stops immediately. Empty state: “Ticket not found.” |
| Retries exhausted | Same empty state: “Ticket not found.” |
| Unknown provider | Empty state. |

A ticket that is created or updated after the iframe first loads can still open on a later poll, as long as the customer already exists with that phone and the ticket is non-merged and inside the `maxAgeMinutes` window.

## FAQ

**Does the embed create a ticket?**\
No. It only opens an existing non-merged ticket. Create the ticket from the [inbox](https://docs.oration.ai/guides/tickets/working/create.md) or the [Create ticket](https://docs.oration.ai/api-reference/endpoint/tickets/post.md) API (including identity via `customerId`, or `phoneNumber` / `email` when `customerId` is omitted).

**Why did I see “Ticket not found.” with no retry?**\
No workspace customer matched the normalized phone (`noCustomer`). Polling does not start until a customer exists.

**Why does it keep retrying?**\
A customer matched, but no eligible ticket was in the `maxAgeMinutes` window yet. Oration retries every 2 seconds, at most 10 times.

**Do extra Ozonetel fields such as `ucid` or `apiKey` change which ticket opens?**\
No. Only `phoneNumber` and `maxAgeMinutes` are used for lookup.

**Can I use `/tickets/embed/` with another provider name?**\
Not in this release. Only `ozonetel` is registered. Any other provider shows the empty state.

**I am already signed in to Oration in another tab. Why is the iframe asking me to log in?**\
The CTI iframe is cross-site. Sign in inside the frame.

## Limitations

* Only the `ozonetel` embed provider is registered.
* Lookup is exact E.164 phone after the normalization table above. It does not search title, ticket number, or other Ozonetel parameters.
* Merged tickets are skipped. The recency window is ticket `updatedAt`, not created time.
* `maxAgeMinutes` must be a positive integer (digits only, greater than 0).
* Agents need `ticket: read` permission.
* Ozonetel and `*.ozonetel.com` are allowed as CSP `frame-ancestors` so Oration can load in their iframe. Cross-site iframe sessions use SameSite=None Secure partitioned cookies; sign in inside the iframe.

> [!NOTE]
>
> Questions: [support@oration.ai](mailto:support@oration.ai) or [developers@oration.ai](mailto:developers@oration.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.