Rule Date Comparisons in Rules Engine
None
When creating Rule Criteria using "Rule Date" as the value, is seems that "Rule Date" is evaluating as a full date/time value, rather than just the Date. This is confusing and is inconsistent with other Salesforce date comparisons.
My use case is this -
Rule 1 adds Customers into the Customer Repository
Rule 2 takes and Customers with Create Date=Rule Date and add the New Customer Onboarding CTA. However the evaluation doesn't work because Rule Date is the full string of date and time.
I have a workaround for this, but would like to see date comparisons be done just on the actual date.
My use case is this -
Rule 1 adds Customers into the Customer Repository
Rule 2 takes and Customers with Create Date=Rule Date and add the New Customer Onboarding CTA. However the evaluation doesn't work because Rule Date is the full string of date and time.
I have a workaround for this, but would like to see date comparisons be done just on the actual date.
Sign up
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Welcome to the Gainsight Community
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Any thoughts on this? It continues to be quite confusing when rules don't work because the Created Date operator is "Equals", and the field value is a date/time stamp. Then I have to remember to make it "Greater or Equal to". All other date fields in Salesforce work using an "equal to" operator when comparing date values. Being consistent within the FORCE platform is important for administration.
thanks
Kristin
Thanks for bringing this up, Let me explain you how RuleDate works, When we compare RuleDate against 'DateTime' field it will be compared as 'timestamp' where as if we do it against 'Date' field then it will compared as just Date.
So in your context, In Rule1 while adding Customers into the Customer Repository, try to load RuleDate into any 'Date' field. (Note: CreatedDate is a DateTime field, so not useful in this case).
If you don't have any 'Date' field then create one in customerInfo Object or somewhere else.
In Rule2 you can use the above Date field against Rule Date.
In Rules -> Setup Rule -> left hand side field listing, if you mouse over on a field then tool tip shows you which datatype it is.
Hope this helps you, please reply for any clarifications.
Thanks
Murthy Kavali
You can use a Formula field(Date filed) to convert DateTime to date and achieve this
your_new_date_field_formula = DATEVALUE(CreatedDate)
Use this new date field in Rule filter.
Let me know if this helps
thanks
Kristin
We are introducing formula functions within Rules Engine for fall release. One of the formula is to convert Datetime to Date field within Rules Engine itself. I believe this will simplify things further. I will keep you posted on this.
Thank you,
Jitin
You can use the Date() function in the transformation task of Bionic Rules which will convert Datetime to Date value.
Regards,
Jitin