Dynamics 365 Field Service : Transfer inventory between warehouses
In Dynamics 365 Field Service, inventory management is a critical capability for organizations managing parts, tools, and consumables across multiple warehouses. One of the frequent business requirements is the transfer of inventory between warehouses—for example, moving parts from a central warehouse to a regional warehouse or directly to a technician's van (treated as a warehouse).
This blog will cover:
- Functional overview
- Technical process flow
- Configuration steps
- Key tables/entities and relationships
- Customization or automation possibilities
- Gotchas and best practices
Why Transfer Inventory?
Before diving into the technical details, let’s understand the business need.
- Replenish technician stock: Parts need to be moved from the main warehouse to technicians' vehicles (mobile warehouses).
- Optimize stock levels: Reduce overstocking or stockouts at certain locations.
- Fulfill customer demand: Transfer parts closer to the service location for faster repairs.
- Inter-warehouse balancing: Shift items between locations due to seasonal or project-based demands.
Dynamics 365 Field Service supports this using Inventory Transfer capabilities.
Functional Overview
In Field Service, warehouses are represented as Inventory Warehouses. Inventory items and quantities are tracked per warehouse using Inventory Adjustments and Inventory Transfers.
When performing a transfer:
1. Inventory levels in the source warehouse are reduced.
2. Inventory levels in the destination warehouse are increased.
3. A historical transaction record is created for audit.
This process also supports transfers to/from Mobile Warehouses (technician vans).
Technical Process Flow
Here’s how inventory transfer works under the hood:
Entities Involved
Transfer Workflow (System Logic)
When a user initiates a transfer:
Create a Transfer record (`msdyn_inventorytransfer`) with:
- Source Warehouse
- Destination Warehouse
- Transfer Date
- Owner (user initiating the transfer)
Add line items (Transfer Products) under this record:
- Product
- Quantity
- Unit
System validates:
- Availability of stock in source warehouse.
- Whether destination warehouse exists and is active.
On completion, system triggers:
- Decrement from source warehouse (`msdyn_productinventory.quantity`).
- Increment to destination warehouse (`msdyn_productinventory.quantity`).
Historical tracking of transactions via:
- `msdyn_inventoryjournal` (tracks all changes in inventory).
Backend Data Flow
User Action --> Create Inventory Transfer --> System Validates Quantities --> Adjust Source Warehouse Stock --> Adjust Destination Warehouse Stock --> Log Journal Entry
Configuration: Steps to Enable Inventory Transfers
Step 1: Define Warehouses
- Go to Field Service > Inventory > Warehouses.
- Create warehouse records for each physical location and mobile warehouse (technician van).
- Assign ownership or user/team.
Step 2: Enable Inventory Tracking
- For each product in Product Catalog, enable Field Service Inventory.
Step 3: Set Up Initial Inventory
- Use Inventory Adjustments to define starting stock levels.
Step 4: Create Inventory Transfer
- Navigate to Field Service > Inventory Transfers.
- Create a new record with source & destination warehouses.
- Add line items with product and quantity.
- Save & mark as Posted (or Completed) to execute transfer.
Developer/Technical Notes
APIs & SDK
Retrieve/Update Product Inventory
QueryExpression query = new QueryExpression("msdyn_productinventory");
query.Criteria.AddCondition("msdyn_warehouse", ConditionOperator.Equal, warehouseId);
query.Criteria.AddCondition("msdyn_product", ConditionOperator.Equal, productId);
Create Transfer Programmatically
- Use `msdyn_inventorytransfer` and child `msdyn_inventorytransferproduct` entities.
Plugin or Power Automate Scenarios
You may extend functionality with:
Plugin on Create of msdyn\_inventorytransfer
- Validate stock availability.
- Prevent transfer if stock is insufficient.
Power Automate Flow
- Send notification when stock is below threshold after transfer.
- Automate creation of transfer records from purchase orders.
Key Considerations & Gotchas
✔️ Stock Availability Check: The system does not automatically prevent negative inventory unless you enforce it via plugin.
✔️ Mobile Warehouses: Each technician’s van is treated as a warehouse, so assign ownership correctly.
✔️ Permissions: Ensure users have Field Service Inventory privileges in security roles.
✔️ Integration: For ERP systems (e.g., SAP, Oracle), inventory transfers may need to be synced using Dataverse APIs or Dual Write.
Advanced: Automating Transfers
You can automate inter-warehouse transfers using:
🔹 Power Automate: Trigger transfer when stock < threshold.
🔹 Azure Function + Webhook: Handle complex logic for ERP sync.
🔹 Custom Business Rule/Plugin: Auto-transfer replenishment stock to vans at day-start.
Final Thoughts
Dynamics 365 Field Service simplifies inventory management with out-of-the-box support for inter-warehouse transfers. Whether you’re moving parts between warehouses or replenishing a technician’s van, the system tracks it all for transparency and accuracy. For enterprises with ERP systems or advanced scenarios, you can extend this functionality using Power Platform, Azure Functions, or custom plugins.
Comments
Post a Comment