6

I created a folder in the CMS:

MyFolder that contains (Promo 1 | Promo 2 | Promo 3 | Promo 4 | Promo n)

I then created a Promotion in SmartTarget that is set to select content (the what) from MyFolder. What I expected was that the Promotion would randomly choose content from this folder, otherwise I would have chosen the components individually. However, it seems the Promotion only selects the content based on name value from the folder, so the the top 3 in my case.

So, my question is, is it possible to create a SmartTarget Promotion that will select Components randomly from a location in the CMS?

Thanks in advance...

6

No - it is not possible to randomize the results returned by out-of-the-box usage of SmartTarget (I guess what you are looking for is a 'random' option in the sorting dropdown). See this answer and question for more.

As mentioned there, what we did on our implementation was implement the randomness as a post processing step on the results returned from the promotion. We set up our promotions to return a max number of items which is the same or bigger than the number of items in the folder, and then randomly pick an appropriate number of items to return. Note that this only works as we built our implementation around the SmartTarget API and not the prebuilt controls/taglibs.

3

You should check that your Page Template has the right values in the "Add Promotions" Template Building Block. There is a mandatory parameter field for Maximum items to display, and that should have the total number of items you expect to return.

You will also need to make sure that when you create the promotion, in the section where you select the folder as your source for Content. You also have a filter with the maximum number of returned items set to the same number as assigned above in the PT.

  • From what I can see this returns all the items but still in order of the Component name i.e. 0-1 A-Z. This means I still get the same content all the time. What I need is to select a resource location i.e. a folder and have random Components returned from that folder. Thank you for looking... – Richard Hamlyn Apr 20 '16 at 3:19
3

Actually, the correct ordering in which it is returning items is based on the way the items get published to fredhopper, not their name. This we found out the hard way. :(

So basically, if you publish components X and Y with template A and B in FH, you will get the following: XA XB YA YB but if you republish template B, new items will be XB and YB so you will have new ordering as:

XB YB XA YA

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.