Rules Engine Struggle: Issues writing to SFDC

  • 1
  • Question
  • Updated 2 days ago
Good Morning-

I'm the new Gainsight Admin for my org, and we're currently working on using the rules engine to write lifecycle stages to both Gainsight and to SFDC.

I have a functioning rule to pull from our Lifecycle Stage picklist field in SFDC and write to the Lifecycle Stage field in GS.

I have functioning rules to populate 'New Customer' and 'Onboarding' lifecycle stages to SFDC, based on fields in SFDC.

I'm running into issues with two rules that I have written to populate 'Adoption and 'Renewal' lifeycle stages into SFDC.

The issue is that when I replicate the logic we have built in SFDC in a GS Rule, the results don't match.

Example:

SFDC Logic: 

Filtered By:   Edit    Stage not equal to Closed Won,Closed Lost Clear    AND Type equals Renewal,Auto-Renewal Clear    AND SR - Status equals Active Clear    AND Product includes Social Recruiting Clear    AND Close Date greater than NEXT 120 DAYS Clear    AND Implementation Status equals Completed Clear 

Results: 524

GS Rule:

Type: Custom
For: Account
Source Object: GS Relationship

Show FieldsGS Relationship::Id
 GS Relationship::Account
 GS Relationship::Account Name
 GS Relationship::Stages
 Account::Integration Call Date
 Account::Lifecycle Stage
GS Relationship::Name
 GS Relationship::Processed Date
 Account::Implementation Status
 GS Relationship::Opportunity Close Date
 Account::Product
GS Relationship::SR Status
 GS Relationship::Opportunity Type
 GS Relationship::Opp: Stages
 Account::SR - Expiration Date

Calculated Fields--
Advanced Logic
A AND B AND C AND D AND E AND F

Include accounts where data is unavailableOff

Apply to Gainsight customers only
False


Filters Field NameOperatorValue
A Account::Implementation StatusequalsCompleted
B Account::ProductincludesSocial Recruiting
C Account::SR - Expiration Dategreater or equalAdd N Days to Rule Date 120
D GS Relationship::Opportunity TypeincludesRenewal, Auto-Renewal
E GS Relationship::SR StatusequalsActive
F GS Relationship::Opp: StagesexcludesClosed Won, Closed Lost

1 Type: Load to SFDC Object


Object Name
Account

Operation
Upsert

Field MappingsGS Relationship :: Account Name TEXT

Account :: Account Name STRING (Identifier)

Account :: Lifecycle Stage PICKLIST

Account :: Lifecycle Stage PICKLISTNew Customer Adoption
Onboarding Adoption
Adoption Adoption
Expansion Evaluation Adoption
Renewal Adoption
Retention Roadmap Adoption

Results: 307 for upsert

Is there anything that I'm missing with my logic?  I've found that if I eliminate 'D: GS Relationship::Opportunity TypeincludesRenewal, Auto-Renewal', I end up with ~545 results when I run my GS rule.

Could this be caused by an incomplete data ingest?

Thanks

-Jim
Photo of James Whitehead

James Whitehead

  • 188 Points 100 badge 2x thumb
  • confused

Posted 4 days ago

  • 1
Photo of Jeffrey Coleman

Jeffrey Coleman, Champion

  • 5,598 Points 5k badge 2x thumb
James -- tough to debug these without being there and working it live. Two thoughts from my experience... That "apply to GS Customers Only" checkbox can through things off. Generally it's what you want, but if all the accounts are loaded to Gainsight I've seen gaps between queries.

The other idea I'd suggest is to build a GS Report that matches your initial SFDC logic and then work to expand that over to the relationship level using a data space. You're not running the same query (obviously) and so somewhere between what I think is the Opportunity object and the GS_Relationship object you have data loss you need to find.
Photo of James Whitehead

James Whitehead

  • 188 Points 100 badge 2x thumb
Hi Jeffrey-

I was wondering the same thing, and I ran the rule both ways.  They returned the same results.

Thanks for the GS Report suggestion.  I'll work on that today.

-Jim
Photo of James Whitehead

James Whitehead

  • 188 Points 100 badge 2x thumb
Hi Jeffrey-

Here's another thing I'm curious about: If I'm referencing a SFDC field with my custom rule, is GS looking at the actual data that's live in SFDC, or is it looking at the matching data from the most recent ingest?

Thanks

-Jim
Photo of James Whitehead

James Whitehead

  • 188 Points 100 badge 2x thumb
It looks like I am not ingesting all SFDC data.

After learning the Reports Builder, it looks like we only have ~415 accounts in GS TOTAL with the Opp stage of Renewal or Auto-Renewal.

In SFDC we have 526 that are more than 120 days out from renewal.

Time to dig into our ingests and figure out why we're missing data.

Thanks

-Jim
Photo of Jitin Mehndiratta

Jitin Mehndiratta, Product Manager

  • 2,636 Points 2k badge 2x thumb
Hi Jim,

Can you help me with the screenshots of the rule(Rule Setup as well as actions)? Also, are you trying to load from SFDC picklist field to another picklist field?

regards,
Jitn
Photo of James Whitehead

James Whitehead

  • 188 Points 100 badge 2x thumb
Hi Jitin-

Here's a full set of screenshots from my instance, for the sections that were requested.

I'm trying to have the Rules Engine look at fields in SFDC, and then automatically populate to another field in SFDC with a lifecycle stage.  Once that populates, i'll use another rule that's created and that works to populate from the SFDC picklist to the GS picklist.

Example:

IF SFDC Field 'SR - Status = Active'
AND SFDC Field 'Integration Call Date = Null'

THEN

GS Rule to Write 'New Customer' to SFDC Picklist Field 'Lifecycle Stage'

Use a separate rule to populate from SFDC field 'Lifecycle Stage' to GS picklist 'Stage'.  This rule is functioning as intended.

Thanks

-Jim
Photo of Denise Stokowski

Denise Stokowski, Official Rep

  • 11,732 Points 10k badge 2x thumb
Also one small difference I saw in your criteria is that you had Greater than 120 days for SFDC and Greater than or equal to 120 days in your Show query.  I don't think that is your delta but should be changed to match.
Photo of James Whitehead

James Whitehead

  • 178 Points 100 badge 2x thumb
Hi Denise-

Thanks for the heads up.  I've tested both situations and the results are identical.

It looks like I am not ingesting all SFDC data.

After learning the Reports Builder (18 days post-training into being the full-time Gainsight Admin), it looks like we only have ~415 accounts in GS TOTAL with the Opp stage of Renewal or Auto-Renewal.

In SFDC we have 526 that are more than 120 days out from renewal.

Time to dig into our ingests and figure out why we're missing data.

Thanks

-Jim
Photo of James Whitehead

James Whitehead

  • 188 Points 100 badge 2x thumb
Update: I've identified an (probably THE) issue:

Data ingest.  Specifically ingesting the future/open opp close date from SFDC to GS.  I have another thread going for a different curiosity I have, specifically if you can view when a specific GS field was last updated.

https://community.gainsight.com/gainsight/topics/is-it-possible-to-view-when-a-specific-field-was-up...

I spoke with our CCO and he said there was a data ingest issue with the last admin where GS would only ingest older closed/won opps and it wouldn't ingest the most recent open opp for the current Opportunity Close Date.  

Is there a fix for this issue?

Thanks

-Jim