For the following samples, assume that the Superseeding part number, SP-A, SP-B, SP-C, and SP-D already exist in the system. The parent Part node is omitted for brevity. To see a sample of Supersession in a full XML document, please see Sample insert/update XML section in this appendix.
The Supersessions node lists each individual Supersession. The top list node includes a GroupType attribute. When the GroupType is AND, the part is replaced by ALL of the parts listed in the group. In this example, SP-A AND SP-B replace the parent Part:
<Supersessions GroupType=”AND”>
<Supersession PartNumber=”SP-A” Uom=”NotSpecified” Quantity=”1″ IsMandatory=”true” />
<Supersession PartNumber=”SP-B” Uom=”NotSpecified” Quantity=”1″ IsMandatory=”true” />
</Supersessions>
When the GroupType is OR, the part is replaced by ANY of the parts listed in the group. For instance, either SP-A OR SP-B can be used in place of the parent Part:
<Supersessions GroupType=”OR”>
<Supersession PartNumber=”SP-A” Uom=”NotSpecified” Quantity=”1″ IsMandatory=”true” />
<Supersession PartNumber=”SP-B” Uom=”NotSpecified” Quantity=”1″ IsMandatory=”true” />
</Supersessions>
An optional “Action” attribute can be provided, which will specify the action to take on the Supersession group. If omitted, default is purgeandreplace. On a purgeandreplace, all existing Supersessions are deleted and replaced with the specified Supersession nodes from the XML:
<Supersessions GroupType=”AND” Action=”purgeandreplace”>
<Supersession PartNumber=”SP-A” Uom=”NotSpecified” Quantity=”1″ IsMandatory=”true” />
</Supersessions>
Other Action options include Upsert and Delete. Upsert will modify only the Supersessions listed and existing Supersessions unlisted will be untouched. The following example would update Quantity to 2 for a pre-existing Supersession, or insert supersession for SP-A if it doesn’t exist:
<Supersessions GroupType=”AND” Action=”Upsert”>
<Supersession PartNumber=”SP-A” Uom=”NotSpecified” Quantity=”2″ IsMandatory=”true” />
</Supersessions>
Delete will remove ALL the supersessions from the parent PartNumber. Note: If Delete is specified, the <Supersession> nodes are ignored in favor of deleting all of the parent part’s supersessions:
<Supersessions GroupType=”AND” Action=”Delete”>
<!– if any supersession nodes listed here, they will be ignored and ALL supersessions for the parent part will be deleted–>
</Supersessions>
Each Supersession node then contains a PartNumber, Uom, a Quantity, and IsMandatory attributes. Uom is expecting one of the following values:
– Each
– NotSpecified
The default if unmatched (or blank) is “NotSpecified”:
<!–Uom explicitly set to NotSpecified: –>
<Supersession PartNumber=”SP-A” Uom=”NotSpecified” Quantity=”1″ IsMandatory=”true” />
<!–Uom explicitly set to Each: –>
<Supersession PartNumber=”SP-B” Uom=”Each” Quantity=”2″ IsMandatory=”true” />
<!–Uom set to NotSpecified by default: –>
<Supersession PartNumber=”SP-C” Uom=”” Quantity=”3″ IsMandatory=”true”/>
<!–Uom set to NotSpecified by default: –>
<Supersession PartNumber=”SP-D” Uom=”assignDefault” Quantity=”4″ IsMandatory=”true” />
Quantity should be a numeric, positive, integer value.
And IsMandatory is expecting one of the following values:
– True
– False
Note that the parts listed for Supersession must already exist in the system; the Supersession section will not create new parts. They need to be included in either the MasterPartsList or the IPLParts sections for creation.