Processing Rules: difference between put condition in "All the following are true" and put it in "Then do the following"? | Community
Skip to main content
OscarMartinezM
New Participant
March 24, 2022
Solved

Processing Rules: difference between put condition in "All the following are true" and put it in "Then do the following"?

  • March 24, 2022
  • 1 reply
  • 2044 views

Hi all, 

I'm confused about when put Processing Rules condition in "All the following are true" and put it in "Then do the following"?We have an issue because we should assigned eVarY only when value in eVarX does not equal 0. But it looks rule is not working. Currently condition is in "Then do the following" area. Is that correct? Is the issue because of that? Or it doesn't matter where to put condition on this case?

Thanks, 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

I think the Processing Rule is working as expected, in a manner that is similar to the one that I had described in my example.

So in your case, eVarX is always getting set. But when eVarX = 0, then eVarY also gets set with the value "abcd". But for all other values of eVarX, eVarY should be "Unspecified". Read that again: only when eVarX is 0, then set eVarY. It's not checking eVarY first before setting eVarX.

So your statement "So, eVarY is assigned even when rule should filter it." is invalid. No filtering occurs here (assuming I'm reading your problem correctly).

It might also help to show a screenshot of your original Processing Rule.

1 reply

yuhuisg
New Participant
March 25, 2022

In general, there are 2 parts to a Processing Rule: the conditions and the actions.

The "If All/Any of the following are true" section lets you specify the conditions that your Rule must match to.

The "Then do the following" section lets you specify what the Rule should do after the conditions are met.

So in your case, you want to put your eVarX condition under the "If All of the following are true" section. Then put your eVarY action under the "Then do the following" section.

To allow for more complicated actions, you can also add conditions to an action. But in your case, I don't think you need that level of complexity.

Here's an example of when you would add an action that has its own condition (in bold):

  • If All of the following are true:
    • Query String Parameter "token" is set
  • Then do the following:
    • Overwrite value of eVar10 With Query String Parameter "token"
    • Overwrite value of eVar11 With Query String Parameter "token" If Query String Parameter "secret" Equals "foobar".

What happens here is that when the Rule processes a hit where the URL contains the query "token", then eVar10 will always be set with that "token" value, but eVar11 will only be set when there is another query in the URL with "secret=foobar".

OscarMartinezM
New Participant
March 25, 2022

Thanks for you response. This is the thing.

Someone in the company, before me, implemented a Processing Rule setting up the condition in "Then do the following" section. I don't really know the reason why.

But we have an issue because we the idea is to setup eVarY only when eVarX=0. When checking the data in a Workspace Dashboard we find eVarX=0, eVarY=abcd. So, eVarY is assigned even when rule should filter it.

Could be possible issue is because condition it's in "Then do the following" section instead of first one? In any case, we already changed location of condition to see what happens.

yuhuisg
yuhuisgAccepted solution
New Participant
March 26, 2022

I think the Processing Rule is working as expected, in a manner that is similar to the one that I had described in my example.

So in your case, eVarX is always getting set. But when eVarX = 0, then eVarY also gets set with the value "abcd". But for all other values of eVarX, eVarY should be "Unspecified". Read that again: only when eVarX is 0, then set eVarY. It's not checking eVarY first before setting eVarX.

So your statement "So, eVarY is assigned even when rule should filter it." is invalid. No filtering occurs here (assuming I'm reading your problem correctly).

It might also help to show a screenshot of your original Processing Rule.