Managing Attributes Via a Backend System
If you use a backend catalog management system to define attribute data or new product attributes, you can use catalog import to import new product attribute definitions into Salesforce B2C Commerce and to make sure that attributes managed via the backend system can't be edited in Business Manager.
Useful Elements for Managing Attributes
In the catalog.xsd, the product-attribute-definitions element uses the complexType.AttributeDefinitions type, which contains two useful elements:
- externally-managed-flag - used to indicate that the custom attribute values are externally managed and can't be edited in Business Manager.
- externally-defined-flag - indicates whether the custom attribute definition is managed in an external system and then imported in our system. This element is intended for merchants that use Catalog Management Systems, where they manage their catalog data along with product meta data. Attribute definitions that are imported along with catalog information are implicitly marked as externally-defined. There is no way to set the externally-defined-flag in Business Manager.
-
order-required-flag
-
searchable
Delete and Create Custom Product Attribute Definitions in a Single Feed
You can delete obsolete attribute definitions and create attribute definitions in a single feed using the product-attribute-definitions element.
- In UX Studio, in the pipeline that you use to import your catalog, locate the ImportCatalog pipelet.
- In the ImportConfiguration parameter, enter
{importAttributeDefinitions:true}
.Note: If this option isn't set, the product-attribute-definition element is ignored by import and an error is generated in the import log. - From your backend system, generate a feed based on the catalog.xsd
that has the following:
- a
product-attribute-definitions
element for each new attribute definition you want to create. - if you want to remove a product attribute definition that is
externally defined, make sure that it isn't included in the feed.
Whether you are importing with the UPDATE, MERGE, or REPLACE mode,
the replace semantic is always used for
product-attribute-definitions
element, so any attribute definitions that are flagged externally defined in the database and not defined in the import file are removed from the database.
- a
- Import the feed via a job. Note: Importing the feed manually in Business Manager causes the
product-attribute-definitions
element to be ignored.
Changing Product Object Custom Attribute Definitions
Because custom product attribute definitions are created in the catalog import can't be searchable or order-required, to prevent unintended changes to the storefront, you must change these attribute settings after catalog import.