Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Organizations often have to preallocate their on-hand stock to their most important sales channels, customer groups, regions, and promotional events to ensure that the preallocated stock is protected against any other use and can be consumed only via sales transactions that are relevant to the allocation. Inventory allocation in Inventory Visibility is a component of the sales operational planning process, and is done before any actual sales activities occur or a sales order is created.
For example, a company that's named Contoso produces a popular bike. Unfortunately, because a recent supply chain disruption has affected all in-transit stock of that bike, Contoso has only limited on-hand stock and must make best use of it. Contoso operates both online and in-store sales. In each sales channel, the company has a few important corporate partners (marketplaces and large retailers) that demand that a specific portion of the bike's available inventory be saved for them. Therefore, the bicycle company must be able to balance stock distribution across channels and also manage the expectations of its VIP partners. The best way to achieve both goals is to use inventory allocation, so that each channel and retailer can receive specific allocated quantities that can be sold to consumers later.
Inventory allocation has two basic business purposes:
Although the allocation feature in Inventory Visibility doesn't set aside physical inventory quantities, it does refer to the available physical inventory quantity to define its initial available to allocate virtual pool quantity. Inventory allocation in Inventory Visibility is a soft allocation. It's done before actual sales transactions occur and doesn't depend on sales orders. For example, you can allocate stock to your most important sales channels or large corporate retailers before any end customers visit the sales channel or retail store to purchase it.
Soft reservations are often linked to actual sales transactions (sales order lines). Both allocation and soft reservation can be used independently, but if you want to use them together, soft reservation should be done after allocation. We recommend that you do inventory allocation first and then soft reserve against the allocated quantities to achieve near-real-time consumption against allocation. Learn more in the Consume as a soft reservation section of this article.
The inventory allocation feature lets sales planners or key account managers manage and preallocate important stock across allocation groups (such as channels, regions, and customer groups). It also supports real-time tracking, adjustment, and analytics of consumption against allocated quantities, to ensure that replenishment or reallocation can be done on time. This ability to have real-time visibility into allocation, consumption, and allocation balance is especially important at fast-sale or promotion events.
The following terms and concepts are useful in discussions of inventory allocation:
The following illustration shows the business workflow for inventory allocation.
The following illustration shows the allocation hierarchy and allocation groups. The virtual common pool shown here is the available-to-allocate quantity.
This section applies when you're using Inventory Visibility UI version 2.
To set up inventory allocation, you must complete the following tasks, which are described in the subsections of this section:
Follow these steps to enable the inventory allocation feature.
In Power Apps, open the Inventory Visibility app.
On the navigation pane, select Feature Management.
On the Inventory allocation tile, select Manage.
Set the Enable feature option to Yes.
On the toolbar, select Save.
On the navigation pane, select Admin Settings.
On the Update configuration tile, select Manage.
Review your modifications in the dialog box.
Important
Be sure to verify all the important modifications that are about to be made to your data sources, physical measures, and dimension mappings.
Select Confirm Update to apply your configuration change.
When you enable the inventory allocation feature and update the configuration as described in the previous section, Inventory Visibility creates one predefined data source and several initial measures.
The data source is named @iv. It includes the following set of default physical measures:
To use allocation, you must correctly set up the formula for the available to allocate calculated measure (@iv.@available_to_allocate). For example, you have the onordered physical measure in the fno data source and the inbound physical measure in the pos data source. You can then allocate on-hand stock for the sum of fno.onordered and pos.inbound. In this case, @iv.@available_to_allocate should contain pos.inbound and fno.onordered in the formula. Here's an example calculation:
@iv.@available_to_allocate = fno.onordered + pos.inbound – @iv.@allocated
Note
The @iv data source is a predefined data source, and the physical measures in @iv that have an at sign (@) as a prefix are predefined measures. These measures are the predefined configuration for the allocation feature. Therefore, don't change or delete them. Otherwise, you're likely to encounter unexpected errors when you use the allocation feature.
You can add new physical measures to the predefined @iv.@available_to_allocate calculated measure. However, you must not change its name.
Follow these steps to set up the available to allocate calculated measure:
Every allocation that's created in Inventory Visibility must be assigned to a specific allocation group. You can create up to eight allocation groups, each of which has a name and a level. A level is required to establish a group hierarchy.
Each level is defined as an integer from 0 (zero) through 7, representing the order in which the groups are used in the allocation hierarchy. The group that's assigned to level 0 is the highest level in the hierarchy, and the group that's assigned to level 7 is the lowest level in the hierarchy.
When you create an allocation, you must specify hierarchies in order from the highest level to the lowest level. For example, your configuration has Country/region for group level 0, State for group level 1, and City for group level 2. In this case, both Country/region and State are required when City is specified. However, an allocation can be created by using only Country/region and State, or by using only Country/region.
Follow these steps to set up your allocation groups and hierarchy.
Important
Be careful when you delete or change the allocation hierarchy. For guidance, see the Tips for using allocation section.
After you've finished changing your configuration, you must apply the changes to activate them.
In the Inventory Visibility app, select Admin Settings on the navigation pane.
On the Update configuration tile, select Manage.
Review your modifications in the dialog box.
Important
Be sure to verify all the important modifications that are about to be made to your data sources, physical measures, and dimension mappings.
Select Confirm Update to apply your configuration changes.
This section applies when you're using Inventory Visibility UI version 1.
Follow these steps to enable inventory allocation and set up allocation groups if you're using UI version 1.
Enable the inventory allocation feature.
Configure the available to allocate calculated measure and the allocated physical measure.
Set up your allocation groups and hierarchy.
Update the configuration to activate your new settings.
The values of the configured allocation groups will be updated when you create an allocation by using either the user interface or API POST (/api/environment/{environmentId}/allocation/allocate
). Details about both approaches are provided later in this article. If you use four group names and set them to [channel
, customerGroup
, region
, orderType
], these names will be valid for allocation-related requests after you call the configuration update API.
Note
Settings that are applied for the enabled status of the allocation feature and for allocation groups in UI version 1 don't affect the corresponding settings in UI version 2. Likewise, settings for the enabled status and allocation groups in UI version 2 don't affect the corresponding settings in UI version 1. Only those settings that are applied in the active UI version apply.
Important
Be careful when you delete or change the allocation hierarchy. For guidance, see the Tips for using allocation section.
Site
, Location
, Color
, Size
]. You allocate some quantity for one product at the [Site
, Location
, Color
] dimension level. In this case, the next time that you want to allocate the same product, you must allocate at the same level. If you use the [Site
, Location
, Color
, Size
] level or the [Site
, Location
] level, the data will be inconsistent.Unallocate
API to remove all old data before you update the configuration. However, you don't have to clean up the data if you're just adding new allocation groups to the lowest hierarchy.available_to_allocate
quantity.Reallocate
API. For example, your allocation group hierarchy is [channel
, customerGroup
, region
, orderType
], and you want to allocate some product from the [Online
, VIP
] allocation group to the [Online
, VIP
, EU
] allocation subgroup. In this case, use the Reallocate
API to move the quantity. When you use the Allocate
API, it will allocate the quantity from the virtual common pool.The following table lists the allocation APIs that are available.
Method | API | Description |
---|---|---|
POST | /api/environment/{environmentId}/allocation/allocate |
Create an allocation |
POST | /api/environment/{environmentId}/allocation/unallocate |
Revert or remove allocated records |
POST | /api/environment/{environmentId}/allocation/reallocate |
Move allocated quantities from an existing allocation to other allocation groups |
POST | /api/environment/{environmentId}/allocation/consume |
Deduct (use) the allocated quantity |
POST | /api/environment/{environmentId}/allocation/query |
Check existing allocation records against the allocation groups and hierarchy |
Call the Allocate
API to allocate a product that has specific dimensions. Here's the schema for the request body.
{
"id": "string",
"productId": "string",
"dimensionDataSource": "string",
"groups": {
"groupA": "string",
"groupB": "string",
"groupC": "string"
},
"quantity": decimal,
"organizationId": "string",
"dimensions": {
"dimension1": "string",
"dimension2": "string",
"dimension3": "string"
}
}
For example, you want to allocate a quantity of 10 for product Bike, site 1, location 11, color red, channel Online, customer group VIP, and region US. To do this allocation, you can make a call that has the following body content.
{
"id": "test101",
"productId": "Bike",
"groups": {
"channel": "Online",
"customerGroup": "VIP",
"region": "US"
},
"quantity": 10,
"organizationId": "usmf",
"dimensions": {
"siteId": "1",
"locationId": "11",
"colorId": "red"
}
}
The quantity must always be more than 0 (zero).
Use the Unallocate
API to reverse the Allocate
operation. Negative quantity isn't allowed in an Allocate
operation. The body of Unallocate
is identical to the body of Allocate
.
Use the Reallocate
API to move some allocated quantity to another group combination. Here's the schema for the request body.
{
"id": "string",
"productId": "string",
"dimensionDataSource": "string",
"sourceGroups": {
"groupA": "string",
"groupB": "string",
"groupC": "string"
},
"groups": {
"groupD": "string",
"groupE": "string",
"groupF": "string"
},
"quantity": decimal,
"organizationId": "string",
"dimensions": {
"dimension1": "string",
"dimension2": "string",
"dimension3": "string"
}
}
For example, you can move two bikes that have the dimensions [site=1, location=11, color=red] from allocation group [Online, VIP, US] to allocation group [Online, VIP, EU] by calling the Reallocate
API and providing the following body text.
{
"id": "test102",
"productId": "Bike",
"sourceGroups": {
"channel": "Online",
"customerGroup": "VIP",
"region": "US"
},
"groups": {
"channel": "Online",
"customerGroup": "VIP",
"region": "EU"
},
"quantity": 2,
"organizationId": "usmf",
"dimensions": {
"siteId": "1",
"locationId": "11",
"colorId": "red"
}
}
Use the Consume
API to post the consumption quantity against allocation. For example, you could use this API to move allocated quantity to some real measures. Here's the schema for the request body.
{
"id": "string",
"productId": "string",
"dimensionDataSource": "string",
"groups": {
"groupA": "string",
"groupB": "string",
"groupC": "string"
},
"quantity": decimal,
"organizationId": "string",
"dimensions": {
"dimension1": "string",
"dimension2": "string",
"dimension3": "string"
},
"physicalMeasures": {
"datasource1": {
"measure": "string" // Addition or Subtraction
}
}
}
For example, there are eight allocated bikes that have the dimensions [site=1, location=11, color=red] for allocation group [Online, VIP, US]. The following available-to-allocate formula is used:
@iv.@available_to_allocate
= fno.onordered
+ pos.inbound
– @iv.@allocated
The eight bikes are allocated from the pos.inbound
measure.
Now, three bikes are sold, and they're taken from the allocation pool. To register this move, you can make a call that has the following request body.
{
"id": "test103",
"organizationId": "usmf",
"productId": "Bike",
"dimensions": {
"siteId": "1",
"locationId": "11",
"colorId": "red"
},
"groups": {
"channel": "Online",
"customerGroup": "VIP",
"region": "US"
},
"quantity": 3,
"physicalMeasures": {
"pos": {
"inbound": "Subtraction"
}
}
}
After this call, the allocated quantity for the product will be reduced by 3. In addition, Inventory Visibility will generate an on-hand change event where pos.inbound
= -3. Alternatively, you can keep the pos.inbound
value as is, and just consume the allocated quantity. However, in this case, you must either create another physical measure to keep the consumed quantities or use the predefined measure @iv.@consumed
.
In this request, notice that the physical measure you use in the consume request body should use the opposite modifier type (Addition or Subtraction), compared with the modifier type used in the calculated measure. So in this consume body, iv.inbound
has the value Subtraction
, not Addition
.
The fno
data source can't be used in the consume body as we always claimed that Inventory Visibility can't change any data for the fno
data source. The data flow is one-way, which means that all quantity changes for the fno
data source must come from your Supply Chain Management environment.
The Consume
API can also consume the allocated quantity as a soft reservation. In this case, the Consume
operation will reduce the allocated quantity and then create a soft reservation for that quantity. To use this approach, you must also be using the soft reservation feature of Inventory Visibility.
For example, you've set a soft reservation physical measure as iv.softreserved
. The following formula is used for the available-to-reserve calculated measure:
iv.available_to_reserve
= fno.onordered
+ pos.inbound
– iv.softreserved
To use this setup with the allocation feature, add @iv.@allocated
to iv.available_to_reserve
to produce the following formula:
iv.available_to_reserve
= fno.onordered
+ pos.inbound
– iv.softreserved
– @iv.@allocated
Then update @iv.@available_to_allocate
to the same value.
When you want to consume a quantity of 3 and directly reserve this quantity, you can make a call that has the following request body.
{
"id": "???",
"organizationId": "usmf",
"productId": "Bike",
"dimensions": {
"siteId": "1",
"locationId": "11",
"colorId": "red"
},
"groups": {
"channel": "Online",
"customerGroup": "VIP",
"region": "US"
},
"quantity": 3,
"physicalMeasures": {
"iv": {
"softreserved": "Addition"
}
}
}
In this request, notice that iv.softreserved
has the value Addition
, not Subtraction
.
Use the Query
API to retrieve allocation related information for some products. You can use dimension filters and allocation group filters to narrow down the results. The dimensions must match exactly the one you want to retrieve, for example, [site=1, location=11] will have unrelated results compared with [site=1, location=11, color=red].
{
"productId": "string",
"organizationId": "string",
"dimensions": {
"dimension1": "string",
"dimension2": "string",
"dimension3": "string"
},
"groups": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
}
For example, use [site=1, location=11, color=red] and empty groups field to get all allocation records:
{
"organizationId": "usmf",
"productId": "Bike",
"dimensions": {
"siteId": "1",
"locationId": "11",
"colorId": "red"
},
"groups": {},
}
Use [site=1, location=11, color=red] and groups [channel=Online, customerGroup=VIP, region=US] to get allocation records for this group:
{
"organizationId": "usmf",
"productId": "Bike",
"dimensions": {
"siteId": "1",
"locationId": "11",
"colorId": "red"
},
"groups": {
"channel": "Online",
"customerGroup": "VIP",
"region": "US"
},
}
You can manually manage allocations by using the Inventory Visibility app in Power Apps.
Important
In the current version of the Inventory Visibility app, you can manage allocations only when you're using Inventory Visibility UI version 1. If you're using UI version 2, you must use the APIs to manage allocations. For more information about the two UI versions and how to switch between them, see Inventory Visibility app user interface versions.
The Allocation tab on the Operational visibility page serves as the user interface where you can create, consume, reallocate, and query allocations, as described in later subsections.
To open the allocation user interface, follow these steps.
Follow these steps to create an allocation in the Inventory Visibility app.
On the toolbar of the Allocation tab, select Consume to consume an allocation. To ensure that you consume within the correct allocation group and hierarchy, enter the same sets of organization and dimension details that you specified when you created the allocation.
On the toolbar of the Allocation tab, select Reallocate to move existing allocated quantity from one set of allocation groups to another.
On the toolbar of the Allocation tab, select Query, and then enter product, organization, dimension, and allocation group values to obtain query results of existing allocations.
Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreTraining
Module
Use general ledger allocations in Business Central - Training
Learn how to use general ledger allocations in Business Central.