DetectAndResolveDiscrepancies
The DetectAndResolveDiscrepancies action detects all discrepancies between the upstream and downstream parts in the BOM transformer and only resolves those that have the status as Auto. The action detects and resolves discrepancies for a single or multiple upstream parts using inline or specific upstream and downstream navigation criteria.
You can also detect and resolve the discrepancies in the context of change (change task or change notice).
* 
The action does not support detection of discrepancies for a resource structure.
See the Detecting and Resolving Discrepancies in the BOM Transformer topic in the Windchill Help Center, for more information.
The attributes in the request payload of the DetectAndResolveDiscrepancies action are described in the following table:
Request Attribute
Description
Required
CheckInDownstreamObject
Flag to specify whether the affected object in the downstream structure should be checked in after propagation or not after resolving discrepancies.
* 
The affected object in the downstream structure remains checked out after resolving discrepancies, if CheckInDownstreamObject is not specified.
Optional
SourceRoot
Attribute in the DiscrepancyContext entity type to specify the root part of the upstream structure.
Yes
SourcePartSelection
Attribute in the DiscrepancyContext entity type to specify the parent Part from the upstream structure.
Alternatively, you can specify the Path of the parent part.
* 
SourcePartSelection is a collection for specifying either a single or multiple upstream parent parts or their paths.
Yes
UpstreamNavigationCriteria
Attribute in the DiscrepancyContext entity type to specify the navigation criteria applied in the upstream.
* 
PTC recommends that you specify the navigation criteria when you perform this action.
If not specified, the System Default filter is applied.
Optional
DownstreamNavigationCriteria
Attribute in the DiscrepancyContext entity type to specify the navigation criteria applied in the downstream.
* 
PTC recommends that you specify the navigation criteria when you perform this action.
If not specified, the System Default filter is applied.
Optional
TargetRoot
Attribute in the DiscrepancyContext entity type to specify the root part of the downstream structure.
Optional
TargetPart
Attribute in the DiscrepancyContext entity type to specify the downstream part.
Optional
TargetPath
Attribute in the DiscrepancyContext entity type to specify the path of the specified downstream part.
Optional
UpstreamChangeOid
Attribute in the DiscrepancyContext entity type to specify the change object (change task or change notice) for detecting discrepancies when the relevant part is not iterated.
* 
*UpstreamChangeOid is a required attribute for detecting the discrepancies of Item Expressions or Plant Attributes criteria.
Yes*
ChangeOid
Attribute to specify the change task or change notice.
Optional
The action returns information for each resolved discrepancy that is detected with status as Auto. The action returns the following attributes for each specified upstream part for which the discrepancy was resolved:
Identity
Number
Name
Version
In the same set of attributes, it also returns the following attributes:
Criteria of the detected discrepancy.
CurrentValue
* 
The attribute is returned only for discrepancies of the Added Parts criteria.
PreviousValue
* 
The attribute is returned only for discrepancies of the Removed Parts criteria.
DownstreamParentPath, which is valid only for discrepancies of the Added Parts criteria.
Status of the detected discrepancy.
InternalMetadata, which is an internal encoded information.
The URI
POST Windchill/servlet/odata/BomTransformation/DetectAndResolveDiscrepancies
returns the following response, for example:
{
"@odata.context": "$metadata#DiscrepancyItems",
"value": [
{
"Identity": "0000000305, ChildChild1, A.1 (Design)",
"Number": "0000000305",
"Name": "ChildChild1",
"Version": "A.1 (Design)",
"Criteria": "Removed Parts",
"CurrentValue": "",
"PreviousValue": "0000000302|0000000305",
"DownstreamParentPath": [
"0000000302"
],
"Status": "Resolved",
"InternalMetadata": "eyJTdGF0dXMiOiJBdXRvIiwiQ3VycmVudFZhbHVlSW50ZXJuYWxOYW1lIjoiIiwiRGlzY3JlcGFuY3lTdGF0dXNNZXNzYWdlIjoiIiwiZG93bnN0cmVhbVBhcmVudCI6IjAwMDAwMDAzMDJ8MDAwMDAwMDMwNSIsIlJlbW92ZWRDaGlsZCI6Ind0LnBhcnQuV1RQYXJ0OjI2NTkyMiIsInVwc3RyZWFtSW1wYWN0ZWRPYmplY3QiOiIiLCJEaXNjcmVwYW50UGF0aFJvb3QiOiJ3dC5wYXJ0LldUUGFydE1hc3RlcjoyNjU4NjciLCJDdXJyZW50VmFsdWUiOiIiLCJTdGF0dXNJbnRlcm5hbE5hbWUiOiJBVVRPIiwiUHJldmlvdXNWYWx1ZUludGVybmFsTmFtZSI6IjAwMDAwMDAzMDJ8MDAwMDAwMDMwNSIsIlByZXZpb3VzVmFsdWUiOiIwMDAwMDAwMzAyfDAwMDAwMDAzMDUiLCJUYXJnZXRQYXRocyI6W3siUGF0aCI6Ii85MTI4MjBhMy0yZjIwLTRhYWEtYjAxOS05M2I4NDNkNDQ0Mzki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