Developer forum

Forum » PIM » Access Completeness level from API or Database

Access Completeness level from API or Database

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is there any way I can access the completeness level of a product for a specific Shop/Group/Channel?

I am thinking of an API method or some information from a Database.

Thank you,

Adrian


Replies

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply

Hi Adrian,

I think what you are looking for is the Dynamicweb.Ecommerce.Services.CompletionRules.CalculateProductCompleteness methods. They don't take a specific Shop/Group/Channel, but you should be able to extract the CompletionLanguages and CompletionRules from the specific Shop/Group/Channel and sent that into the method. 
That should give you the completeness number.

I hope it helps.

Best regards,

Steffen

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Steffen,

Thank you for the suggestion.

What I am trying to accomplish is a custom push of the products assigned to a channel depending on the Completion level.

I know that I can restrict the assignment to a Channel based on the completion level but in my case the assignment to a channel is done through the import. Which means the Completion level can be overridden. I need to be able to filter the products exported based on the completion level. And from what I can tell, I have no way of adding the completion level to a Query that I could use in the code later on.

I will see if your suggestion will work for me.

Thank you,

Adrian  

 

You must be logged in to post in the forum