> ## Documentation Index
> Fetch the complete documentation index at: https://help.mathership.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sides

> Connect SIDES POS with Mathership to transfer sales data into inventory movements

# SIDES POS

Use the SIDES POS integration to connect your SIDES restaurant management system with Mathership.

The integration syncs SIDES stores and products, lets you map products to ingredients or recipes, and creates inventory ledger entries from SIDES sales data.

<CardGroup cols={3}>
  <Card title="Connect SIDES" icon="cash-register">
    Connect SIDES using username and password credentials and test the connection at any time.
  </Card>

  <Card title="Map products" icon="arrows-turn-to-dots">
    Map SIDES products to Mathership ingredients or recipes.
  </Card>

  <Card title="Update inventory" icon="list-check">
    Transfer SIDES sales into inventory issue movements in the ledger.
  </Card>
</CardGroup>

## What the integration can do

The integration can:

* Connect SIDES using username and password credentials
* Test the SIDES connection at any time
* Update credentials without losing setup data
* Sync SIDES stores
* Sync SIDES products
* Link SIDES stores to Mathership storage units
* Map SIDES products to ingredients or recipes
* Run a 90-day historical migration
* Run automatic daily transfers
* Run manual one-day transfers
* Create inventory ledger entries from SIDES sales
* Keep transfer logs for review and troubleshooting

## What the integration does

When a SIDES transfer runs, Mathership:

1. Fetches SIDES sales data for one store and one date
2. Stores the raw SIDES orders and bill positions
3. Reads the sold product names and quantities
4. Finds matching POS mappings in Mathership
5. Deducts mapped ingredients directly
6. Expands mapped recipes into recipe ingredients
7. Calculates inventory quantities
8. Creates inventory ledger entries
9. Stores a transfer log with statistics, errors, skipped lines, and unmapped items

## What the integration does not do

The SIDES integration does not:

* Create ingredients automatically
* Create recipes automatically
* Guess product mappings automatically
* Deduct inventory for unmapped products
* Optimize stock levels
* Change SIDES sales data
* Push inventory back to SIDES
* Create purchase orders
* Calculate delivery routes

<Warning>
  SIDES sales only affect inventory after the related SIDES products have been mapped to ingredients or recipes.
</Warning>

## Recommended setup order

Use this order for a clean SIDES setup:

<Steps>
  <Step title="Create storage units">
    Set up the Mathership storage units that should receive inventory deductions.
  </Step>

  <Step title="Create ingredients">
    Make sure the ingredients used for product and recipe deductions exist.
  </Step>

  <Step title="Create recipes">
    Create recipes for SIDES products that should deduct multiple ingredients.
  </Step>

  <Step title="Connect SIDES">
    Enter the SIDES credentials and test the connection.
  </Step>

  <Step title="Sync stores">
    Import SIDES stores into Mathership.
  </Step>

  <Step title="Link stores to storage units">
    Assign each SIDES store to the correct Mathership storage unit.
  </Step>

  <Step title="Sync products">
    Import SIDES products.
  </Step>

  <Step title="Map important products first">
    Start with high-volume products and products that strongly affect inventory.
  </Step>

  <Step title="Activate the store">
    Activate the store once storage units and mappings are ready.
  </Step>

  <Step title="Check migration status">
    Review the 90-day migration after activation.
  </Step>

  <Step title="Run a manual transfer">
    Test one date manually before relying on automatic transfer.
  </Step>

  <Step title="Check the ledger">
    Review created ledger entries and correct mappings if needed.
  </Step>
</Steps>

<Note>
  The most important setup rule is: stores need storage units, and SIDES products need mappings. Without both, sales cannot reliably create inventory movements.
</Note>

## Before you start

Before connecting SIDES, prepare these Mathership inventory objects.

| Required setup | Why it is needed                                                |
| -------------- | --------------------------------------------------------------- |
| Storage units  | Inventory deductions need a target storage unit                 |
| Ingredients    | Products or recipe lines deduct ingredients                     |
| Recipes        | Recipe-mapped products are exploded into ingredients            |
| POS mappings   | SIDES product names need to be linked to ingredients or recipes |

## Storage units

Each SIDES store must be linked to one Mathership storage unit.

The storage unit defines where inventory should be deducted.

| SIDES store     | Mathership storage unit |
| --------------- | ----------------------- |
| Restaurant Main | Main Kitchen            |
| Bar             | Bar Storage             |
| Terrace         | Terrace Storage         |

## Ingredients and recipes

Ingredients are the inventory objects that are deducted.

Use recipes when one sold SIDES product consists of several ingredients.

