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

# How to register stock items from photos

> Upload photos of a unit and let TWICE suggest its name, category, and attributes — what the suggestion is based on, what it fills in, and what to check before you register.

<Card title="Open in TWICE Admin" icon="external-link" href="https://admin.twicecommerce.com/inventory/stock-items" horizontal>
  inventory/stock-items
</Card>

**Upload Images** is one of the three ways to register stock. Instead of typing the unit's details, you pick photos of it and TWICE reads them: it recognises what is in the first image, matches it to a category in the taxonomy, and fills the name and attributes from that.

It saves the most time on stock you cannot describe from memory — second-hand intake, a mixed pallet, anything where the category matters and nobody wants to look it up. It is a suggestion, not an import: everything it fills in is editable before you register, and this guide is mostly about what to check.

For the manual path and how stock items bind to a SKU, see [Register stock items](/docs/guides/inventory/register-stock-items).

## Prerequisites

<Warning>
  **Required permissions:**

  * `inventory:stock_item:create` — registering, and creating the draft the suggestion is built on
  * `inventory:stock_item:view` — fetching the suggestion itself
  * `inventory:stock_item:manage` — writing your edits onto that draft when you submit
  * `inventory:stock_item:delete` — **Cancel**, which deletes the draft again

  All four system roles hold all four. A custom role that grants create without delete can start this flow but cannot clean up after cancelling it — see the pitfalls below.
</Warning>

<Info>
  **Before you start, have ready:**

  * **The photos, already uploaded.** The picker browses the file manager's `article` folder; it does not upload from your desktop. Put the images there first.
  * **One clear photo of the unit per item.** Only the first image is analysed — see below.
  * **A decision on tracking.** Whether these units are tracked individually or as a pooled quantity is set in the same dialog and is easier to get right now than later.
</Info>

## The Walkthrough

<Steps>
  <Step title="Open the register menu">
    Go to **Inventory > Stock items** and select **Register Items** in the top right. A command palette opens with three ways in:

    | Action            | Shortcut | What it does                   |
    | ----------------- | -------- | ------------------------------ |
    | **Manual Entry**  | `n`      | Type the details yourself      |
    | **Upload Images** | `u`      | This flow                      |
    | **Import CSV**    | `i`      | Bulk import from a spreadsheet |

    The **Register Items** button itself is on `a`.
  </Step>

  <Step title="Pick the photos">
    **Upload Images** opens the file manager, browsing the `article` folder and filtered to images. Select the photos for this unit and confirm.

    <Note>The picker only offers files that are already in the file manager. If the photos are still on your machine, upload them there first — the flow has no upload step of its own.</Note>
  </Step>

  <Step title="Wait for the recognition">
    The **Register new stock item** dialog opens with a progress bar across the top and every field disabled while it runs.

    Behind that bar, TWICE saves a throwaway draft stock item to hang the images on, then works through the photo: it describes what it sees, finds the closest category in the taxonomy, and from that description suggests a name and a set of attributes for that category.

    The draft is invisible in the Stock items table and is turned into your real item when you submit.
  </Step>

  <Step title="Check what it filled in">
    When the bar clears, the fields are editable and some are already populated. Three things came from the photo:

    * **Name** — always overwritten with the suggestion when there is one.
    * **Category** — set only if you had not already chosen one.
    * **Attributes** — added only if the item had none, and this is the one you cannot see. The dialog has no attributes field, so suggested attributes are carried silently and created when you register. Check them on the item's **Attributes** tab straight afterwards.

    Everything is editable. Correcting the name here is normal.
  </Step>

  <Step title="Fill in the rest">
    The suggestion does not touch these, and two of them decide the shape of what you get:

    * **Item Codes** — **Auto-generate**, or **Manual** to type your own. Manual replaces the **Quantity** field with a code list, and the number of codes becomes the number of units.
    * **Track individually** — on, each unit is its own record with its own history. Off, they are one pooled quantity.
    * **Quantity** — how many units to create. Only shown when codes are auto-generated.
    * **SKU** — search by name or by code to bind these items to an existing SKU.
    * **Entry Location**, **Entry date**, **Entry status** — where and when the stock enters, and whether it is **Active** or **Inactive** on arrival.
  </Step>

  <Step title="Register">
    Select **Register Stock Items**.

    Where you land depends on the quantity. One unit opens that item's page. More than one creates the rest — all sharing the same photos — and opens them together in a bulk edit session, so you can set anything that differs per unit in one pass.
  </Step>
