Skip to content

PranavNagrecha/AwesomeSalesforceSkills / skills/admin/fsl-inventory-management

fsl-inventory-management

Verified

Configure and manage Field Service Lightning inventory: ProductItem (stock at locations), ProductTransfer (stock movement), ProductConsumed (parts used on work orders), ProductRequest/ProductRequestLineItem (replenishment ordering), ProductItemTransaction (audit trail). NOT for work orders, work types, or service appointments — use admin/fsl-work-order-management. NOT for ERP parts and inventory sync — use architect/fsl-integration-patterns. NOT for Omnichannel Inventory (OCI) — use architect/order-management-architecture.

references/well-architected.md

View on GitHub
# Well-Architected Notes — FSL Inventory Management

## Relevant Pillars

- **Reliability** — The inventory data model relies on auto-generated ProductItemTransaction records as the ledger of truth. Any break in the write chain (transactions corrupted, transfers never marked Received) produces incorrect QuantityOnHand counts that propagate silently. Reliable inventory requires disciplined enforcement of the platform-managed update cycle and explicit monitoring of open/stuck ProductTransfer records.

- **Operational Excellence** — Inventory management is an operational process, not just a configuration. Well-run implementations define clear operational procedures for replenishment (ProductRequest → ProductTransfer → Received), parts consumption logging (ProductConsumed), and periodic reconciliation. Implementations that skip operational training routinely see data drift within weeks of go-live.

- **Security** — ProductItem and ProductConsumed records contain product identities, quantities, and location data that may be commercially sensitive. Field-level security should restrict who can view `QuantityOnHand`, `UnitPrice` on ProductConsumed, and location details. Profile and permission set controls should prevent non-inventory roles from creating or modifying ProductTransfer records.

- **Performance** — Large-volume ProductItemTransaction accumulation (in orgs with many technicians and high work order volume) can affect SOQL query performance when reporting against the transaction ledger. Design inventory reports to filter by date ranges and specific locations rather than full-table scans. Archiving strategies for closed ProductTransfer and ProductConsumed records should be considered for orgs with multi-year data.

- **Scalability** — The six-object inventory model scales well for single-region deployments. Multi-region or multi-depot architectures with hundreds of technician vans require careful Location hierarchy design and governance processes to prevent orphaned ProductItem records (product at a decommissioned location). Bulk ProductTransfer creation (e.g., initial stock load) should be tested for governor limits on QuantityOnHand trigger depth.

## Architectural Tradeoffs

### Custom Automation vs. Manual Operational Process for ProductTransfer "Received"

The platform does not automatically mark ProductTransfers as Received when stock arrives. Organizations must choose between:

- **Manual operational process** (cheaper to build, harder to enforce): Dispatchers or technicians manually update ProductTransfer status. Reliable only with strong operational discipline.
- **IoT or barcode integration** (expensive, highly reliable): A scanning event or IoT trigger auto-marks the transfer Received when the package is scanned at the destination.
- **Timed automation fallback** (medium effort): A scheduled Flow marks transfers Received if they have been in transit for more than N days — a pragmatic middle ground that prevents ledger drift without requiring hardware investment.

### Native FSL Inventory vs. ERP Integration

For organizations with an existing ERP (SAP, Oracle, NetSuite), the right answer is rarely to duplicate full inventory management in Salesforce. The FSL inventory objects are optimized for field-level parts tracking and consumption on work orders — not for procurement, demand forecasting, or multi-echelon inventory planning. A well-architected integration keeps the ERP as the system of record for master inventory and uses FSL ProductItems as a near-real-time projection for what technicians carry, synced from the ERP via API.

## Anti-Patterns

1. **Direct QuantityOnHand Edits as an "Adjustment" Mechanism** — Admins and developers who need to correct an inventory count sometimes write directly to `QuantityOnHand` via Flow, Data Loader, or Apex. This bypasses the ProductItemTransaction ledger, produces unauditable stock records, and is unsupported by Salesforce. Use adjusting ProductTransfer records instead — always.

2. **Treating ProductItemTransaction as Configurable** — Some practitioners attempt to enable/disable or filter ProductItemTransaction record creation to reduce record volume. These records are auto-generated by the platform and cannot be selectively suppressed. Architectures that rely on trimming this object's volume (e.g., deleting old transaction records) corrupt the ledger. Volume management must happen through archiving strategies that move records out of the primary org, not through deletion.

3. **Skipping ProductItem Pre-Seeding for New Vans** — Adding a new technician van to the fleet without creating ProductItem records for every product that van will carry means the first ProductConsumed attempt on that van fails. A mature implementation seeds ProductItem records (with QuantityOnHand = 0) for every expected product/location combination as part of the van onboarding process, then uses a ProductTransfer to load opening stock.

## Official Sources Used

- Field Service Inventory Management Data Model — https://developer.salesforce.com/docs/atlas.en-us.field_service_dev.meta/field_service_dev/fsl_dev_overview_inventory.htm
- Common Field Service Inventory Tasks — https://help.salesforce.com/s/articleView?id=sf.fs_inventory.htm&type=5
- ProductItem Object Reference — https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productitem.htm
- ProductTransfer Object Reference — https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_producttransfer.htm
- ProductConsumed Object Reference — https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productconsumed.htm
- ProductItemTransaction Object Reference — https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productitemtransaction.htm
- Object Reference — https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_concepts.htm
- Salesforce Well-Architected Overview — https://architect.salesforce.com/docs/architect/well-architected/guide/overview.html
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 196kUpdated Claude CodeCodexVerifiedInstall