- Clerk.io Help Center
- Using Clerk.io on Magento 2
- Data Management
-
Working with Clerk.io
-
Using Clerk.io on Other / Custom Platforms
-
Using Clerk.io on Shopify
-
Using Clerk.io on Magento 1
-
Using Clerk.io on Magento 2
-
Using Clerk.io on WooCommerce
-
Using Clerk.io on Prestashop
-
Using Clerk.io on BigCommerce
-
Using Clerk.io on Shoporama
-
Using Clerk.io on Shopware 6
-
Using Clerk.io on DanDomain
-
Using Clerk.io on Lightspeed
-
Using Clerk.io on SmartWeb / HostedShop
-
Using Clerk.io on DynamicWeb
-
Using Clerk.io with Any Email Client
-
Using Clerk.io with Copernica
-
Using Clerk.io with Autopilot
-
Using Clerk.io with Active Campaign
-
Using Clerk.io with Marketing Platform
-
Using Clerk.io with MailChimp
-
Using Clerk.io with MailUp
-
Using Clerk.io with Apsis
-
Using Clerk.io with UbiVox
-
Using Clerk.io with CleverReach
-
Using Clerk.io with Google Ads
-
Using Clerk.io with Act-On
-
Audience Integrations with Facebook
-
Using Clerk.io with DotDigital
-
Using Clerk.io with Klaviyo
Choosing which Products to import on Magento 2
control whether to show products that are out-of-stock, hidden, variants etc.
Per standard, the Magento 2 extension only imports products that are in stock and saleable.
This can be changed if needed.
Including out-of-stock products or with specific visibilities
In the Magento 2 backend, go to Stores->Configuration->Clerk->Configuration.
Under Product Synchronization you have two options for choosing the products to import:
-
Only synchronize saleable products lets you choose whether to send products that cannot be purchased, but still shown
-
Only synchronize product with visibility lets you choose a specific visibility that the products should have

After making your changes, click Save Config.
If you do this, we strongly recommend that you also add an extra attribute to Magento 2, which indicates when a product is not saleable, so you can show it in your Design.
Assuming you create an attribute called is_saleable which is either true or false, you can use it like this in Designs:
{% if product.is_saleable %}
<div class="in-stock">In Stock</div>
{% else %}
<div class="not-in-stock">Not In Stock</div>
{% endif %}
Then go to my.clerk.io -> Data Sync and click Start Sync to sync with the new rules.
Adding custom rules
The following file controls which products are imported to Clerk.io:
vendor->clerk->magento2->Model->Adapter->Product.php
In the bottom of this file, locate the function called prepareCollection().
If needed, you can add advanced rules to this function, to control which products to send to us:

Then go to my.clerk.io -> Data and click Start Full Data Sync to sync with the new rules.
