> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Displaying Action Quotas

## Article: Displaying Action Quotas

## Article Link: https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/displaying-action-quotas.md

## Article Content:

# Displaying Action Quotas

As an action provider, you can enforce limits on the number of times a Wix user uses an action. For example, you can limit the number of messages a user can send per billing cycle.

You can enforce different quotas on specific features of the app, depending on the user. For example, your app might have a basic plan that allows a Wix user to send 500 emails a month, and a premium plan that lets a Wix user send unlimited emails.

## Terminology

+ **Quota**: A limit on the number of times a Wix user can perform an action.
+ **Plan**: Allows you to set different quotas for different users.

## Creating and enforcing quotas

You are responsible for enforcing quotas for features used by your actions. If the features provided by your service have quotas you can implement the [Get Quota Info](https://dev.wix.com/docs/rest/business-management/automations/actions/action-provider-service-plugin/get-quota-info.md) method so that Wix can display your quotas in the user's site dashboard.

Wix displays the quotas in the **Manage your automations quotas** modal. This modal opens when Wix users click the **Manage Your Quotas** button on the Automations page in the dashboard.

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_53168671fd7643838869ae7ce7f7e0c7~mv2.png">

</div>

The modal lists the quotas for all the features used by the site's automations. The list is organized by the apps providing the features.

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_f9a86f995b574d7ebde79c0dd87223fd~mv2.png">

</div>

You can define the different elements of each quota display in the responses from your Get Quota Info method. In general, each quota display includes a plan, and the plan features associated with it. The current usage and limit for each feature is displayed.

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_88f20c504b084db281f0396dc0e531dc~mv2.png">

</div>

### One plan with one feature

To display one plan with a single feature quota, include the plan and quota data in the same `quotaInfo` object in your method’s response.

Sample response body:

```json
{
  "enforced": true,
  "quotaInfo":[
    {
      "plans": [
        {
          "id": "fdc7fe4b-523f-4d8c-b6e1-5faf3850d01e",
          "name": "Reminder emails"
        }
      ],
      "quotas":
      [
        {
          "featureName": "Reminders sent",
          "currentUsage": "10",
          "limit": "40"
        },
        {
          "featureName": "Tasks created",
          "renewalDate": "2022-01-12T01:20:00.000Z",
          "currentUsage": "346",
          "limit": "500"
        }
      ],
      "upgradeCta": {
        "url": "https://www.example.com/upgrade",
        "label": "Upgrade For More"
      }
    }
  ]
}
```

The resulting quota display looks like this:

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_061daab1904649b1a6e5e00c15fea820~mv2.png">

</div>

### One plan with two features

To display one plan with a single feature quota, include the plan and quota data in the same `quotaInfo` object in your method’s response.

Sample response body:

```json
{
 "enforced": true,
 "quotaInfo":[
  {
   "plans": [
    {
     "id": "f32c650f-ecc4-4818-a81c-8fa681e325a6",
     "name": "Email Marketing"
    }
   ],
   "quotas":[
    {
     "featureName":"Emails sent",
     "currentUsage":"346",
     "limit":"500",
     "renewalDate":"2023-01-12T01:20:00.000Z"
    }
   ],
   "upgradeCta": {
          "url": "https://www.example.com/upgrade",
    "label": "Upgrade Email Plan"
   }
  }
 ]
}
```

The resulting quota display should look something like this:

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_e7edaf5ae284499499be84ab7c759195~mv2.png">

</div>

### Two plans with different features

To display two different plans with different features that are both being used by your action service, include two `quotaInfo` objects in your response body.

Sample response body:

```json
{
  "enforced": true,
  "quotaInfo": [
    {
      "plans": [
        {
          "id": "94e55e1f-b845-47a5-afad-4b8fc977d545",
          "name": "Forms on your site"
        }
      ],
      "quotas": [
        {
            "featureName": "Forms on your site",
            "currentUsage": "6",
            "limit": "40"
        }
      ],
      "upgradeCta": {
          "url": "https://www.example.com/upgrade",
          "label": "Upgrade For More",
          "planId": "fd9830b5-ce89-495f-87e8-30893168afd9"
      }
    },
    {
      "plans": [
        {
          "id": "c7f255a5-0aa2-47ad-9607-8f87ea56df5b",
          "name": "Code Forms on your site"
        }
      ],
      "quotas": [
        {
          "featureName": "Code Forms on your site",
          "currentUsage": "1",
          "limit": "20"
        }
      ],
      "upgradeCta": {
          "url": "https://www.example.com/upgrade",
          "label": "Upgrade For More",
          "planId": "b19345c1-380c-4fc6-8e45-9f7f72b3de5f"
      }
    }
  ]
}
```

The resulting quota display looks like this:

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_81ba2a5368be4744846ad25a1b054ea0~mv2.png">

</div>

### Unlimited plans

If your service supports a plan where features are unlimited, you can still display the Wix user’s current usage. To do this, provide a `quotaInfo` object with the relevant plan details. Include the feature’s name and current usage, but not a usage limit.

Sample response body:

```json
{
 "enforced": true,
 "quotaInfo": [
    {
      "plans": [
        {
          "id": "1ccaa3a5-4994-4e17-b1d4-2fa3f76418e7",
          "name": "Marketing Emails"
        }
      ],
      "quotas": [
        {
          "featureName": "Emails",
          "currentUsage": "150"
        }
      ]
    }
  ]
}
```

The resulting quota display should look like this:

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_06b13a0b92b843838e073fa5e19e3225~mv2.png">

</div>

### User hasn't purchased a plan

If your service enforces a quota on a feature that a Wix user hasn’t paid for, you can display this in the dashboard. This lets the user know that your action isn’t running when their automation is triggered. To display this, set both the current usage and limit for the feature to `0` in the relevant `quotaInfo` object in your response body.

Sample response body:

```json
{
  "enforced": true,
  "quotaInfo": [
    {
    "plans": [
        {
          "id": "d0a9fa93-f2a7-426a-89d6-a15d2e7c0d78",
          "name": "Marketing Emails"
        }
      ],
    "quotas":[
        {
          "featureName": "Monthly Emails",
          "renewalDate": "",
          "currentUsage": "0",
          "limit": "0"
        }
      ],
      "upgradeCta": {
          "url": "https://www.example.com/upgrade",
          "label": "Upgrade",
          "planId": "28d52c9c-7c59-4a14-bbc1-a7d9103e1038"
      }
    }
  ]
}
```

## Quota descriptions

You can define a tooltip that provides more details about a feature quota. To display the tooltip, add an `additionalInfo` object together with the feature details.

Sample response body:

```json
{
  "enforced": true,
  "quotaInfo": [
    {
      "plans": [
        {
          "id": "fa9bbb78-286f-46b4-83fe-4aa81d94c715",
          "name": "Marketing Messages"
        }
      ],
      "quotas": [
        {
          "featureName": "SMS sent",
          "renewalDate": "",
          "currentUsage": "400",
          "limit": "1200",
          "additionalInfo": {
            "description": "Your SMS quota will renew each month. Any remaining messages won't roll over to the next month.",
            "cta": {
                "url": "/home",
                "label": "Go to SMS Settings"
            }
          }
        }
      ],
      "upgradeCta": {
          "planId": "e15d2206-4226-4815-8684-41b101c7dcad",
          "url": "https://www.example.com/upgrade",
          "label": "Upgrade"
      }
    }
  ]
}
```

You should now see a message when you hover over the tooltip icon:

<div style="text-align:center">

<img src="https://static.wixstatic.com/media/d4dde1_f4c0415b48064f2fbdb8e4172f22f2d0~mv2.png">

</div>