Import Mode Processing Examples

We have provided examples of import mode processing.

The following example shows how objects are updated in the database depending on the import mode you choose to use.

The values represented in the feed are:

  • A+a- an object with a new attribute
  • B-a - an object with an attribute removed
  • C - an object left unchanged
  • D - a new object
  • FΞ”a - an object with an attribute value that is changed
Note: Absent from the XML file is an object that already exists in the database (E).
XML FIle Objects Pre-Import Database Objects Import Mode Post-Import Database Objects
A+a, B-a, C, D, FΞ”a A, B, C, E, F MERGE A+a, B, C, D, E, FΞ”a
    UPDATE A+a, B, C, E, FΞ”a
    REPLACE (except price books) A+a, B-a, C, D, E, FΞ”a
    REPLACE (price books) A+a, B-a, C, D, FΞ”a
    DELETE (except price books) E
    DELETE (price books)  

For MERGE and UPDATE, attributes not specified in the feed are not removed, which is why you see B, rather than B-a. If you wish to remove an attribute, sometimes you have to change the attribute value to none or blank, rather than changing the import mode. The correct value to specify differs, depending on the attribute. See the Framework section for more information on how specific attributes are processed.

For UPDATE, the object D isn't created.

The object "E" isn’t removed in any of the table scenarios, with the exception of price books. If you import a price book in REPLACE or DELETE mode, the entire price book is replaced or deleted, including data not specified in the feed. For other imports, there is no mode that deletes objects not included in the feed. You must decide on a strategy to explicitly remove outdated objects.