Catalog Views Import - API Connector

This documentation describes the process of importing Catalog Views via the API Connector. It covers the available fields, business rules, and possible errors.

⚙️ Introduction

This job allows the creation and update of Catalog Views via API import using the API Connector.

You can:

  • Create new Catalog Views.
  • Update existing Catalog Views.
  • Define filtering rules (MAD Rules) to control product assortment visibility per Account.
  • Replace the entire set of rules applied to a Catalog View.

The import payload can contain one or multiple Catalog Views.


📂 Accepted Payload Structure

The accepted payload format specifies the structure required for successful data transmission through the API Connector. Ensuring the payload adheres to this format guarantees efficient integration of Catalog Views within DJUST platform.

Payload structure example
{
 "elements":[
    {
       "catalogExternalId":"1234",
       "catalogName":"VIP",
       "catalogDescription":"Lorem Ipsum",
       "allowedAssortmentExternalId":["2345","3456"],
       "accountExternalId":["7890","5678"],
       "excludedAssortmentExternalId":["54321","65432"],
       "delete":false,
       "active":true,
       "emptyRules":false
    }
 ],
 "paging":{
    "pageNumber":0,
    "pageSize":0,
    "totalPages":0,
    "totalRecords":0
 }
}
💡

The JSON must always be a list of objects


📋 Fields

FieldDefinitionRequiredEditableDefault value
Catalog View External IdUnique external identifier for the Catalog View
Catalog NameDisplay name of the Catalog View
Catalog DescriptionOptional description of the Catalog ViewEmpty string
Allowed Assortment External IdsList of Assortment External IDs to include in the view
Forbidden Assortment External IdsList of Assortment External IDs to explicitly exclude from the view
Account External IdList of Account External IDs that will see this Catalog View
Mark Catalog View For DeletionSet to true to delete the Catalog View identified by catalogExternalIdfalse
Is Catalog View ActiveIndicates whether the Catalog View is activetrue
Remove Rules from Catalog ViewIf true, clears existing rules associated with the viewfalse

❌ Error Handling

Failure behavior

  • The import job will be marked as COMPLETED_WITH_ERRORS if any invalid element is detected.
  • Each Catalog View is processed independently. If an error occurs on a specific element, other Catalog Views in the same payload are still processed.
  • An error report will be generated with functional error codes.

Potential Functional Errors

Error code

Description

When it occurs

F-E-001

Missing required field

  • Catalog View External Id is missing
  • Catalog Name is missing

F-E-033

Referenced entity does not exist

  • Account External Id does not exist
  • Forbidden Assortment External Ids does not exist
  • Allowed Assortment External Ids does not exist

🧠 Key Business Rules & Notes

  • If Catalog View External Id matches an existing Catalog View, the view will be updated with the provided values.

  • If Catalog View External Id does not exist, a new view will be created.

  • If Mark Catalog View For Deletion is set to true, the Catalog View will be deleted, and all other fields will be ignored.

  • If Remove Rules from Catalog View is set to true, any existing rules with the view will be cleared. It does not remove the association between the Catalog View and the linked Accounts.

  • The Is Catalog View Active flag controls the visibility of the view. If set to false, the view will not be applied, but it remains available for update or reactivation.

  • Catalog Views can be linked to multiple accounts via Account External Id. This controls which buyers can access them.

📌

Best Practices

✔️ Follow data formatting guidelines for optimal import results