When the SIDES product is sold, Mathership deducts the ingredients inside the recipe.

## Connect SIDES

Use the connection form to connect Mathership with SIDES.

### Connection form fields

| Field            | Required                 | Description                            |
| ---------------- | ------------------------ | -------------------------------------- |
| Integration name | Yes                      | An internal label for this integration |
| Username         | Yes                      | Your SIDES API username                |
| Password         | Yes, for new connections | Your SIDES API password                |

## Test the connection

After connecting, test that Mathership can reach the SIDES API:

<Steps>
  <Step title="Open the integration">
    Open the integration from the **Connected** section.
  </Step>

  <Step title="Click Test connection">
    Mathership calls the SIDES API.
  </Step>

  <Step title="Review the result">
    Mathership returns a success or failure message.
  </Step>
</Steps>

Use **Test connection** whenever you suspect credentials have changed or the connection has broken.

## Edit credentials

You can update credentials at any time without losing stores, products, mappings, or transfer history.

<Steps>
  <Step title="Open the integration">
    Open the existing SIDES integration.
  </Step>

  <Step title="Expand Edit credentials">
    Open the credential editing area.
  </Step>

  <Step title="Update the fields">
    Update the integration name, username, or password.
  </Step>

  <Step title="Save changes">
    Click **Save changes**.
  </Step>
</Steps>

Leave the username or password field blank to keep the current value.

## Manage stores and products

From the integration panel, use the two navigation buttons:

* **Manage stores** — opens the store list for this integration
* **Manage products** — opens the product list for this integration

## Sync stores

Sync stores to import the SIDES stores available to your account.

### Store list columns

| Column        | Description                                                       |
| ------------- | ----------------------------------------------------------------- |
| Store ID      | SIDES store ID                                                    |
| Name          | Store name with external name below if different                  |
| Storage unit  | Linked Mathership storage unit, or **Unmapped**                   |
| Abbreviation  | Store abbreviation from SIDES                                     |
| Activated     | Whether the store is activated for daily issues                   |
| Auto transfer | Whether automatic daily processing is active or paused            |
| Status        | SIDES store status, where `1` means active and `2` means inactive |

### Store list filters

Filter the list using the toolbar chips:

| Filter             | Description                                  |
| ------------------ | -------------------------------------------- |
| Activated          | Filter by activated or not activated         |
| Auto transfer      | Filter by paused or active                   |
| Status             | Filter by SIDES status code                  |
| Storage unit       | Filter by storage unit or show only unmapped |
| Coming soon        | Filter stores marked as coming soon          |
| Temporarily closed | Filter stores that are temporarily closed    |
| Closed online      | Filter stores closed for online orders only  |

## Link a storage unit

Each SIDES store must be linked to a Mathership storage unit before it can be activated or process issues.

The same sold product can deduct inventory from different storage units depending on the store.

| SIDES store     | Storage unit    | Result                             |
| --------------- | --------------- | ---------------------------------- |
| Restaurant Main | Main Kitchen    | Food deducted from kitchen stock   |
| Bar             | Bar Storage     | Drinks deducted from bar stock     |
| Terrace         | Terrace Storage | Terrace sales deduct terrace stock |

<Note>
  Without a linked storage unit, a SIDES store cannot reliably create inventory movements.
</Note>

## Sync products

Sync products to import SIDES products into Mathership.

### Product list columns

| Column    | Description                                                                      |
| --------- | -------------------------------------------------------------------------------- |
| Name      | Product name with kitchen name below if different                                |
| Type      | SIDES product type, such as menu, sales article, topping, or product             |
| Price     | Default price from SIDES                                                         |
| Mapped    | Whether the product has a Mathership mapping                                     |
| Mapped to | The ingredient or recipe the product maps to, with quantity and subtraction flag |
| Updated   | When the product was last updated                                                |

### Product list filters

| Filter        | Description                                                                 |
| ------------- | --------------------------------------------------------------------------- |
| Mapped        | Filter by mapped or not mapped                                              |
| Type          | Filter by product type, including menu, sales article, topping, and product |
| Menu          | Filter products that are part of a menu                                     |
| Sales article | Filter products that are sales articles                                     |

### SIDES product types

| Type            | Description                            |
| --------------- | -------------------------------------- |
| `menu`          | A menu item — usually maps to a recipe |
| `sales_article` | A standalone sales item                |
| `topping`       | A topping or add-on                    |
| `product`       | A general product                      |

## Map SIDES products

Click any product row to open the mapping sheet.

Each SIDES product must be mapped before it can create inventory movements.

You can map a product to:

