Inserting Made From Parts
You can insert single or multiple Made From Parts (Raw Materials) for single or multiple Part objects or Made From Set objects by specifying the Part or Made From Set OIDs and the Made From Part (Raw Material) OIDs in the request body. You can also choose to insert the Made From Parts in context of Change (Change Task or Change Notice). You must first reserve the Change object for Edit.
You must have Read permissions to the Made From Part objects and to the objects for which you want to insert the Made From Parts. You must have Create permissions to the Manufacturing History objects, and Modify permissions to the Change object.
To insert Made From Parts, you can set a relationship constraint on Manufacturing Raw Material Link from Type and Attribute Management > Manufacturing Raw Material Link > Relationship Constraint. On the Relationship Constraint tab, you must set a Parent Type (the type of object for which you want to insert objects) and a Child Type (the type of objects that are inserted) for a new constraint.
* 
When the preference Track “Made From” History Through Change Notice is set to Yes, you must specify the ChangeOid attribute and its value.
You cannot create alternate sets or add raw materials under Made From Sets or Parts, if you do not specify ChangeOid, when the preference is set to Yes.
When the preference is set to Yes, Manufacturing History Objects are added in the UI in the Resulting Objects table of the Change object specified in the ChangeOid attribute value.
Example: Inserting Multiple Made From Parts for a Finished Part Object
This example shows you how to insert a Made From Part for each of the Part objects specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/InsertMadeFrom
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"MadeFromAssociations": [
{
"Makes@odata.bind": "Parts('VR:wt.part.WTPart:192634')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:191433')"
},
{
"Makes@odata.bind": "Parts('VR:wt.part.WTPart:192634')",
"MadeFrom@odata.bind": "Parts('VR:wt.part.WTPart:191448')"
},
{
"Makes@odata.bind": "Parts('VR:wt.part.WTPart:192634')",
"MadeFrom@odata.bind": "Parts('VR:wt.part.WTPart:191408')"
}
]
}
URI with Expand
POST /Windchill/servlet/odata/BomTransformation/BomTransformation/InsertMadeFrom?$expand=RawMaterialLink($expand=Makes,MadeFrom)
Similarly, you can insert multiple Made From Parts for a Made From Set object by specifying the Made From Set and Made From Part OIDs in the request body.
Example: Inserting Multiple Made From Parts for Multiple Objects with ChangeOid Specified
This example shows you how to insert a Made From Part for each of Part objects and Made From Set objects specified in the request body. In this example, the preference Track “Made From” History Through Change Notice is set to Yes. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/InsertMadeFrom
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"MadeFromAssociations": [
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:200476')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189127')"
},
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:200476')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189162')"
},
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:200477')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189162')"
},
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:200477')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189197')"
},
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:200478')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189127')"
},
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:200478')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189162')"
},
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:199665')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189127')"
},
{
"Makes@odata.bind": "Parts('OR:wt.part.WTPart:199665')",
"MadeFrom@odata.bind": "Parts('OR:wt.part.WTPart:189162')"
}
],
"ChangeOid": "OR:wt.change2.WTChangeActivity2:196909"
}
The request also adds the Manufacturing History Objects in the Resulting Objects table of the Change object specified in ChangeOid.
URI with Expand
POST /Windchill/servlet/odata/BomTransformation/BomTransformation/InsertMadeFrom?$expand=RawMaterialLink($expand=Makes,MadeFrom)