Expand my Community achievements bar.

SOLVED

Pressure rule whose WEIGHT depends on CURRENT DELIVERY FIELD

Avatar

Level 5

Hello,

I'm trying to configure an advance pressure rule that is able to dynamically set the delivery weight1761456_pastedImage_2.png

Weight formula is something like that:

Case(

When([emailInfo/delivery/@nature]='firstDelivery',6 ),

When([emailInfo/delivery/@nature]='secondDelivery',5),

When([emailInfo/delivery/@nature]='thirdDelivery',4),

When([emailInfo/delivery/@nature]='fourthDelivery',3),

Else(0) )

I used also [currentDelivery/@nature] but I anticipate that the results are the same.

The single delivery is configured in this way:

1761457_pastedImage_6.png

I realized that the pressure rule works only with a constant weight but doesn't fit expectation if weight depends on formula described adove.

Could you tell me if there is something wrong in my configuration?

Thanks in advance,
Salvatore

Jean-Serge Biron

Amy_Wong

Vapsy

florentlb

Amit Kumar

Adhiyan

Ananya Kuthiala

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hello Jean-Serge Biron​ ,

I realized that it wasn't working because even if a recipient was included in more than 3 deliveries (6 in my test campaign):

  • Some of the deliveries remained on "Preparation" status and were not sent
  • The deliveries received were not those ones with the highest weight

In any case, it seems that I mis-configured the delivery: now I chose this weight type and it's working

1761912_pastedImage_6.png

Now, I would like to test the behavior on a 7 days period (previous 3,5 + next 3,5 days) and see what happens.
If you any suggestion or best action to apply, please feel free to reply here.

Thanks!
Salvatore

View solution in original post

2 Replies

Avatar

Level 10

Hi Salvatore,

First of all, don't use emailInfo/delivery xpath, it takes the last delivery record sent to a recipient.

So you must use currentDelivery xpath for the delivery being analyzed.

How do you notice that the pressure rule doesn't behave as it should?
I guess you prepared and sent (or evaluated) 4 deliveries (because your quantity threshold is set to 3) with different nature values and same recipients targeted in same day (your period slice choice), and you checked which recipients were targeted depending on the nature value of deliveries?
Please elaborate how you deducted that the behavior is wrong?

Then please may you test with case/when/else syntax and [currentDelivery/@nature] but only on 2 levels of imbrication?

Or replace it by Iif syntax with 2 levels (with enclosed parenthesis for more levels)?
And also by changing the quantity to 1 so being able to test with 2 deliveries (easier for debugging).

Regards
J-Serge

Avatar

Correct answer by
Level 5

Hello Jean-Serge Biron​ ,

I realized that it wasn't working because even if a recipient was included in more than 3 deliveries (6 in my test campaign):

  • Some of the deliveries remained on "Preparation" status and were not sent
  • The deliveries received were not those ones with the highest weight

In any case, it seems that I mis-configured the delivery: now I chose this weight type and it's working

1761912_pastedImage_6.png

Now, I would like to test the behavior on a 7 days period (previous 3,5 + next 3,5 days) and see what happens.
If you any suggestion or best action to apply, please feel free to reply here.

Thanks!
Salvatore