# License Management

## License & Permission Management

To ensure users can view and interact with Avonni Components, specifically on Experience Cloud sites, you must complete a two-step configuration process.

<mark style="background-color:orange;">**⚠️ Configuration Requirement:**</mark> For a user to successfully access Avonni Components, you must assign BOTH:

1. **A Package License** (Allocates a seat to the user).
2. **A Permission Set** (Grants technical access to the components).

{% hint style="warning" %}

#### Important

If a user has a License but no Permission Set (or vice versa), the components will not load, and the user will see an error message.
{% endhint %}

***

## Step 1: Assign Package Licenses

The package license grants the user the fundamental right to use the software within Salesforce.

License Availability:

* Production: Includes 10 Freemium licenses.
* Sandbox: Includes a Site License (Unlimited users/No expiration).

How to Assign:

1. Navigate to **Setup**.
2. Search for and select **Installed Packages**.
3. Locate **Avonni Experience Components** and click **Manage Licenses**.
4. Click **Add Users**.
5. Select all users who require access and click **Save**.

<figure><img src="/files/CTLxQLemsUTn0wSViWuU" alt=""><figcaption></figcaption></figure>

***

## Step 2: Assign Permission Sets

Once the license is assigned, you must assign the correct Permission Set based on the user's role. The Avonni package includes three distinct permission sets.

<figure><img src="/files/PtmqSDIDQkvJtCpI4a5P" alt=""><figcaption></figcaption></figure>

Choose the correct permission set for your user:

| Role                                                                                      | Permission Set Name                     | Function                                                                                                             |
| ----------------------------------------------------------------------------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| <p><strong>End Users</strong></p><p><strong>(Experience Cloud & App Builder)</strong></p> | Avonni Experience Cloud Components User | Required for users viewing components on Experience Sites or standard Lightning App Builder pages.                   |
| <p><strong>End Users</strong></p><p><strong>(Dynamic Components)</strong></p>             | Avonni Dynamic Components User          | Required for users interacting with Dynamic Components (e.g., custom Data Tables, action buttons) inside Salesforce. |
| **Admins & Builders**                                                                     | Avonni Experiences Admin                | Required for users who need to create, edit, or build layouts using the Avonni Component Builder.                    |

How to Assign:

1. Navigate to **Setup** > **Permission Sets**.
2. Select the appropriate Permission Set from the table above.
3. Click **Manage Assignments** > **Add Assignment**.
4. Select the users to whom you assigned licenses in Step 1.
5. Click **Assign**.

***

## Configuration for Guest Users

Guest users (unauthenticated visitors on public sites) do not require a standard Package License, but they do require permissions.

{% hint style="warning" %}

#### Note

Guest User access for Production environments is an add-on feature. Please [get in touch with support](mailto:support@avonni.app) for details.
{% endhint %}

To enable Guest Access:

1. Open your Experience Cloud site in Builder.
2. Go to Settings > General and click the link to the Guest User Profile.
3. In the Profile settings, scroll to Permission Set Assignments.
4. Add the Avonni Experience Cloud Components permission set to the profile.

<figure><img src="/files/FpEuQupVTg9lqrji09v8" alt=""><figcaption></figcaption></figure>

#### Troubleshooting Access Issues

If a user reports the error *"You don't have access to this Avonni Component,"* check the following:

| Issue                  | Solution                                                                                                                                                   |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Missing License**    | Ensure the user is listed in *Installed Packages > Manage Licenses*.                                                                                       |
| **Missing Permission** | Ensure the user has the *Avonni Experience Cloud Components* permission set assigned.                                                                      |
| **LWS Disabled**       | Ensure [*Lightning Web Security* is enabled](https://developer.salesforce.com/docs/platform/lightning-components-security/guide/lws-enable.html) in Setup. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avonnicomponents.com/experience-cloud/getting-started/license-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
