# Moguta.CMS

First [connect Moguta.CMS](../../integrations/cms/Moguta.md). In the bot editor, open **Integrations and actions**, add the required operations for this connection and save.

## Available actions

### Search products

Provide text, an exact SKU, a category or attributes. Combine filters to find the required configuration. The action returns published products and matching active variants with their exact identifiers.

### Get product

Provide the product ID. Add the variant ID when selecting a variant. The result includes the title, description, SKU, price, currency, attributes and variants.

### Check inventory

Provide the product ID and the selected variant ID, if applicable. The action returns availability and the known quantity for that item.

### Get product URL

Provide the product ID and the selected variant ID, if applicable. The result is the public URL for that storefront item.

## Action parameters

### Search and filters

Use at least one condition: text (`query`), an exact SKU (`sku`), a category (`category`) or attributes (`attributes`). When you combine conditions, a result must match **every condition**. Filters are applied before pagination.

- **Text** searches the title, description and SKU, ignoring case.
- **SKU** matches the exact master product or active variant code. For example, `CN1` is not replaced by products with codes such as `CN16` or `CN15`.
- **Category** accepts its ID, name or path from Moguta.CMS. Part of a name also works. A parent category includes products in its descendant categories.
- **Attributes** are name-value pairs. Use the names and values shown in the Moguta.CMS product card. For products with variants, all requested attributes must match **one active variant**. A size from one variant cannot be combined with a color from another.

Property names are matched without regard to case. Prefer the names returned by the catalog. The only built-in fallback keys are `size`, `color`, `brand` and `material`; they apply when the catalog exposes the corresponding supported property label. An actual native property name takes precedence. Other synonyms are not supported. Unknown or ambiguous names, or conflicting values for one property, produce no matching result.

Size, color and list options match one complete value, ignoring case: `L` does not match `XL`, and `red` does not match `dark red`. If an option itself contains a comma, pass the whole option. Do not join multiple choices into one string. Regular text and multiline text fields accept part of a value.

The limit (`limit`) is 1 to 20 results per page, and the page number (`page`) is 1 to 1000. When filtering product configurations, matching variants count as separate results. If no published product or active variant matches, the result is empty. Zero stock does not hide a variant from search: check inventory before promising availability.

If the action returns `search_too_broad`, narrow the search with an exact SKU, a category or a specific attribute. This error does not mean that the product is missing.

### Product and variant IDs

Take the product ID (`product_id`) and variant ID (`variant_id`) only from catalog results. The variant ID does not replace the master product ID: send both for a selected variant. Leave the variant parameter empty when the product has no variants.

## Variants and inventory

Ask the customer to choose a size, color or other option before answering about that variant. The master product's price and availability do not replace a check of the selected variant.

- Zero stock means unavailable.
- Finite stock returns an exact quantity.
- Unlimited stock has no numeric quantity; report availability without inventing a number.

Do not combine inventory across variants or promise a quantity that the catalog did not return. Inactive products and variants are excluded.

## Recommended sequence

1. Search by product title or exact SKU.
2. Retrieve the product and offer its available variants.
3. Confirm the desired variant and check its inventory.
4. Retrieve its link and return the confirmed price, currency and availability.

Fill in parameters manually in the action preview. Then ask about the same product through the connected storefront chat and compare the answer with Moguta.CMS. Use a separate test bot and a model that supports actions.

All four actions are read-only. They do not create orders, reserve stock or charge payments.
