28 June 2024
B2BOrdersGraphQL
Business Units can now inherit Approval Rules from parent units higher up in the hierarchy. With Approval Rules inheritance, Business Units of type Division automatically inherit the rules of parent units. This can be helpful in situations where a Company has defined a set of Approval Rules that should also be applied to all associated Divisions. For each Division, you can choose the inheritance behavior and explicitly define which rules should apply. To modify the inheritance behavior, use the Change Approval Rule Mode update action.
Changes:
- [API] Added 
approvalRuleModefield to BusinessUnit, BusinessUnitDraft, Company, Division, and DivisionDraft. - [API] Added BusinessUnitApprovalRuleMode type to Business Units.
 - [API] Added Change Approval Rule Mode update action to Business Units.
 - [API] Added 
BusinessUnitApprovalRuleModeChangedMessageMessage. - [GraphQL API] Added the following types to the GraphQL schema: 
BusinessUnitApprovalRuleMode,BusinessUnitApprovalRuleModeChanged,ChangeBusinessUnitApprovalRuleMode. - [GraphQL API] Changed the 
BusinessUnitDrafttype:- Input field 
approvalRuleModewas added toBusinessUnitDrafttype 
 - Input field 
 - [GraphQL API] Changed the 
BusinessUnittype:- Added the 
approvalRuleModefield to theBusinessUnittype. 
 - Added the 
 - [GraphQL API] Changed the 
BusinessUnitUpdateActiontype:- Input field 
changeApprovalRuleModewas added toBusinessUnitUpdateActiontype 
 - Input field 
 
The following changes were introduced in terms of GraphQL SDL:
extend type BusinessUnit {
  approvalRuleMode: BusinessUnitApprovalRuleMode!
}
extend input BusinessUnitDraft {
  approvalRuleMode: BusinessUnitApprovalRuleMode
}
extend input BusinessUnitUpdateAction {
  changeApprovalRuleMode: ChangeBusinessUnitApprovalRuleMode
}
enum BusinessUnitApprovalRuleMode {
  Explicit
  ExplicitAndFromParent
}
type BusinessUnitApprovalRuleModeChanged implements MessagePayload {
  approvalRuleMode: BusinessUnitApprovalRuleMode!
  oldApprovalRuleMode: BusinessUnitApprovalRuleMode
  type: String!
}
input ChangeBusinessUnitApprovalRuleMode {
  approvalRuleMode: BusinessUnitApprovalRuleMode!
}