</Steps>

## How do I know it worked?

* **The item opens on its own page** (or the batch opens in bulk edit), with the name that was in the dialog when you submitted.
* **The photos are on the item**, on every unit in the batch, not just the first.
* **The attributes the photo produced are on the Attributes tab.** This is the check worth making every time, because it is the one thing the dialog never showed you.
* **The category is set** on the item's General tab.

## Troubleshooting / Common Pitfalls

<AccordionGroup>
  <Accordion title="The dialog opened but nothing was filled in">
    **Cause:** the suggestion came back empty. That happens quietly, with no error, in three cases: the images did not reach the draft, the photo could not be described, or the description matched no category in the taxonomy closely enough.

    **What to do:** fill the dialog in by hand — it is a normal registration form at that point. If it keeps happening on photos that clearly show the item, the picture is probably the problem rather than the item: a single unit against a plain background, filling the frame, recognises far better than a shelf or a pallet.
  </Accordion>

  <Accordion title="&#x22;Recognition failed&#x22;">
    **Cause:** the suggestion call itself errored, rather than returning nothing.

    **What to do:** the message sits above the form and the form still works, so you can carry on and type the details in. The draft has already been created, so do not close the dialog and start again unless you mean to — use **Cancel**, which cleans it up.
  </Accordion>

  <Accordion title="I uploaded five photos and it only recognised one thing">
    **Working as designed.** Only the **first** image is analysed. The rest are attached to the item but contribute nothing to the name, category, or attributes.

    **What to do:** put the clearest, most representative shot first. If the photos show genuinely different items, register them separately — one flow produces one item or one batch of identical units, not one item per photo.
  </Accordion>

  <Accordion title="Attributes I did not expect appeared on the item">
    **Cause:** the suggestion adds attributes for the category it matched, and the dialog gives you no way to see or remove them before registering. They are created as new text attributes on the inventory resource.

    **What to do:** open the item's **Attributes** tab after registering and remove what does not belong. Worth knowing that they are created as real attributes on your account, so a wrong match adds to your attribute list, not just to the item — see [Attributes](/docs/concepts/admin/attributes).

    If the item already had attributes, none are suggested at all. Only an empty item gets them.
  </Accordion>

  <Accordion title="I cancelled, and I want to know what happened to the draft">
    **Cancel deletes it.** The draft stock item created to carry the images is removed when you cancel, so nothing is left behind in the table.

    **The exception is permissions.** Deleting needs `inventory:stock_item:delete`. On a custom role granting create but not delete, cancelling leaves the draft in place. It is in `draft` status so it does not show in the normal lists — look under **Settings > Archived assets** or ask someone with the permission to clear it.
  </Accordion>

  <Accordion title="The name it suggested is wrong for how we refer to this item">
    **Expected.** The suggestion describes what is in the photo, in general terms. It does not know your naming convention, your supplier's model names, or the shorthand your staff use.

    **What to do:** overwrite it. The name field offers names already in use on your account, so picking an existing one keeps naming consistent — and consistent names are what make SKU binding and the inventory table's grouping useful later.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Register stock items" icon="plus" href="/docs/guides/inventory/register-stock-items">
    The manual path, and connecting items to a SKU.
  </Card>

  <Card title="Bulk-edit stock items" icon="pen-to-square" href="/docs/guides/inventory/bulk-edit-stock-items">
    Where a batch of more than one unit lands.
  </Card>

  <Card title="Attributes" icon="tags" href="/docs/concepts/admin/attributes">
    What the suggested attributes become on your account.
  </Card>

  <Card title="Import inventory from a CSV" icon="file-import" href="/docs/guides/inventory/import-inventory-csv">
    The third way in, for stock you already have in a spreadsheet.
  </Card>
</CardGroup>
