> For the complete documentation index, see [llms.txt](https://help.besmart.software/erpc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.besmart.software/erpc/en-consultant-manual/imports/imports-of-entities/import-items.md).

# Import items

**State change timing**

original request: 2018-02, VíBa; reason:

* minimizing uncleanable versions typically on an item\
  i.e. write properties or BOMs on items before approval or after change to WIP
* applying ACLs to associated item files when the state changes

**Implementation**

* for each batch entity is loaded:
* * LfCycState\_cur (current state)
  * LfCycState\_trg (target/required state from erp)
* as part of the import, a state change is made to either:
* * OnVaultEntityAvailable - i.e. immediately after getting the Vault entity instance\
    or
  * OnBulkFinished - before the batch import is completed\
    in the inverse order of batch decay (children first, top last)
* logic for determining when to change the build:
* * OnVaultEntityAvailable for the state combination:
  * * LfCycState\_cur = Released AND LfCycState\_trg <> Released
    * LfCycState\_cur = Obsolete AND LfCycState\_trg <> Released
  * OnBulkFinished in other cases
