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

# Connection Flow

> The following diagram shows the connection and authentication flow for your customer using Connect AI Embed to configure a connection.

![Connection flow between the end user, your application, Connect AI Embed, and the data source](https://mintcdn.com/cdata/YgVOCg3Ltyd6BoYA/en/images/powered_by_cdata_connection_flow.svg?fit=max\&auto=format\&n=YgVOCg3Ltyd6BoYA\&q=85\&s=2535c0b9311347da6fae1c0d1083b0f8)

Creating a connection to a Connect AI data source from a client account involves the following steps:

**Step 1**

An end user of your customer’s account clicks **Add Connection** on your web page.

**Step 2**

Your application creates a JSON Web Token (JWT) signed by a private key and makes a request to the Connect AI Embed Create Connection API.

**Step 3**

Connect AI Embed returns a redirect URL to your application.

**Step 4**

The end user is redirected to the Connect AI **Add Connection** page.

**Step 5**

The end user adds connection information for the particular data connector, such as Salesforce, and then tests and saves the connection.

**Step 6**

Connect AI Embed calls [Create Connection](https://docs.cloud.cdata.com/en/API/Connection-API.md).

**Step 7**

Create Connection returns success or failure on the **Add Connection** page.

**Step 8**

The end user clicks the **Close** button. Connect AI Embed redirects with a connection Id back to your web page.

**Step 9**

Your web page now displays the end user’s list of connections.


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