We identified a issue with a Classification Rule for one of our clients. It is an odd case we have not found any documentation about.
While applying classification rule on the product values:
1. There is a classification rule created using a Regex, that sets one constant value as a result. Here is the expression:
.*Promo.*Streaming\s-\s[1-4]mo.*|MobileOAC:Promo - Premier Streaming - 6mo - 30.00 - 1moFO|.*Trial.*Streaming\s-\s[1-4]mo.*
2. When running a test on the set of values, they are all classified as expected (screenshot 2). Here is a sample product value that passes the test:
Trial - Essential Streaming - 3mo - 0.00 - 1moFO - wETF(6mo70) - AMZ DOT-G3
3. However when looking at the reports, that particular sample product value (and many others) are listed under "Unspecified" and not with the right value.
More than 72h have passed since the classification was created, and nothing has changed.
Do you have any idea on what may be causing this?
Thank you in advance for your help!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @josed30633309 ,
There are too many things that could go wrong with the given regex. You may want to make it a bit more robust.
Just as a starting point you should change how your "Or" logic works with a non-capturing group and there's a rogue period that was probably meant to be escaped:
e.g. (?:.*Promo.*Streaming\s-\s[1-4]mo.*|MobileOAC:Promo - Premier Streaming - 6mo - 30\.00 - 1moFO|.*Trial.*Streaming\s-\s[1-4]mo.*)
but there are is probably a better solution if you know everything that could possible appear in this product string:
e.g. ^(?:MobileOAC:)?(?:Promo|Trial)(?:\s-\sEssential)?\sStreaming\s-\s[0-9]mo\s-\s[0-9]?[0-9]\.[0-9][0-9]\s ...<any other optional fields>... (?:AMZ DOT-G3|<some other finishing text>)$ where you have clearly defined the beginning and end of the string as well as the optional fields.
All the best,
Jacob
Views
Replies
Total Likes
Hi @josed30633309 ,
There are too many things that could go wrong with the given regex. You may want to make it a bit more robust.
Just as a starting point you should change how your "Or" logic works with a non-capturing group and there's a rogue period that was probably meant to be escaped:
e.g. (?:.*Promo.*Streaming\s-\s[1-4]mo.*|MobileOAC:Promo - Premier Streaming - 6mo - 30\.00 - 1moFO|.*Trial.*Streaming\s-\s[1-4]mo.*)
but there are is probably a better solution if you know everything that could possible appear in this product string:
e.g. ^(?:MobileOAC:)?(?:Promo|Trial)(?:\s-\sEssential)?\sStreaming\s-\s[0-9]mo\s-\s[0-9]?[0-9]\.[0-9][0-9]\s ...<any other optional fields>... (?:AMZ DOT-G3|<some other finishing text>)$ where you have clearly defined the beginning and end of the string as well as the optional fields.
All the best,
Jacob
Views
Replies
Total Likes
Hi Jacob,
Thank you for your reply. I totally agree that there are multiple ways to create the Regex, and we have tried multiple ones, from a very tight one as you suggested to the simpler one I included in the posted question. The result is the same.
The point here is different. The Regex was tested, using the Classification Rules testing tool, and with an independent tool. In both cases the Regex matches the cases in question. This doesn't seem to be a Regex issue.
Views
Replies
Total Likes
Depending on look back period you have selected for the rule, the value can still be Unspecified if it is an old one (that means the value arrived in your reporting beyond the look back period). If that is not the case and you are still seeing the issue, please contact Customer Care to help troubleshoot this.
Views
Replies
Total Likes
Hi Khurshid,
Thank you for pitching in. There is actually to time limitation for the rule in question, and it is not because the entries are too old. Even more recent entries are impacted.
It is just very odd. I don't think I am the only one seeing this. I posted this same question on the #measure Slack channel and some participants confirmed they have seen this behaviour, however they have not idea why does this happen.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies