Solved

# Rule Help

• 6 replies
• 75 views

Userlevel 7
+3
• ACE
• 627 replies

Hoping someone can help me puzzle out how to do this.  Basically, I want to take a set of dates and bucket them into a generic quarter.  So, for example, if the date starts with January, I want to bucket that as Q1, if it starts with April, Q2, and so on.

Use Case:  We send our NPS surveys out twice a year, and the quarter that the customer receives it is directly related to their renewal date.  So, if the renewal date is in Q2, they would get the survey in Q1 and Q3.

I started off just using the exact date and using the rules engine to say if the dates are between 1/1/2021 and 3/31/2021, then, set the NPS schedule as Q2/Q4, and that worked, but then, it occurred to me that I was going to have continually update it as contracts get added further and further out.  So, then, I had the thought that I could add field called Renewal Quarter, and assign a value there based on the month of the renewal date, but I can’t seem to isolate the month to do that.

Open to any other suggestions anyone might have.  Thanks!

icon

Best answer by phani_kumar 18 October 2020, 12:24

View original

### 6 replies

Userlevel 7
+1

Hi @heather_hansen

Happy to help you with this use-case. Here is a post where we can know how to calculate the Dates using the Existing date fields.

Hope this helps you.

Thanks.

Userlevel 7
+2

Hi @heather_hansen

Normally for this scenario, I would recommend running your rule based on Renewal Date minus 90 days or any number of days before the renewal date. In this scenario, you can ensure the customer has been with you for 3 quarters before you survey them. The 3 quarters gives them enough time to fully experience your services and provide your team with invaluable insights. And the 90 days gives you time to solve any issues in advance of your renewal – just in case. You can also adjust your rule to run to more days if you need more time to fix problems on average.

The above solution allows you to survey all your customers at the exact time based off of the renewal date. I’m a firm believer that its critical you survey all your customers at the same point in their lifetime so that you can more objectively evaluate them. Depending on when your customers typically buy, you could end up with surveys being responded to any day of the week which will give you great insights throughout the entire year. For this solution, you can query renewal dates off of opportunities to trigger the rule. For example, Today = Renewal Date - 90 days. This is also the easiest to setup in Gainsight.

For sending surveys just twice a year, your solution to have a a field might be easier in your CRM. In Salesforce, there’s a formula you can use to calculate this:

That would likely be the easiest solution if you need a field and you can build it in Salesforce. If you need to run this completely in Gainsight, there’s a few options I’d recommend thinking about.

To build this in Gainsight, you would need to use something like was mentioned above.

Hope this helps! Would love to hear which solution ends up working best for you.

Userlevel 7
+3

Thanks! @phani_kumar. I’m going to try to get to this today.  @jean.nairon We’re trying to eliminate the need to build it/store it in SF.  Since we send through JOs, we thought it made more sense to have the entire process live in GS.  The twice a year decision was made before my arrival, but I’ll definitely mention the option to look at sending at a different cadence.  That’s how we coordinated at my old company, and you are right...it would be a lot less work.

Userlevel 7
+3

@jean.nairon @phani_kumar I actually wound up getting @spencer_engel’s suggestion to work from this post. So, I have one rule to populate a field with the date as a string, and then, I used another rule to get the month using the SUBSTRING.  Then, I used those in filters to select the correct NPS schedule.

Userlevel 7
+2

Love it! Reposting Spencer’s idea here for everyone’s ease. This is a great solution.

From Spencer:

My best idea is to query your Renewal Date and write it to a string field on your company object. Then you’ll convert all your July renewals, for example, to a format of 2021-07-09 for example, with the “07” being your July indicator.  See below (dummy data).

From there, you can use that string field to extract the month by first using a series of transformations with string formulas. Let me know if this helps!

Userlevel 7
+1

@jean.nairon @phani_kumar I actually wound up getting @spencer_engel’s suggestion to work from this post. So, I have one rule to populate a field with the date as a string, and then, I used another rule to get the month using the SUBSTRING.  Then, I used those in filters to select the correct NPS schedule.

Yes, as @spencer_engel suggested, we can load the Date to a String field, and using that string field we can get the Month with the help of Substring in Transformation Task.