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

# Yellow.ai

> Create Oktivo leads from your Yellow.ai website chatbot and send call results back to Yellow.ai

# Yellow\.ai

Connect your Yellow\.ai bot from **Connecter > Yellow\.ai** in the Oktivo dashboard. The connector works in two directions.

> [!NOTE]
>
> Availability depends on your Oktivo plan. If you do not see the Yellow\.ai tile in **Connecter**, ask support to enable it.

## What you get

**Website chatbot to Oktivo lead.** When a visitor shares a phone number in your Yellow\.ai chatbot, Oktivo creates a lead (or updates the lead that already has that number) and saves the chat on it. Your team can then call the lead from Oktivo.

**Oktivo call result to Yellow\.ai.** After an Oktivo call finishes and has been analysed, Oktivo writes the contact and the call status onto the matching customer profile in Yellow\.ai.

## Before you start

* A Yellow\.ai bot, and a Yellow\.ai user who can open **Settings > API Keys**.
* An Oktivo account with the Yellow\.ai connector enabled.
* For chatbot leads: someone who can edit the bot flow in Yellow\.ai Studio.

## Connect your bot

**1. Get the API key from Yellow\.ai**

In Yellow\.ai, open **Settings > API Keys** and create or copy an API key for your bot.

> [!WARNING]
>
> Treat the key like a password. Do not paste it into chat, email, or a document.

**2. Find the bot ID and region host**

The **bot ID** identifies your bot, for example `x1234567890123`. The **region host** is the Yellow\.ai address for your region, for example `cloud.yellow.ai`. Type only the host name. A leading `https://` or a trailing `/` is removed for you.

**3. Connect in Oktivo**

Open **Connecter**, find **Yellow\.ai**, and click **Connect**. Enter the API key, the bot ID, and the region host. Oktivo checks them with Yellow\.ai before saving. The key is encrypted and is never shown again.

### If connecting fails

| Message | What it means | What to do |
| - | - | - |
| Enter your Yellow\.ai API key to connect | The key field is empty | Enter the key |
| Enter your Yellow\.ai bot id to connect | The bot ID field is empty | Enter the bot ID |
| The CRM rejected the configured credentials | Yellow\.ai refused the key. The key, the bot ID, or the region host is wrong | Check all three. The key must belong to that bot |
| Could not connect to the CRM | Oktivo could not reach Yellow\.ai, or the host is not valid | Check the region host and try again |
| This Yellow\.ai bot is already connected to another account | Another Oktivo account uses this bot | Disconnect it there first, or contact support |

## Settings

After connecting, click **Settings** on the Yellow\.ai card. Your choices are saved and shown again when you reopen the panel.

| Setting | On by default | What it does |
| - | - | - |
| **Sync contact** | Yes | After a call is analysed, creates the contact in Yellow\.ai with the lead's name, phone, and email. It creates a new Yellow\.ai user each time, it does not look for an existing one |
| **Log call activity** | Yes | **Not active yet.** The switch is there, but Oktivo does not write a call summary to Yellow\.ai today. Turning it on or off changes nothing |
| **Update lead status** | Yes | Writes the call outcome (`done` or `failed`) to a field called `oktivo_lead_status` on the Yellow\.ai profile. It is the call outcome, not the lead stage in Oktivo. The field must exist in your Yellow\.ai customer data, otherwise Yellow\.ai ignores the value without showing an error |
| **Create leads from chatbot** | No | Turns on lead capture from your chatbot, for both **Sync now** and the API node method. A secret is needed only for the API node method |
| **Outbound notifications** | No | **Coming soon.** Cannot be turned on yet |

Pulling your existing Yellow\.ai contacts into Oktivo is also **not available yet**.

> [!NOTE]
>
> Only a finished, analysed call sends data to Yellow\.ai. Changing a lead's status by hand in Oktivo does not.

## Sync now: pull chatbot leads on demand