* **An ingredient** — the ingredient is deducted directly per sale
* **A recipe** — the recipe is expanded into its ingredients and all lines are deducted

### Why mapping is required

Without a mapping, Mathership can store the sale but cannot create the correct inventory deduction.

| SIDES sale     | Required Mathership meaning                 |
| -------------- | ------------------------------------------- |
| Espresso       | Deduct coffee beans                         |
| Cola 0.33 l    | Deduct one Cola bottle                      |
| Classic Burger | Deduct all ingredients in the burger recipe |

When a recipe is sold, Mathership expands all recipe lines including nested child recipes and deducts each ingredient.

### Mapping fields

| Field                | Meaning                                             |
| -------------------- | --------------------------------------------------- |
| `mapped_object_type` | `ingredient` or `recipe`                            |
| `mapped_object_id`   | ID of the ingredient or recipe                      |
| `quantity`           | Multiplier used for the mapped object               |
| `is_subtraction`     | Whether the mapping uses reversal/subtraction logic |

### Mapping examples

<Tabs>
  <Tab title="Ingredient mapping">
    | SIDES product | Quantity sold | Mapping quantity | Inventory deduction  |
    | ------------- | ------------: | ---------------: | -------------------- |
    | Cola 0.33 l   |            12 |                1 | 12 bottles           |
    | Espresso      |            20 |            0.009 | 0.18 kg coffee beans |
  </Tab>

  <Tab title="Recipe mapping">
    | SIDES product    | Quantity sold | Mapping       | Inventory deduction       |
    | ---------------- | ------------: | ------------- | ------------------------- |
    | Classic Burger   |             5 | Burger recipe | Ingredients for 5 burgers |
    | Pizza Margherita |             3 | Pizza recipe  | Ingredients for 3 pizzas  |
  </Tab>
</Tabs>

## Activate a store

A SIDES store must be activated before migration and regular transfer processing can run.

Before activation, make sure:

* The store has a storage unit
* Important SIDES products are mapped
* Recipes and ingredients are set up correctly
* You understand which storage unit will receive the deductions

## Store detail page

Opening a store shows a live overview of its status, health, activity, and configuration.

### Store metadata

The detail page header shows the store name, activated badge, auto issue badge, and any of the following status badges when applicable:

| Badge              | Meaning                                 |
| ------------------ | --------------------------------------- |
| Coming soon        | Store is marked as coming soon in SIDES |
| Temporarily closed | Store is temporarily closed             |
| Closed online      | Store is closed for online orders only  |

### Health indicators

If any of the following are detected, a warning banner appears at the top of the page:

* No storage unit linked
* Store is marked as coming soon
* Store is temporarily closed
* A migration is currently in progress

### Stats

| Stat              | Description                                                                       |
| ----------------- | --------------------------------------------------------------------------------- |
| Issues (lifetime) | Total issues ever processed with failure count                                    |
| Issues (7d / 30d) | Issues processed in the last 7 and 30 days                                        |
| Catalog mapped    | How many SIDES products are mapped out of total — click to open the products page |
| Sales (7d / 30d)  | SIDES orders seen in the last 7 and 30 days                                       |

### Configuration

| Setting        | Description                                                                  |
| -------------- | ---------------------------------------------------------------------------- |
| Storage unit   | The storage unit where inventory is deducted — click **Save** after changing |
| Activate store | One-way toggle to activate the store for daily issues                        |
| Auto issue     | Toggle to pause or resume automatic daily processing                         |
| Manual issue   | Date picker to trigger a one-off issue for a specific past date              |

## 90-day migration

When a store is activated, Mathership creates a 90-day historical migration that processes past SIDES sales and creates inventory movements where mappings exist.

### Migration date range

The default migration range is the last 90 completed days, ending yesterday.

| Example     | Date       |
| ----------- | ---------- |
| If today is | 2026-05-08 |
| Start date  | 2026-02-07 |
| End date    | 2026-05-07 |
| Total days  | 90         |

### Migration statuses

### Migration progress fields

| Field              | Meaning                                    |
| ------------------ | ------------------------------------------ |
| `total_days`       | Number of days in the migration            |
| `days_processed`   | Days successfully processed                |
| `days_failed`      | Days that failed                           |
| `days_skipped`     | Days skipped because prior success existed |
| `current_date`     | Date currently being processed             |
| `start_date`       | First date in the migration                |
| `end_date`         | Last date in the migration                 |
| `progress_percent` | Migration progress percentage              |
| `started_at`       | Start timestamp                            |
| `completed_at`     | Completion timestamp                       |
| `error_message`    | Error message for failed or cancelled jobs |

