Developer forum

Forum » Ecommerce - Standard features » Native ‘Build eCommerce Assortment Items’ scheduled task add-in does not rebuild assortment

Native ‘Build eCommerce Assortment Items’ scheduled task add-in does not rebuild assortment

Melissa Borgmann
Melissa Borgmann
Reply

Hello,

It appears the that native ‘Build eCommerce Assortment Items’ scheduled task add-in (Fig. 1) does not consistently achieve the same results as manual assortment rebuild action (Fig. 2). Please confirm if this is the expected behavior. If it is, please advise regarding best practice to rebuild product assortments on an automated schedule.

To reproduce this issue (solution running DW 9.17.5 / Swift 1.26.0) , configure an assortment (AssortmentA) with a product group attached (Group1), then:

  1. Import a new product record belonging to Group1
  2. Manually run the native ‘Build eCommerce Assortment Items’ scheduled task
  3. Refresh the browser page
  4. Note that the new product record has not been added to AssortmentA
  5. From the Ecommerce module, right-click on AssortmentA and click ‘Rebuild’
  6. Refresh the browser page
  7. Note that the new product record is now added to AssortmentA

Screencast : https://app.screencast.com/6ahrt1GuVcX1j

See also:
https://doc.dynamicweb.com/forum/ecommerce-standard-features/ecommerce-standard-features/build-ecommerce-assortment-items-scheduled-task-add-in-issue

A screenshot of a computer

AI-generated content may be incorrect.

Figure 1

 

A screenshot of a computer

AI-generated content may be incorrect.

Figure 2


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
This post has been marked as an answer

Hi Melissa,

I think that's because the assortment isn't flagged as requiring a rebuild when you import data; something that does get done in the UI when you add, for example, a product to a group. That way, the assortment is not picked up by the scheduled task when it calls Assortment.GetAssortmentsForBuild.

To solve this, at the end of your import task, you could try running a SQL statement to flag the assortment(s) as requiring a rebuild:

UPDATE dbo.EcomAssortments SET AssortmentRebuildRequired = 1

You could run this as a SQL task scheduled at the same time as the main import task (but sorted after it) in DW 9 or as a sub task in DW 10.

To test this out first, run the SQL statement after your step 1, before rebuilding the assortment.

Hope this helps,

Imar

Votes for this answer: 1
 
Melissa Borgmann
Melissa Borgmann
Reply

Imar,

You're wonderful for posting this - confirming that resolves the issue :) 

Thank you very much! 

- Melissa B.

 

As a general note to the larger team handling platform documentation - it'd be so helpful to see this tidbit included in the assortment documentation for integrated solutions! 

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Just be aware that the assortment then will always be rebuilt. If you import often (like a delta import that runs every 15 minutes) your assortment is marked as requiring a rebuild and then gets rebuilt every 15 minutes as well. Depending on your data changes and import frequency, this may or may not be what you need.

Imar

 
Melissa Borgmann
Melissa Borgmann
Reply

Imar,

Noted, thank you! 

 
Dynamicweb Employee
Carsten Boll
Reply

I've notified the integration documentation people and it should be documented shortly :)

 
Melissa Borgmann
Melissa Borgmann
Reply

Carsten,

Thank you so much, it's appreciated!

 

You must be logged in to post in the forum