How do “Net Changes” work?
Here is a more detailed explanation of how net changes work in PIESCentral.
-
For a segment to be processed it must have at least a master source and the required columns for the segment must be defined. If there are no sources defined the segment is silently skipped. If the master source is not set or the required columns are not mapped, you will get an error and the segment will be skipped. Nothing will be deleted.
-
Within a segment, an unmapped element is the same as a mapped element with no value. If a part originally has a value for an element and that value is set to null in the source, the value becomes null in PIESCentral. How that happens depends on the segment.
In the Item segment, setting GTIN to null sets the GTIN element in the Item segment to null and creates a Change record in the Item segment history. Package, Price, Interchange, Kit, and Digital Assets work the same way.
For the Description, EXPI, and Attribute segments, setting a value to null creates a Delete record in the corresponding history table. Description, EXPI and Attribute consist of just a code indicating type and a value. It the value is null the record must be deleted. For example, if PIESCentral contains a Pop Code of “A” for part P1 and the source now has null for Pop Code on P1, the Pop Code for P1 will be marked Delete in the EXPI History table.
-
If a key exists in PIESCentral for a particular segment and the source no longer contains the key, the record is marked Deleted in the segment history. For example, the key for the Package segment is PackageUOM and Qty (and always an implied Part). If PIESCentral contains a package record for Part=P1, PackageUOM=CA and Qty=6, and a the source does not have a record with that key, the package record will be marked with a Delete in the Package History.
-
Parts (Item segment) are never deleted even if they are no longer in the source. The PIES Documentation says that parts should not be deleted. Instead a part should be made inactive by setting the appropriate Life Cycle Status code in the EXPI segments.
-
Changes are always based on the key for a segment. A change to an element that is part of a key results in an Add and Delete rather that a change. For example, if you change an Interchange Part Number in an Interchange, you get and Add and a Delete because Interchange Part Number is part of the key. If you change the Quality Grade Level on an interchange, you get a Change record.
-
It’s important to note that a change to the document structure requires a Full export. Net changes are based on changes to the PIES data and not to the structure of the document. In other words, if the Package segment is turned off initially and is later turned on, that won’t result in all packages coming into the net change file with an Add. Net change output assumes no change to the document structure between runs.
Note
The history tables track adds, deletes and changes. Change tracking only tracks the time of a change. It does not include what particular element changed or what that value was before.
This means you could not use the history to produce a June 2024 export, for example. You could only create a net change file that shows records that changed since an earlier export.
The actual PIES data always corresponds exactly to the most recent run of the script.