### Migration actions

| Action           | When to use                                                             |
| ---------------- | ----------------------------------------------------------------------- |
| Start migration  | When no migration exists for the store                                  |
| Re-run migration | After adding or correcting mappings — reprocesses the full 90-day range |
| Cancel migration | When you need to stop a pending or running migration                    |

## Automatic transfer

Toggle **Auto issue** in the Configuration section to pause or resume automatic daily processing.

| State  | Meaning                                            |
| ------ | -------------------------------------------------- |
| Active | Daily SIDES sales are processed automatically      |
| Paused | No automatic processing — manual issues still work |

Pause automatic transfer when:

* Mappings are incomplete or being corrected
* A storage unit link is wrong
* You are investigating unexpected inventory movements
* You want to prevent automatic deductions temporarily

<Warning>
  Pausing automatic transfer does not delete the integration, stores, mappings, or transfer history.
</Warning>

## Manual transfer

Use manual transfer when you want to process one specific day.

Manual transfer is useful for:

* Testing the integration before enabling automatic transfer
* Reprocessing a day after mapping changes
* Fixing inventory after a failed transfer
* Checking a specific SIDES sales date

## What happens during transfer

When a SIDES transfer runs, Mathership:

1. Checks that the store has a storage unit
2. Creates a transfer log
3. Fetches SIDES sales data for the selected date
4. Stores SIDES orders and bill positions
5. Reads sold product names and quantities
6. Skips lines already posted to the current storage unit
7. Matches sold product names to POS mappings
8. Deducts mapped ingredients directly
9. Expands mapped recipes into ingredients
10. Calculates weighted average cost
11. Creates inventory ledger entries
12. Links ledger entries to SIDES bill positions
13. Updates the integration last run time
14. Saves transfer statistics and errors

### Sales line processing

Only positive bill positions with a product name are processed.

A bill position is skipped when:

* Quantity is missing, zero, or negative
* Product name is missing
* The line was already posted
* The product is unmapped
* The mapped ingredient or recipe cannot be resolved

### POS mapping match

The transfer matches SIDES bill positions to POS mappings by product name.

The SIDES product name must exactly match the mapped POS product name.

<Warning>
  If product names in SIDES change, mappings may need to be reviewed or recreated.
</Warning>

## Transfer result

The last successful issue section on the store detail page shows:

| Field          | Meaning                            |
| -------------- | ---------------------------------- |
| Report date    | The date that was processed        |
| Completed      | When the issue completed           |
| Orders         | Number of SIDES orders processed   |
| Bill positions | Number of bill positions processed |

### Transfer statistics

Detailed transfer statistics stored in the log can include:

| Field                     | Meaning                                    |
| ------------------------- | ------------------------------------------ |
| `orders_processed`        | Number of SIDES orders processed           |
| `billpositions_processed` | Number of bill positions processed         |
| `ledger_entries_created`  | Number of inventory ledger entries created |
| `unmapped_names`          | Product names without mappings             |
| `exceptions`              | Mapping or recipe processing issues        |

## Unmapped products

If a sold SIDES product has no mapping, Mathership records the product name as unmapped and does not create any inventory deduction.

## Processing logic

### Ingredient mapping

If the mapping points to an ingredient, Mathership deducts that ingredient directly.

| SIDES product | Quantity sold | Mapping quantity | Inventory deduction  |
| ------------- | ------------: | ---------------: | -------------------- |
| Cola 0.33 l   |            12 |                1 | 12 bottles           |
| Espresso      |            20 |            0.009 | 0.18 kg coffee beans |

### Recipe mapping

If the mapping points to a recipe, Mathership explodes the recipe and deducts all recipe ingredients.

Recipes can contain child recipes. If a mapped recipe contains a child recipe, Mathership expands it as part of the transfer.

Recipe lines can include a trim percentage. If trim percentage is invalid, the transfer records an `invalid_trim_pct` exception.

If recipes reference each other in a cycle, Mathership stops the expansion and records a `recipe_cycle` exception.

## Weighted average cost

Mathership calculates unit cost from receipt ledger entries using:

**total receipt value / total receipt quantity**

If no receipt quantity is available, the unit cost is `0`.

## Inventory ledger entries

Each inventory ledger entry is linked to:

* Company and ingredient
* Storage unit
* Quantity deducted
* Unit cost and total value
* Date
* SIDES store
* Transfer log
* SIDES bill position

See [Ledger](/en/restaurants/inventory/ledger) for detailed inventory history.

## Transfer logs

Each issue attempt creates a transfer log.

