# Shop-Script Connection

Integration allows the bot to receive categories and goods, create an order and search for an existing order.

## Connection

1. Open **Integrations** in ChatRex.
2. Press **Connect integration** and find **Shop-Script**.
3. Press **Connect**.
4. Enter the full store address, such as `https://shop.example.ru`.
5. On the Shop-Script page, confirm access.
6. After returning, check the connection status in ChatRex.

## Available scripts

- obtaining a list of categories;
- receipt of goods of the selected category;
- receipt of the catalog;
- order creation;
- Search for an order by number or track number.

Add only those operations that your bot needs. In the Prompt, set the order: first pick up the goods, then collect contacts and delivery data, show the result and request confirmation, then create an order.

## Verification

1. Get the test category and the product.
2. Compare the name, price and availability with the store.
3. Create a test order.
4. Find him by number.
5. Remove or cancel the test order from Shop-Script if it is no longer needed.

!!!warning
Do not tell the customer that an order has been created until an action has returned a number or other clear indication of a successful result.
!!!
