> For the complete documentation index, see [llms.txt](https://brixxbox.gitbook.io/brixxbox-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brixxbox.gitbook.io/brixxbox-documentation/client-api-reference/functions/businessbrixx/inventory-movement.md).

# Inventory Movement

Stores an inventory movement in a table with a certain structure. The Function handles database transactions and generates movement ids.

Mandatory fields: imItemId, imQuantity

### Example Usages

```javascript
   await brixxApi.businessBrixx({
        functionName:"InventoryMovement",
        movementTable:"inventoryMovement",
        movements:[
    {
                imQuantity: app.getFieldValue("quantityToShip") * -1,
                imAddressId: app.getFieldValue("companyId"),
                imItemId: app.getFieldValue("itemId"),
        imImei: app.getFieldValue("imei"),
        },
        {
                imQuantity: app.getFieldValue("quantityToShip"),
                imAddressId: app.getFieldValue("customerId"),
                imCustomerUserId: app.getFieldValue("customerUserId"),
                imItemId: app.getFieldValue("itemId"),
        imCustomerOrderLineId: app.getFieldValue("orderLineId"),
        imImei: app.getFieldValue("imei"),
        },
        ]
    });
```
