> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/vip-shop/guides/orders.md).

# The Order Book (optional)

The order book is an optional pipeline for products that need staff work instead of automatic delivery: custom gang brands, bespoke outfits, priority queue slots and similar server specific goods. No default catalog product uses it; add a product with a `type = 'order'` delivery when your server wants to sell that kind of work.

```lua
{
    id = 'custom-brand', category = 'packages',
    name = 'Custom Gang Brand',
    desc = 'Your own mark, forged by our staff.',
    price = 3999,
    image = '/img/cust_brand.webp',
    delivery = { { type = 'order', order = 'gang_brand' } },
},
```

## What happens on purchase

1. Coins are charged, with the membership discount, like any other product.
2. A row is written to `vipshop_orders` with `open` status, containing the buyer, the order key and the product name.
3. Your Discord webhook receives an embed with the order id, the player, the owner key, and the ready to paste close command.
4. The player is told the commission was placed and that staff will reach out.
5. The server fires `vipshop:orderPlaced` for optional automation:

```lua
AddEventHandler('vipshop:orderPlaced', function(src, data)
    -- data.id      -> order id
    -- data.order   -> the key from the delivery ('gang_brand', ...)
    -- data.product -> product id
end)
```

## Staff workflow

```
vipshop_orders            # list open commissions (id, player, key, product, date)
vipshop_orderdone <id>    # mark fulfilled (also logged to Discord)
```

Both work from the console or with the `vipshop.admin` ace.

## The extra character slot delivery

The `charslot` delivery type is also available for custom products:

* **VORP.** Fully automatic: `users.char`, the account's allowed character count (verified schema), is incremented by one and the player is notified instantly. No order is created.
* **RSG.** Character slots are config based rather than stored per player, so the purchase files a normal order for staff to handle.

Order keys are plain strings carried from `Config.Catalog` to your Discord and to the `vipshop:orderPlaced` event; name them however fits your workflow.
