Removing Outdated Objects

⚠️ The annual cost of maintaining the server where this website is hosted, the domain, and keeping it up-to-date is approximately €3,000 per year. Help us with a small donation to cover these expenses. Support Now!

0 / 10000

How you remove outdated objects depends on whether you enrich the data from your backend system with more attributes in Business Manager or not and on the type of business object you want to remove. Salesforce B2C Commerce generally recommends creating feeds of objects to delete, imported using the DELETE mode, to safely remove all types of objects, regardless of whether they have enriched data or not.

Removing Catalog Objects

Most merchants import product objects from a backend feed and then enrich the objects in Business Manager with URLs or other web-specific attributes. In this case, the usual import mode is MERGE. If the backend system generates import feeds that don't track what objects are removed, but include fewer products, the removed objects are not removed from the database. If so, you need some way to delete the objects.

You have the following options to delete catalog objects:

  • DELETE feed - You can create a feed containing objects you want to delete and import it using the DELETE mode. This mechanism is recommended, because it can be used with all types of objects and doesn't affect enriched data.
  • Catalog feed delete syntax - For catalog feeds only, you can specify objects to remove in the feed itself, if your backend system can produce the required syntax. This syntax isn't available for other types of feeds.
  • Pipelet catalog delete - The ImportCatalog pipelet supports the following configuration options for the ImportConfiguration parameter.
    Option Description
    key=deleteCatalog; value=true | false
    Deletes the catalog before the import. You can use this mechanism as a high-performance way to empty a catalog. However, if you use this option it removes any enriching attributes added in Business Manager, so use it only for unenriched objects.
    key=replaceCustomAttributes; value=true| false 
    Deletes custom attributes before import when used with UPDATE or MERGE mode. This mechanism lets you automatically remove obsolete custom attributes, but is faster than REPLACE mode.
    key=replaceCustomAttributesExclusions; value=attrID1, attrID2, ...
    Import of product custom attributes in REPLACE, MERGE, and UPDATE mode doesn't replace the listed attributes. This approach is used in combination with the replaceCustomAttributes option.
  • Business Manager object delete - you can delete the objects in Business Manager. This approach isn't recommended, unless you have only a few objects to delete.

You can choose to remove the entire catalog or all custom attributes before import. But the instance doesn't contain full data while the feed is being imported. If the import feed isn't successful, only the data that was successfully imported exists in your instance database. This approach isn't recommended for production systems. However, this strategy can be useful if you have different seasonal catalogs and you want to replace all the products. You can also use this strategy if you have multiple catalogs on staging. For example, you have one catalog that is populated only by external vendors and that you want to delete, whereas for your custom storefront catalog you want to run an UPDATE to preserve the changes made already on STAGING.

Removing Other Objects

You have the following options to delete objects:

  • DELETE feed - You can create a feed containing objects you want to delete and import it using the DELETE mode. This approach is recommended, because this mechanism can be used with all types of objects and doesn't affect enriched data.
  • Business Manager object delete - you can delete the objects in Business Manager. This approach isn't recommended, unless you have only a few objects to delete.

Removing custom meta Data

The meta data import wizard in Business Manager provides an option to delete all meta data before the actual import. This option allows you to automatically delete existing meta data and use the MERGE or UPDATE mode for a faster import.