Skip to main content
james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018
Question

Rules Engine Struggle: Issues writing to SFDC

  • May 17, 2018
  • 15 replies
  • 206 views
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

[i]
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

15 replies

jeffrey_coleman
Helper ⭐️
May 17, 2018
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.
jitin_mehndiratta
Helper ⭐️⭐️⭐️
May 17, 2018
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
james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018
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
james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018

james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018

james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018

james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018

james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018

james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018

james_whitehead
Contributor ⭐️⭐️⭐️⭐️⭐️
May 17, 2018
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