Developer forum

Forum » PIM » AutoAssign Rule based on Parent Group

AutoAssign Rule based on Parent Group

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is it possible to create an auto-assign rule that would assign a product  to all subgroups of a Top level group?

For example, say I have the following category structure:

TopGroup1
-SecondLevelGroup11
-SecondLevelGroup12

TopGroup2
-SecondLevelGroup21
-SecondLevelGroup22

If I assign the product to TopGroup1, I want to create an AutoAssign rule to also assign the product to SecondLevelGroup11 and SecondLevelGroup12

Is this possible out of the box or do I need to create some Macros or Schema Extenders?

Thank you,
Adrian

 


Replies

 
Nicolai Pedersen
Reply

That is not possible. Also I cannot see why that would be needed...? Using the right query in the frontend, you should be able to do it.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

It is a setup that we have to follow. The admin would assign the product to a group that would represent a Set of attributes. That Set has different subgroups that represent a Group of attributes inside of that set. Each Group is connected to a ProductCategory with different fields. Some Sets have as much as 10 Groups. We want to make it easy for the admin to assign the product to a Set and we should take care of assigning the product to the Groups.
I understand this is not a standard situation, I was hoping that somehow the Auto-Assign approach (also suggested by Soren in another thread) would help me solve it.

I will try to customize something to get it done.

Thank you,


Adrian

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply
This post has been marked as an answer

Hi Adrian,

Why can't you get it to work with the Query method ?

I have made the below TEST, to simulate your above description, and that works ..

NB! you have to create needed GroupCustomFields

Video:

https://www.screencast.com/t/kePwjhVFAt9C

 

Votes for this answer: 1
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Soren,

Thank you for the solution.

It looks pretty cool and it is exactly what I need.

I will try to replicate your setup.

Thank you,

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Soren,

I have made some progress with my case but I have stumbled again on auto-assign.

In my case, I want to assign the product to groups and I would like to define a field on the product where I would store the GroupId's the product should be assigned to.

But I don;t see any way I can use the value from the GroupID for the auto-assign rule.

it seems to be forced to have a custom GroupField or to bind the existing AUTO_PRODUCT_RELATION_RULES with a field on the product.

I can probably mimic what I need with this but it will require extensive setup everytime something changes.

Is there any way I can use the GroupID (or GroupNumber) from the group for defining an Auto-Assign rule?

Thank you,
Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Any idea here? In my last comment, I was asking about the ability to use GroupID in the AutoAssign rules without having to create a custom field for it.

Thank you,
Adrian

 

You must be logged in to post in the forum