Use the Update Item Relationship API to efficiently manage
child-parent item relationships and ensure accurate availability updates.
Procedure
If you are a container user, complete the following steps:
- Call the Update Item Relationship API to update or create
child-parent item relationships. For more information, see Update Item Relationship API.
Every time this API is called, it updates the parent item availability based on all its
child items including the new child.
- When you introduce many items with child-parent relationships, set the
itemRelation.skipParentAvailUpdate
tenant-level rule to true
before loading any supplies for the child items. Use the Operations Settings API
to update the following rule.
inventory/operations/v1/configuration/settings/{{tenant}}
This step makes the Update Item Relationship API lightweight
and it updates only the relationship record and skips the parent availability
update.
- After the initial load of items is complete, set the
itemRelation.skipParentAvailUpdate
rule back to false. This
ensures that the incremental relationship updates also update the parent item availability, keeping
the availability data accurate and up to date.
Note: If supply already exists for child items in the system and the parent relationship is later
added with this rule set to true, it is necessary to manually recompute the
availability for all items to update the parent item availability before resetting the flag to
false. The Node recompute API can be utilized for this
purpose.
Attention:
Effective with the 10.0.2503.0 release in March 2025, the
itemRelation.skipParentAvailUpdate
rule is no longer available. The parent item
availability in child-parent relationships are calculated and updated asynchronously.