> For the complete documentation index, see [llms.txt](https://sbscripts.gitbook.io/sb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sbscripts.gitbook.io/sb-scripts/sb-containers/installation/inventory-item-convert.md).

# Inventory Item Convert

## 🔄 Inventory Conversion

SB Containers includes built in conversion commands for servers changing between QBCore stash storage and `ox_inventory`.

Conversion is necessary because the two inventory systems store stash information differently.

### Before You Convert

Make sure:

1. The server is empty.
2. You have a recent database backup.
3. The correct inventory resource is installed.
4. You know which direction you are converting.

> 🚨 Do not run conversion commands while players are actively using containers.

### QBCore → ox\_inventory

If you are moving from the default QBCore stash system to `ox_inventory`, use:

```
convertcontainerox
```

This converts the existing container stash information into the format required by `ox_inventory`.

### ox\_inventory → QBCore

If you are moving from `ox_inventory` back to the default QBCore stash system, use:

```
convertcontainerqb
```

This converts the existing container information back into the QBCore `stashitems` format.

### After Conversion

Wait until the server console reports that the conversion completed successfully.

Then restart the server.

After restarting, test an existing container before allowing players back onto the server.

### Recommended Procedure

```
Empty Server
     ↓
Backup Database
     ↓
Run Conversion
     ↓
Wait for Success Message
     ↓
Restart Server
     ↓
Test Containers
     ↓
Allow Players Back Online
```

> ⚠️ Do not run both conversion commands. Only use the command that matches the inventory system you are switching to.
