# Sub-Pipeline : DoInventory

Review the DoInventory sub-pipeline when scheduling inventory imports.

![DoInventory sub-pipeline diagram showing error count decision node and import processing path retrieval steps](https://a.sfdcstatic.com/developer-website/sfdocs/commerce-cloud/media/b2c-commerce/b2c_inventory_inventory_do_inventory.gif)

1. Decision Node : `ErrorCount == null`
   - If `true` , continue
   - If `false` , return error
2. Pipelet Script (bc_api). Call `[GetImpExProcessingPath.ds](b2c-get-imp-ex-processing-path-ds.md)`. This script retrieves the import processing path.
3. Continue after calling node.

| Variable                      | Type         |                                          |
| ----------------------------- | ------------ | ---------------------------------------- |
| `@input TaskDirectoryName`    | `String`     | Task directory name                      |
| `@input SiteID`               | `String`     | Site ID                                  |
| `@input FileName`             | `String`     | File name                                |
| `@input ImpexRoot`            | `Boolean`    | Root directory is IMPEX (default: false) |
| `@input FileExtension`        | `String`     | Processing File Extension (.processing)  |
| `@input sampleLogger`         | `Object`     | Sample Logger                            |
| `@output ImpExProcessing`     | `dw.io.File` | Import/Export processing file            |
| `@output ImpExProcessingPath` | `String`     | Import/Export processing file path       |
| `@output SampleLogger`        | `Object`     | Debug output for Sample logger           |
| `@output SampleError`         | `Object`     | Error output for Sample logger           |
