Loading

Allow duplicate products when adding item to customer's product list via OCAPI

Дата публикации: Dec 18, 2023
Описание
OCAPI clients can add an item to customer's product list by calling POST /customers/{customer_id}/product_lists/{list_id}/items (see here for the details). By default, when there is an existing product list item with the same product id as specified in the request body, that product will not be added to the product list so that there will be no duplicate product list items with the same product id.

This behavior can be controlled by the site preference named ProductListsDisallowRepeat. By setting this preference to "false", OCAPI clients can add multiple product list items with the same product id within a product list.

The ProductListsDisallowRepeat site preference can be changed via Site Import. The archive to be imported should include the preferences.xml file with the following contents.
<!-- xmlns omitted for brevity -->
<preferences>
    <standard-preferences>
        <all-instances>
            <preference preference-id="ProductListsDisallowRepeat">false</preference>
            <!-- omitted --> 
        </all-instances>
        <!-- omitted -->
    </standard-preferences>
    <!-- omitted -->
</preferences>
This preference can be replicated to the Development and Production instances by replicating the System Preferences of a specific site.
Номер статьи базы знаний

000393956

 
Загрузка
Salesforce Help | Article