---
schema_version: "1"
id: 35a9222b09294b074d1739fbbf09068dcc92b77949abe6bfe700a0c9b2f5454d
title: "Sub-Pipeline : DoInventory"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/guides/inventory/b2c-sub-pipeline-do-inventory.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-sub-pipeline-do-inventory.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8eee7dc0a99d9fd6ac78a56208eb4ed6bb87e377646bf90be82c8bf024c92ae4
products:
  - Composable Storefront
  - Salesforce APIs
---
# 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://developer.salesforce.com/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](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/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           |
