---
title: "Action: Stock count to stock draft"
description: "Imports stock count entries into a stock draft (lagerkladde) so they can be reviewed and booked, typically used for stock takes and corrections."
url: https://support.sapera.io/en/articles/596-action-stock-count-to-stock-draft
collection: "SyncTool"
updated: 2026-09-25
language: en
alternates: [da]
---

# Action: Stock count to stock draft

Imports stock count entries into a stock draft (lagerkladde) so they can be reviewed and booked, typically used for stock takes and corrections.

Imports stock count entries into a stock draft (lagerkladde) so they can be reviewed and booked, typically used for stock takes and corrections.

## How to use the action

1\. Select the action in the **Action** field. 2. Point to your data source – a **file** (CSV or Excel) or a **SQL query**. 3. Map the source columns to Sapera's fields in the column mapping (see _Source fields_ below). 4. Run **Compare** to see what will be created, changed or stay unchanged – without writing to Sapera. 5. Run **Update Sapera** to perform the import.

Use the **Allow create** and **Allow update** parameters to control whether new rows are created and whether existing ones are updated.

## How matching and updating works

The action **adds lines to a named stock draft** (the draft is chosen in the parameter) – it does **not post** them itself. The lines can then be reviewed and posted manually; this is typically used for stock counts and corrections.

-   Each line points to a product via **barcode or item number** (BarCodeOrIdentifier); variants and serial-numbered items are recognised automatically. If the product is not found, the line fails.
    
-   AltAppendixNumber groups several lines into the same voucher in the draft. The cost price uses your column, otherwise the product's default/auto cost price.
    
-   Set the parameter to **clear the draft** first if you want to start over. The action only creates lines – it does not update or delete. Direction: from file/SQL into the stock draft.
    

## Key parameters

<table data-id="534cb763-5d9a-4e42-a97f-0bcb16758a75" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="dc79615e-cf6b-4262-b93d-990b5a5f23b0" style="text-align: left;"><strong>Parameter</strong></p></td><td colspan="1" rowspan="1"><p data-id="25b66de2-9ddc-486d-8619-5fad3c9deb8f" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="13d72eb7-0aea-4c83-9cae-c25b17bcb558" style="text-align: left;">AllowCreate</p></td><td colspan="1" rowspan="1"><p data-id="d71cc3ed-d5f9-402f-b39b-01565c6efc49" style="text-align: left;">Allow creating new draft entries for rows that do not yet exist in the draft.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="f513aef7-484b-4764-b770-64c42d12c85a" style="text-align: left;">AllowUpdate</p></td><td colspan="1" rowspan="1"><p data-id="47aeebc3-e401-403c-b7a8-648f05b67cc7" style="text-align: left;">Allow updating existing draft entries when a matching row is found.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="c67ca043-7108-4a42-a532-552acdc41b8e" style="text-align: left;">ClearDraft</p></td><td colspan="1" rowspan="1"><p data-id="cc772408-16fd-4d68-b403-e51b2a2f838d" style="text-align: left;">Clear the stock draft before importing so only the rows in this run remain.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="3da8c15b-ac5d-42dd-8dfd-f9d0c2f31ab9" style="text-align: left;">DraftIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="4de13ad3-5ee9-4aaf-87bb-7cd9f458c933" style="text-align: left;">Name of the stock draft to import into; leave empty to use the default draft.</p></td></tr></tbody></table>

## Source fields

<table data-id="98fdfc58-c4ce-4dd3-84cc-1a4b0f8ebb79" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="aeb04be3-d3d5-4101-b6fa-1c033d6455ba" style="text-align: left;"><strong>Field</strong></p></td><td colspan="1" rowspan="1"><p data-id="2ac19acb-ce42-4fc3-b659-d65d0136cf87" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="c80ed6d4-8b91-4fe7-9070-d520e1f157b5" style="text-align: left;">AltAppendixNumber</p></td><td colspan="1" rowspan="1"><p data-id="6ce8ca1e-385e-4906-8f22-b0cef9f1427f" style="text-align: left;">Alternative appendix number used to group entries for booking.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="b27a2d06-069e-496c-9b60-649d3a403200" style="text-align: left;">BarCodeOrIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="782b7e34-72e7-4a16-ae06-07e70afb5065" style="text-align: left;">Bar code or product identifier used to resolve which product the entry applies to.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="08790d43-306d-4e55-9873-f4b59de1003d" style="text-align: left;">CostPrice</p></td><td colspan="1" rowspan="1"><p data-id="ef7dea76-5c8d-4eea-b9e6-d82927625e64" style="text-align: left;">Cost price to record for the entry.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="c51cb755-ab59-45bd-bcc3-284455262a13" style="text-align: left;">Description</p></td><td colspan="1" rowspan="1"><p data-id="b564c586-0080-4b77-96c1-6b2c73253645" style="text-align: left;">Free-text description stored on the draft entry.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="c5b79b8d-60d8-405d-b571-614e3c73c3f5" style="text-align: left;">Id</p></td><td colspan="1" rowspan="1"><p data-id="1b498c9e-b9f0-41aa-9fb9-54c17ade20ef" style="text-align: left;">Unique identifier of the draft entry, used to match an existing row for update.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="4073cd60-9315-4441-911b-3ceb076a198f" style="text-align: left;">Identifier</p></td><td colspan="1" rowspan="1"><p data-id="47f337e6-6c66-45c8-8684-ba3087943dc4" style="text-align: left;">Product identifier the stock count applies to.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="1c0b5d5d-1cf7-4e75-942d-99f228ee20ce" style="text-align: left;">Location</p></td><td colspan="1" rowspan="1"><p data-id="47c6805f-43cd-4f9a-951b-3604b9d44f61" style="text-align: left;">Stock location the entry is registered on.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="7a535636-1127-4aca-90d4-7df531bd26db" style="text-align: left;">SerialNumber</p></td><td colspan="1" rowspan="1"><p data-id="1809c73a-c222-4081-ad19-3209a6f3af82" style="text-align: left;">Serial number for an instance-tracked product on the entry.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="83dca1ff-c59d-40fe-920a-c4b708b101b5" style="text-align: left;">StockCount</p></td><td colspan="1" rowspan="1"><p data-id="e85b4dc5-a70a-4d14-9ca5-c87a585afde1" style="text-align: left;">Counted stock quantity to record for the product on the entry.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a72503fb-5f57-4948-a0d0-af67b0bac2e5" style="text-align: left;">StockDate</p></td><td colspan="1" rowspan="1"><p data-id="4b59ca36-bf5c-4b04-8c54-db94925f795f" style="text-align: left;">Date of the stock movement on the entry.</p></td></tr></tbody></table>

* * *

See also the overview [SyncTool – actions](https://support.sapera.io/en/articles/547-synctool-handlinger.md).

* * *

**Want to know more?**

Read more in these related articles:

[

Standard parameters for all actions

The general parameters available on most SyncTool actions: step control, error handling, timeout, etc.

](https://support.sapera.io/en/articles/648.md)
