Update Part Revision and Item

This example pipeline demonstrates how to create an object and then update attributes on both its item and its revision.


Pipeline consisting of JSON Generator Snap, Tc Create Snap, a second JSON Generator Snap and Tc Update With Item Snap.

Steps

1: Input for the creation is stored in JSON Generator. The stored JSON document contains data necessary for creating a Part.

Snap configuration

Snap output


Settings of JSON Generator Snap.

[
  {
    "object_type": "Part",
    "attributes": {
		"object_desc": "Test Create with Snap",
		"object_name": "Test 0204264",
		"fnd0CurrentLocationCode": "55"
	},
	"expandAttributes": [
		"object_name",
		"object_string",
		"object_desc",
		"object_type",
		"item_id",
		"item_revision_id",
		"creation_date", 
		"fnd0CurrentLocationCode",
		"checked_out"
	]
  }
]

2: In the snap configuration following values has to fed into fields of the Tc Create Snap:

  • $object_type to field Object Type
  • $attributes to field Object Attributes Path
  • $expandAttributes to field Expand Attributes Path

Snap configuration

Snap output


Settings of Tc Create Snap.

[
  {
    "_id": "TC*Part Revision*null***AWPAANM67hAnmD",
    "checked_out": " ",
    "creation_date": "2026-04-02T09:55:03Z",
    "fnd0CurrentLocationCode": null,
    "item_id": "052861",
    "item_revision_id": "A",
    "object_desc": "Test Create with Snap",
    "object_name": "Test 0204264",
    "object_string": "052861/A;1-Test 0204264",
    "object_type": "Part Revision",
    "object_type_DISPLAY": "Part Revision",
    "UID": "AWPAANM67hAnmD",
    "original": {
      "object_type": "Part",
      "attributes": {
        "object_desc": "Test Create with Snap",
        "object_name": "Test 0204264",
        "fnd0CurrentLocationCode": "55"
      },
      "expandAttributes": [
        "object_name",
        "object_string",
        "object_desc",
        "object_type",
        "item_id",
        "item_revision_id",
        "creation_date",
        "fnd0CurrentLocationCode",
        "checked_out"
      ]
    }
  }
]

Output document contains data of newly created object. The attribute “fnd0CurrentLocationCode” is still null since it is an attribute which can not be set while create in Teamcenter.

3: The resulting object includes ID information which can be taken in JSON Generator Snap document.

Note:

UIDs in Teamcenter are as the name says UNIQUE. The UIDs in the example only exist in our Teamcenter system as expected for our example. Same is valid for Adapter ID "_id" since its base is the UID.

The stored JSON document stores “id” and “object_type“ value and contains data to be updated for the Part Revision and for Part Item. Therefore a JSON object “items_tag” inside path for to be updated attributes is created in JSON document.

Snap configuration

Snap output


Settings of JSON Generator Snap before Tc Update With Item Snap.

[
  {
    "_id": $._id,
	"object_type":$.object_type,
    "updateAttributes":{
		"items_tag":{
			"object_name":"New Item Name"
		},
		"object_desc": "Test Update with Snap",
		"fnd0CurrentLocationCode": "24",
		"object_name":"New ItemRev Name"
	},
	"expandAttributes": [
		"object_type",
		"object_name",
		"object_string",
		"object_desc",
		"items_tag.object_name",
		"item_id",
		"item_revision_id",
		"creation_date", 
		"fnd0CurrentLocationCode",
		"checked_out"
	]
  }
]

4: In the snap configuration following values has to fed into fields of the Tc Update Snap:

  • $_id to field Object ID
  • $object_type to field Object Type
  • $updateAttributes to field Object Attributes Path
  • $expandAttributes to field Expand Attributes Path

Snap configuration

Snap output


Settings of Tc Update With Item Snap.

[
  {
    "_id": "TC*Part Revision*null***AWPAANM67hAnmD",
    "checked_out": " ",
    "creation_date": "2026-04-02T09:55:03Z",
    "fnd0CurrentLocationCode": "24",
    "item_id": "052861",
    "item_revision_id": "A",
    "items_tag": {
      "_id": "TC*Part*null***AGLAANM67hAnmD",
      "object_name": "New Item Name",
      "UID": "AGLAANM67hAnmD"
    },
    "object_desc": "Test Update with Snap",
    "object_name": "New ItemRev Name",
    "object_string": "052861/A;1-New ItemRev Name",
    "object_type": "Part Revision",
    "object_type_DISPLAY": "Part Revision",
    "UID": "AWPAANM67hAnmD",
    "original": {
      "_id": "TC*Part Revision*null***AWPAANM67hAnmD",
      "object_type": "Part Revision",
      "updateAttributes": {
        "items_tag": {
          "object_name": "New Item Name"
        },
        "object_desc": "Test Update with Snap",
        "fnd0CurrentLocationCode": "24",
        "object_name": "New ItemRev Name"
      },
      "expandAttributes": [
        "object_type",
        "object_name",
        "object_string",
        "object_desc",
        "items_tag.object_name",
        "item_id",
        "item_revision_id",
        "creation_date",
        "fnd0CurrentLocationCode",
        "checked_out"
      ],
      "original": {
        "_id": "TC*Part Revision*null***AWPAANM67hAnmD",
        "checked_out": " ",
        "creation_date": "2026-04-02T09:55:03Z",
        "fnd0CurrentLocationCode": null,
        "item_id": "052861",
        "item_revision_id": "A",
        "object_desc": "Test Create with Snap",
        "object_name": "Test 0204264",
        "object_string": "052861/A;1-Test 0204264",
        "object_type": "Part Revision",
        "object_type_DISPLAY": "Part Revision",
        "UID": "AWPAANM67hAnmD",
        "original": {
          "object_type": "Part",
          "attributes": {
            "object_desc": "Test Create with Snap",
            "object_name": "Test 0204264",
            "fnd0CurrentLocationCode": "55"
          },
          "expandAttributes": [
            "object_name",
            "object_string",
            "object_desc",
            "object_type",
            "item_id",
            "item_revision_id",
            "creation_date",
            "fnd0CurrentLocationCode",
            "checked_out"
          ]
        }
      }
    }
  }
]

Output JSON document provides an example of the response returned when updating a Part Revision in Teamcenter. Now attribute “fnd0CurrentLocationCode” has a value set and object_desc and object_name is updated too. Next to this since Snap is able to update Item of Item Revision too, updated information of Item (its “object_name”) is available in JSON object “items_tag”.