Windchill REST Services > Windchill REST Services Domain Capabilities > PTC Domains > PTC BOM Transformation Domain > Actions Available in the BOM Transformation Domain for Creating or Updating Downstream BOMs > PasteAsNewPart
  
PasteAsNewPart
The PasteAsNewPart action adds a copied part and its upstream structure as a new part in the downstream structure and creates a new equivalence link to the copied upstream part. You can add the copied parts using inline or specific upstream and downstream navigation criteria.
You can also add the copied upstream part as a new part to the downstream structure in the context of change (change task or change notice).
The attributes in the request payload of the PasteAsNewPart action are described in the following table:
Request Attribute
Description
Required
TargetRoot
Attribute to specify the root part of the downstream structure in the BOM transformer.
Yes
TargetPath
Attribute to specify the path of the downstream part under which you want to add the copied part.
Yes
SourceRoot
Attribute to specify the root part of the upstream structure in the BOM transformer.
Yes
SourcePart
Attribute in the TransformationDefinitions collection to specify the OID of the upstream part that you want to copy.
Yes
SourcePaths
Array type of attribute in the TransformationDefinitions collection to specify the path of the specified upstream part occurrence from its upstream root part.
Yes
TransformationOption
Attribute in the TransformationDefinitions collection to specify the child structure option such as Do not duplicate, Duplicate with propagating, or Duplicate without propagating for the transformation.
* 
*TransformationOption is not applicable when you specify ExistingDownstreamAssociations.
Yes*
ReviseExistingDownstream
Flag in the TransformationDefinitions collection to specify whether you want the existing downstream objects to be revised or not during the transformation.
* 
*ReviseExistingDownstream is a required attribute when you specify ExistingDownstreamAssociations.
When ExistingDownstreamAssociations is not specified, the ReviseExistingDownstream flag is ignored, even if it is provided.
Yes*
ExistingDownstreamAssociations
Array type of attribute in the TransformationDefinitions collection to specify the OID of the equivalent link between a specified upstream part and its existing downstream equivalent object.
Alternatively, you can specify the value composed of an upstream part OID and its existing downstream part OID. The value is specified for the upstream part when its existing downstream object is not equivalent to it.
Optional
View
Attribute in the TransformationEntity entity type to specify the downstream view to be used in the transformation.
Yes
BOMType
Attribute in the TransformationEntity entity type to specify the type of downstream BOM being used.
Optional
AlternateBOM
Attribute in the TransformationEntity entity type to specify an alternate BOM for the transformation.
Optional
Context
Attribute in the TransformationEntity entity type to specify the context in which you want to create the downstream object.
Yes
Folder
Attribute in the TransformationEntity entity type to specify the location in which you want to create the downstream object.
Yes
Number
Attribute in the TransformationEntity collection to specify an identification number for the new part in the downstream.
If you specify an existing part number, then the system searches for that part in Windchill and shows it as an existing downstream part along with the other existing downstream parts.
Optional
DownstreamNavigationCriteria
Inline or specific 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
UpstreamNavigationCriteria
Inline or specific 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
ChangeOid
Attribute to specify the change task or change notice.
Optional
The request adds the specified upstream part and its structure as a new part in the downstream structure and creates a new equivalence link to the copied upstream part.
POST Windchill/servlet/odata/BomTransformation/PasteAsNewPart
For example, the response to the request URI is as follows:
{
"@odata.context": "$metadata#ExistingDownstreamAssociations",
"value": [
{
"ID": "OR:wt.associativity.EquivalenceLink:213450",
"UpstreamPartId": "OR:wt.part.WTPart:213274",
"DownstreamPartId": "OR:wt.part.WTPart:213408",
"EquivalenceLinkId": "OR:wt.associativity.EquivalenceLink:213440",
"IsEquivalenceLinkOutdated": false
}
"@PTC.AppliedContainerContext.LocalTimeZone": "Europe/Warsaw"
}
The attributes in the response for the PasteAsNewPart action are described in the following table:
Response Attribute
Description
ID
Attribute in a collection that returns the ID of the equivalent link between the upstream part and the new downstream equivalent part.
UpstreamPartId
Attribute in a collection that returns the ID of the upstream part which was copied.
DownstreamPartId
Attribute in a collection that returns the ID of the new downstream equivalent part.
EquivalenceLinkId
Attribute in a collection that returns the ID of the equivalence link between the upstream part and the new downstream equivalent part.
IsEquivalenceLinkOutdated
Attribute in a collection that indicates whether the equivalence link between the upstream part and the new downstream equivalent part is outdated or not.