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

# Salesforce Integration

> Install and configure the Chamelio AI package for Salesforce to generate contracts and sync legal data from Opportunities

The Chamelio AI package for Salesforce lets you generate contracts directly from Opportunities, sync legal data in real-time, and surface legal intelligence within Salesforce.

## Prerequisites

Before installing:

* Salesforce Administrator access (a service account is recommended for the connected app)
* A Chamelio account with Admin permission
* API access enabled in your Salesforce org
* Lightning Experience enabled

## Step 1: Install the Package

The installation link is provided by the Chamelio team on request (separate links for Sandbox and Production).

<Steps>
  <Step title="Request the installation link">
    Contact the Chamelio team to receive the appropriate installation link for your org (Sandbox or Production).
  </Step>

  <Step title="Open the installation link">
    Click the link and log in with Salesforce admin credentials.
  </Step>

  <Step title="Install for all users">
    Select **"Install for All Users"** and click **Install**.
  </Step>

  <Step title="Wait for confirmation">
    Installation may take a few minutes. A confirmation email is sent when complete.
  </Step>
</Steps>

## Step 2: Connect Salesforce to Chamelio

### Verify Package Installation

After installation, confirm the **ChamelioAI** app appears under the App Launcher (the 9-dot icon in Salesforce).

### Authenticate Salesforce → Chamelio (Outbound)

<Steps>
  <Step title="Go to Chamelio Admin">
    In the ChamelioAI app in Salesforce, go to the Admin section and click **Authenticate**.
  </Step>

  <Step title="Approve the connection">
    You will be redirected to Chamelio to log in and approve the connection. This creates the link between your Salesforce and Chamelio accounts.
  </Step>
</Steps>

### Connect Chamelio → Salesforce (Inbound)

<Steps>
  <Step title="Go to Chamelio Integrations">
    In Chamelio, navigate to [Settings > Integrations](https://app.chamelio.ai/settings?tab=integrations).
  </Step>

  <Step title="Connect the Salesforce App connector">
    Click **"Connect"** next to Salesforce. You will be redirected to Salesforce to approve the connection.
  </Step>

  <Step title="Sync the schema">
    Back in Chamelio Settings, click **"Sync Schema"**. Repeat this step whenever you make Salesforce schema changes relevant to legal use cases.
  </Step>
</Steps>

## Step 3: Add the "Generate Contract" Button to Opportunity

<Steps>
  <Step title="Navigate to Object Manager">
    In Salesforce Setup, go to **Object Manager > Opportunity**.
  </Step>

  <Step title="Verify the Quick Action exists">
    Click **Buttons, Links, and Actions** and confirm **Generate Contract** is listed (Type: Lightning Web Component, API Name: Generate\_Contract).
  </Step>

  <Step title="Add to Page Layout">
    Click **Page Layouts**, open the layout to update (e.g., Opportunity Layout), and drag the **Generate Contract** button into the **Salesforce Mobile and Lightning Experience Actions** section.
  </Step>

  <Step title="Save">
    Click **Save**.
  </Step>
</Steps>

## Verification

Open any Opportunity record. The **Generate Contract** button should appear in the top action bar. Clicking it opens the contract generation screen.

Contact [support@chamelio.ai](mailto:support@chamelio.ai) if you encounter issues during installation.