There are two ways to get chatbot leads into Oktivo. **Sync now** needs no change in Yellow\.ai. The [API node method](#create-leads-from-your-chatbot) below sends each lead the moment the phone is shared. You can use either or both.

### What it does

When you click **Sync now** on the Yellow\.ai card, Oktivo uses your connected API key to look at the visitors who chatted with your bot recently. For every visitor who shared a phone number, it creates a lead (or updates the lead that already has that number) and saves the chat on it. Nothing runs by itself yet. Leads arrive only when you click.

> [!WARNING]
>
> Yellow\.ai only lets Oktivo read the **newest 10,000 profiles** (about the last 12 days on a busy bot), so Sync now cannot reach older visitors. It also only finds leads whose **phone number the bot captured**: saved on the Yellow\.ai profile, or typed by the visitor in a chat that Yellow\.ai returns. Many website chats never store a phone number on the profile, and Yellow\.ai may return no chat text for them. Those visitors are counted as "no phone number" and no lead is created. If this is your case, use the [API node method](#create-leads-from-your-chatbot), which sends the phone number the moment the visitor shares it.

### When to use it

* You want leads from your chatbot with only a small bot-flow change (see [Prepare your Yellow.ai bot](#prepare-your-yellowai-bot)).
* You want to catch up on chats from the last few days.
* You use the API node method and want to double-check nothing was missed.

### How to run it

**1. Turn on Create leads from chatbot**

Open **Settings** on the Yellow\.ai card and turn the switch on. No secret is needed.

**2. Pick a time window**

Choose **Last 24 hours**, **Last 3 days** or **Last 7 days** next to the button.

**3. Click Sync now**

The button shows a spinner while it works. A result card appears when it finishes. A run can take up to about 40 seconds.

### Prepare your Yellow\.ai bot

Sync now can only create a lead when Yellow\.ai holds the visitor's phone number. If your bot asks for the phone number in the chat but does not save the answer, Yellow\.ai keeps no phone on the visitor's profile and returns no chat text, so Oktivo has nothing to read. Fix this once in Yellow\.ai Studio:

**1. Open your bot flow**

In Yellow\.ai Studio, open the flow that asks the visitor for their phone number.

**2. Save the answer to a user property**

Click the question node that asks for the phone number. In its settings, choose to store the response in a **user property** and pick **phone**.

**3. Do the same for name and email**

Repeat for the name question (property **firstName**) and the email question (property **email**).

**4. Publish the bot and test**

Publish, chat with your bot once, then click **Sync now** in Oktivo. The visitor should appear as a lead.

> [!TIP]
>
> Want the lead the moment the visitor shares their phone, with the full chat? Add the Oktivo API node instead, or as well. See [Create leads from your chatbot](#create-leads-from-your-chatbot).

### Reading the result

| Line | Meaning |
| - | - |
| **Scanned** | Visitors Oktivo looked at |
| **Created** | New leads |
| **Updated** | Existing leads that received a new chat or details |
| **Already up to date** | Leads that already had this chat, so nothing changed |
| **Setup callout** | Shown when no scanned profile had a phone number, or Yellow\.ai returned no chat history. It links to [Prepare your Yellow.ai bot](#prepare-your-yellowai-bot) |
| **Skipped: no phone number** | The visitor never shared a number that Oktivo could find |
| **Skipped: already checked, no new activity** | Handled in an earlier run and the visitor has not chatted since |
| **Chat transcript could not be fetched** | The lead was saved, but Yellow\.ai did not return the chat in time. Run again later |
| **Phone from profile / from chat** | Where the number came from |
| **Partial** | The run stopped at a limit (time, or about 60 visitors checked). Click **Sync now** again to continue with the visitors not yet checked |
| **Only the newest 10,000 profiles** | Yellow\.ai does not let Oktivo read further back, so older visitors were not scanned |

### Tips

* The phone number must be captured: either saved on the Yellow\.ai profile, or typed by the visitor in the chat (for example after the bot asks for it). Numbers without a country code are treated as Indian (`+91`).
* A longer window finds older chats but takes more runs when you have many visitors.
* If your Yellow\.ai API key has an **IP allow-list**, add the IP address of the Oktivo server, or Sync now is rejected.
* Each click checks up to about 60 visitors. If the card says it stopped early, click again.
* Only one sync can run at a time for your account.

### If Sync now shows a problem

| Message | What it means | What to do |
| - | - | - |
| **Yellow\.ai rejected the key** | The key is wrong, revoked, restricted by IP, or not allowed to read chat messages | Check the key and its IP allow-list in Yellow\.ai, or reconnect with a new key |
| **Could not read recent users** | Yellow\.ai returned the visitor list in an order Oktivo cannot rely on (it expects the most recently active first), so nothing was imported | Use the API node method for now, and send the diagnostics shown in the card to support |
| **Yellow\.ai did not return the user list. Yellow\.ai answered HTTP 400...** | Yellow\.ai refused the request. The message shows the HTTP status and the start of Yellow\.ai's answer | Wait a minute and try again. If it keeps happening, send the message to support |
| **None of the scanned Yellow\.ai profiles has a phone number...** | The bot asks for the phone but does not save it to the user profile, and Yellow\.ai returned no chat history | Follow [Prepare your Yellow.ai bot](#prepare-your-yellowai-bot), or use the API node method |
| **Yellow\.ai did not respond correctly** | Yellow\.ai was slow, busy or returned an error | Wait a minute and try again |
| **A sync is already running** | Someone already started a sync | Wait a minute and try again |
| **Turn on Create leads from chatbot** | The switch in Settings is off | Turn it on, then sync again |
| Many **no phone number** skips | Most visitors did not share a number, or your bot does not store it on the profile | This is normal. Only visitors with a number become leads. The result says "none had a phone number" when every checked visitor was skipped |

> [!NOTE]
>
> In **Sync activity**, rows named `sync-now:...` summarise a run. They are not lead changes, and they never show as successful leads.

### Known limitations

* Sync now only looks at the **newest 10,000 profiles**. Yellow\.ai refuses to list further back, so older visitors are never scanned.
* Yellow\.ai lists visitors by most recent activity. Oktivo checks this on every run. If it cannot confirm it, it imports nothing rather than guess.
* Sync now only finds leads with a **phone number captured by the bot** (on the profile, or typed in a chat that Yellow\.ai returns). Yellow\.ai may return no chat messages for some website chats, which is normal.
* Phone numbers found in chat text are matched by rule. An unusual format can be missed.
* Only the latest chat of each visitor is saved per run, and chats are cut at 500 messages.
* If your bot saves visitors to a Database table, read them from there instead: see [Read leads from a Yellow.ai Database table](#read-leads-from-a-yellowai-database-table).

## Read leads from a Yellow\.ai Database table

If your bot flow saves every visitor into a Yellow\.ai **Database table** (for example `keus_userdetails`) instead of user properties, Sync now can read that table directly.

**1. Check your bot saves visitors to a table**

In Yellow\.ai open **Data > Database** and confirm the table has the visitor's phone number.

**2. Choose the table**

In Oktivo open the Yellow\.ai **Settings** and find **Lead source table**. Click **Choose table** and pick yours.

**3. Check the columns**

Oktivo suggests the columns for name, phone, email, alternate phone and the chat user id (`sender_num`). Change any that are wrong. The phone column is required. Optionally add a filter, such as `bot_type` equals `Bot / Website`.

**4. Preview and save**

**Preview** shows up to 5 recent rows with the name, phone and email partly hidden. Then click **Save**.

**5. Click Sync now**

Sync now reads the rows updated in the lookback window and creates or updates leads.

> [!NOTE]
>
> Rows without a valid phone number are skipped. If the main phone column is empty or invalid, the alternate phone column is used. A 10-digit mobile number starting with 6 to 9 and no country code is treated as `+91`; other numbers need a country code.

Running Sync now again creates no duplicates: rows that did not change since the last run are reported as unchanged. When a table is selected, Sync now reads only the table. Profile scanning is not run unless it is requested.

> [!NOTE]
>
> Yellow\.ai can encrypt the text of chat messages. When it does, Oktivo cannot read the chat history through the API, so no transcript is saved. The lead page then shows that the chat is encrypted and how many messages it has, and the lead details come from the table columns. You can read the chat in Yellow\.ai Conversations.

| Problem | What to do |
| - | - |
| No rows found | The table had no rows updated in the lookback window, or the filter excludes them. Increase the lookback or clear the filter. |
| Rows found but none with a phone | Check the phone column in Lead source table. |
| Yellow\.ai refused the request | The API key may not have access to Database tables, or the server IP is not on the key's allow-list. |
| The table no longer exists | Pick the table again. |
| Yellow\.ai did not return the table data | Try again later. The Database endpoints are used by the Yellow\.ai dashboard and may have changed. |
| Leads have no chat text | The chat is encrypted by Yellow\.ai, or Yellow\.ai returned no messages for that visitor. |

## Create leads from your chatbot

**1. Generate a secret**

In the Yellow\.ai settings, click **Generate secret**. Oktivo shows it once. Copy it and keep it somewhere safe.

> [!WARNING]
>
> If you click **Generate secret** again to replace it, the old secret stops working immediately. Update the Yellow\.ai API node straight away or new chats will be rejected.

**2. Turn on Create leads from chatbot**

You can turn this on at any time. The secret is only needed so the API node can prove it is your bot.

**3. Add an API node in Yellow\.ai Studio**

Add an **API node** right after the step where the bot collects the visitor's phone number, and set it up as shown below.

### API node settings

The settings panel in Oktivo shows the exact URL and a ready-to-copy example. Use those values.

| Setting | Value |
| - | - |
| Method | `POST` |
| URL | `https://<your Oktivo backend address>/api/v2/connecter/webhooks/yellowai` |
| Header `Content-Type` | `application/json` |
| Header `x-yellow-bot-id` | Your bot ID |
| Header `x-oktivo-secret` | The secret you copied |
| Timeout | 15 seconds |
| Retry | On server errors (5xx), once or twice. A retry never creates a second lead |

### Body

```json theme={null}
{
  "name": "{{{name}}}",
  "phone": "{{{phone}}}",
  "email": "{{{email}}}",
  "conversationId": "{{{conversation_id}}}",
  "userId": "{{{yellow_user_id}}}",
  "pageUrl": "{{{page_url}}}",
  "summary": "{{{chat_summary}}}",
  "transcript": [
    { "role": "bot",  "text": "Hi! How can I help?",          "at": "2026-11-17T06:10:58Z" },
    { "role": "user", "text": "What does the Pro plan cost?", "at": "2026-11-17T06:11:10Z" }
  ]
}
```

> [!WARNING]
>
> The `{{{...}}}` names are examples. Variable names differ from bot to bot, so replace each one with the matching variable from your own flow. Remove any field your flow cannot supply.

| Field | Needed | Notes |
| - | - | - |
| `phone` | Yes | Include the country code (for example `+14155550123`) for numbers outside India. A plain 10-digit number is treated as an Indian number (`+91`) |
| `name` | No | Without it the lead is named `Contact` plus the last 4 digits. A later chat that includes a name replaces that placeholder |
| `email` | No | An invalid email is ignored. An email that already belongs to another lead is not saved |
| `conversationId` | Recommended | Lets Oktivo recognise the same chat if it is sent again. The chat is then updated, not added twice |
| `userId` | No | The Yellow\.ai user ID. If you send no `transcript`, Oktivo tries to fetch the chat from Yellow\.ai itself |
| `pageUrl` | No | The page the visitor was on |
| `summary` | No | A short summary, up to 500 characters |
| `transcript` | No | The chat, as a list of messages or one text. The whole chat is saved, up to 5,000 messages. Chats beyond that are saved up to the limit and marked as shortened |
| `profile` | No | Extra Yellow\.ai user details as a flat object, for example `"profile": {"city": "Pune", "language": "en"}`. Saved on the lead as the **Yellow\.ai profile**. Passwords, tokens and keys are never saved |

Send the `transcript` or a `summary` if your flow can. For long chats, send `userId` and leave out the `transcript`: Oktivo then fetches the whole chat from Yellow\.ai itself. Fetching with `userId` has not been confirmed against a live bot, so it may not work for every setup. If it fails, the lead is still created and keeps the summary.

> [!WARNING]
>
> Oktivo accepts a request body of up to 100 KB. A very long `transcript` sent in the request can be larger than that and is refused, and the lead is not created. For long chats, send `userId` instead of the `transcript`.

### What is saved from Yellow\.ai

* **The full chat.** Every message, in order, with who wrote it (visitor, bot or agent) and the time. Sending the same chat again changes nothing. Sending a longer version of the same chat adds the new messages. A shorter, older copy is ignored.
* **Profile details.** Details such as name, email, city and country are copied to the lead only where the lead has nothing better yet. An existing name, email or location is never overwritten. Everything else (language, time zone, last channel and your own Yellow\.ai properties) is kept in the **Yellow\.ai profile** card on the lead. If you turned off pulling name or email in your field mapping, those two are not copied, but they still show in the profile card.
* **Optional profile lookup.** Oktivo can also look up the profile from Yellow\.ai with `userId`. This is switched off by default because it has not been confirmed against a live bot. Ask your administrator if you want it enabled.

### Test it

Ask a developer to send this request with your own values, or use the example in the settings panel:

```bash theme={null}
curl -X POST 'https://<your Oktivo backend address>/api/v2/connecter/webhooks/yellowai' \
  -H 'Content-Type: application/json' \
  -H 'x-yellow-bot-id: <your bot id>' \
  -H 'x-oktivo-secret: YOUR_SECRET' \
  -d '{"name":"Test Visitor","phone":"+91 90000 00001","conversationId":"conv_test_1","summary":"Test chat"}'
```

The first call creates a lead. Sending the same request again changes nothing, and you still have one lead.

## How leads appear in Oktivo

* The lead's **channel** is **Yellow\.ai** and its **source** is **Website chatbot**. You can filter on both in the lead list.
* Your bot ID is saved on the lead.
* The chat is saved as one entry in the lead's conversation timeline, counted under **Notes**. The entry shows the last few messages. Click **View full chat** to read the whole conversation as a scrollable chat with visitor, bot and agent bubbles and times. Long chats load 100 messages at a time as you scroll, with **Load more**, **Jump to latest** and **Load older** buttons.
* If a chat was very long, a banner tells you that only part was saved. If it is still being copied from Yellow\.ai, the banner says it is still syncing. If the copy stopped early, it says **Partially synced** and finishes the next time Yellow\.ai sends the same chat.
* A collapsible **Yellow\.ai profile** card (in the **Marketing** section of the lead) lists the details Yellow\.ai had for the visitor. It is hidden when there are none.
* Deleting the lead also deletes its saved chat.
* If the phone number already belongs to a lead (added by hand, imported, or from another connector), that lead is updated instead of duplicated. It keeps its original channel. The chatbot visit is added to its history.
* If the same visitor chats again with a different conversation, the new chat is added as another entry.

## Sync activity

Click **Sync activity** on the Yellow\.ai card to see recent activity, newest first. You will see one row for each lead created or updated from the chatbot, and one for each push after a call. Rows marked **skipped** were not processed on purpose, for example because a setting was off, the phone number was missing, or the chat could not be fetched. Rows marked **failed** include the reason.

## Troubleshooting

| Symptom | Likely cause | Fix |
| - | - | - |
| **Sync now** finds users but creates no leads | Your bot asks for the phone number but does not save it to the visitor's profile, and Yellow\.ai returns no chat history for those visitors | In Yellow\.ai Studio, store the phone, name and email answers in the user properties **phone**, **firstName** and **email** ([steps](#prepare-your-yellowai-bot)), or add the Oktivo API node. Then click **Sync now** again |
| The API node gets **401** | The secret is wrong, was replaced, or was never generated | Generate a secret, copy it, and paste it into the `x-oktivo-secret` header |
| **422** `NO_PHONE` | The phone field is empty | Check that the phone variable is filled in before the API node runs |
| **422** `INVALID_PHONE` | The value is not a valid phone number | Send digits with a country code, for example `+14155550123` |
| The call succeeds but no lead appears | The bot ID in `x-yellow-bot-id` does not match the connected bot, or **Create leads from chatbot** is off | Use the exact bot ID you connected, and turn the switch on |
| The lead's name is `Contact 3210` | The flow did not send a name | Add `name` to the body. A later chat with a name fixes the lead |
| The lead has no chat, only a summary | No `transcript` was sent and Oktivo could not fetch the chat | Send `transcript` or `summary` in the body |
| The chat stops before the end | The chat was sent when the phone was shared, and the visitor kept talking | Add a second API node at the end of the chat with the same `conversationId` and the full `transcript` (or the same `userId`) |
| The API node gets **413** | The request body is over 100 KB, usually a very long `transcript` | Send `userId` and leave out the `transcript` so Oktivo fetches the chat itself |
| The chat says **Partially synced** | Yellow\.ai was asked for too many pages in a minute, or it was slow | Wait, or let the API node send the same chat again. It continues where it stopped |
| Two chats show as one | No `conversationId` was sent | Send `conversationId` |
| Status in Yellow\.ai is not updated | The `oktivo_lead_status` field does not exist in Yellow\.ai, or Sync contact did not run | Add the field in Yellow\.ai and check **Sync activity** |
| **503** from Oktivo | Too many requests for this bot (more than 120 per minute), or a short wait | Let the API node retry |

> [!NOTE]
>
> A phone number without a country code is treated as Indian (`+91`). For visitors in other countries, make your flow add the country code before it sends the number.

## FAQ

> [accordion] Does it copy my whole Yellow\.ai contact list into Oktivo?
>
> No. It only creates a lead when a visitor shares a phone number, either through your bot flow or when you click **Sync now** (which looks only at recent chats). Importing all existing Yellow\.ai contacts is not available yet.

> [accordion] What happens if the same visitor is sent twice?
>
> Nothing is duplicated. The same delivery is recognised and ignored. A repeat visit with the same phone number updates the existing lead.

> [accordion] Will a lead be created without a phone number?
>
> No. A request without a valid phone number is refused and no lead is created.

> [accordion] Why does Log call activity do nothing?
>
> Oktivo does not write call summaries to Yellow\.ai yet. The switch is a placeholder until that is available.

> [accordion] Does changing a lead's status in Oktivo update Yellow\.ai?
>
> No. Only a finished, analysed call sends data to Yellow\.ai, and what it sends is the call outcome.

> [accordion] Can I use the same bot in two Oktivo accounts?
>
> No. A bot can be connected to one Oktivo account at a time.

> [accordion] What happens if I disconnect?
>
> Syncing stops and your Yellow\.ai settings and secret are removed. If you reconnect later, you start with the default settings and generate a new secret.

> [accordion] Where is my API key stored?
>
> It is encrypted and never shown again. To change it, connect again with the new key. Your settings are kept when you reconnect without disconnecting first.

## Related

> [card] [Lead Capture](https://docs.oktivo.com/guides/lead-capture.md)
>
> Other ways to bring leads into Oktivo

> [card] [CRM Integration Guide](https://docs.oktivo.com/guides/crm-integration.md)
>
> Generic CRM setup with code samples


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