> ## 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.

<Frame>
  <img src="https://mintcdn.com/cdata/YgVOCg3Ltyd6BoYA/en/images/powered_by_cdata_connection_flow.svg?fit=max&auto=format&n=YgVOCg3Ltyd6BoYA&q=85&s=2535c0b9311347da6fae1c0d1083b0f8" alt="" width="867" height="1068" data-path="en/images/powered_by_cdata_connection_flow.svg" />
</Frame>

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

<Steps>
  <Step>
    An end user of your customer’s account clicks **Add Connection** on your web page.
  </Step>

  <Step>
    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>

  <Step>
    Connect AI Embed returns a redirect URL to your application.
  </Step>

  <Step>
    The end user is redirected to the Connect AI **Add Connection** page.
  </Step>

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

  <Step>
    Connect AI Embed calls [Create Connection](/en/API/Connection-API).
  </Step>

  <Step>
    Create Connection returns success or failure on the **Add Connection** page.
  </Step>

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

  <Step>
    Your web page now displays the end user’s list of connections.
  </Step>
</Steps>