Open logs from the **See all logs** button on the store detail page.

| Field          | Meaning                            |
| -------------- | ---------------------------------- |
| Report date    | The date that was processed        |
| Attempt        | Retry attempt number               |
| Status         | Processing, success, or failed     |
| Orders         | Number of SIDES orders processed   |
| Bill positions | Number of bill positions processed |
| Error          | Failure reason if the issue failed |

The store detail page also shows the last 10 failed transfers directly, including report date, attempt number, start time, and error message.

## Testing checklist

Before relying on automatic transfers, test one day manually and check that:

* The correct SIDES store was used
* The store has the correct storage unit
* The correct date was processed
* Sold products were found
* Important products are mapped
* Recipe ingredients were deducted correctly
* Quantities are correct
* Ledger entries appear in the correct storage unit
* Unmapped product names are expected
* Transfer log status is successful
* No unexpected exceptions appear

## Best practices

<CardGroup cols={2}>
  <Card title="Set up inventory first" icon="warehouse">
    Set up storage units, ingredients, and recipes before connecting SIDES.
  </Card>

  <Card title="Test credentials" icon="key">
    Test the connection after setting up or changing credentials.
  </Card>

  <Card title="Map high-volume products first" icon="ranking-star">
    Start with products sold most often to get the biggest inventory benefit quickly.
  </Card>

  <Card title="Test manually first" icon="clipboard-check">
    Always test one day manually before enabling automatic transfer.
  </Card>

  <Card title="Review unmapped products" icon="magnifying-glass">
    Use unmapped product names from the transfer log as a working list for missing mappings.
  </Card>

  <Card title="Keep product names stable" icon="tag">
    Mapping depends on exact SIDES product names.
  </Card>

  <Card title="Check store status" icon="store">
    Stores marked as coming soon or temporarily closed may have no sales data.
  </Card>

  <Card title="Check ledger results" icon="list-check">
    After transfers, check the inventory ledger to confirm quantities, storage units, and ingredients.
  </Card>
</CardGroup>

## Common problems

<AccordionGroup>
  <Accordion title="Connection test fails">
    Check that your username and password are correct.

    Update the credentials using **Edit credentials** and test again.
  </Accordion>

  <Accordion title="Stores are missing after sync">
    Re-sync stores.

    If stores are still missing, check that your SIDES account has access to those stores.
  </Accordion>

  <Accordion title="Products are missing after sync">
    Re-sync products.

    The product list may be served from cache — run **Sync products** to force a fresh fetch from SIDES.
  </Accordion>

  <Accordion title="Store cannot be activated">
    Check that a storage unit is linked and saved, and that at least one product is mapped.
  </Accordion>

  <Accordion title="Migration does not start">
    Check that the store is activated, has a linked storage unit, and that no other migration is already pending or running.
  </Accordion>

  <Accordion title="Transfer creates no inventory entries">
    Check that products are mapped, product names in SIDES match the names used in mappings, the store has a storage unit, and SIDES had sales for the selected date.
  </Accordion>

  <Accordion title="Some products are skipped">
    Open the transfer log and review unmapped product names.

    Create or correct mappings then re-run the manual issue.
  </Accordion>

  <Accordion title="Wrong storage unit was used">
    1. Pause auto issue
    2. Correct the storage unit link and save
    3. Review existing ledger entries for the affected dates
    4. Run a manual issue after correcting
  </Accordion>

  <Accordion title="Manual transfer says no data">
    Check the date, the SIDES store, and whether the selected day had sales activity.

    Stores marked as coming soon or temporarily closed may have no data for certain dates.
  </Accordion>

  <Accordion title="Product is mapped but still not deducted">
    Check that the SIDES bill position name exactly matches the mapped product name, the mapped ingredient or recipe still exists, the recipe contains ingredient lines, and the sold quantity is greater than zero.
  </Accordion>
</AccordionGroup>

## Related pages

<CardGroup cols={2}>
  <Card title="POS Mapping" icon="arrows-turn-to-dots" href="/en/restaurants/integrations/pos-mapping">
    Map POS products to ingredients or recipes.
  </Card>

  <Card title="Storage Units" icon="warehouse" href="/en/restaurants/inventory/storage-units">
    Manage the storage locations used for inventory deductions.
  </Card>

  <Card title="Inventory Ledger" icon="list-check" href="/en/restaurants/inventory/inventory-ledger">
    Review inventory movements created by Sides transfers.
  </Card>

  <Card title="Integrations Overview" icon="plug" href="/en/restaurants/integrations/overview">
    Return to the integrations overview.
  </Card>
</CardGroup>
