Skip to main content
Solved

Upsert not working properly.


Justin Bills
Forum|alt.badge.img+2

Hello -  

 

I’m attempting to create a data space that houses some survey data.  The idea here is the customer takes this survey along the road of the customer experience and self assesses their improvements. 

I want to load their answers (which includes a survey answer timestamp) and then as the rule runs daily it should be bring any new people who have answered the survey and also the original people should they take the survey again in say, six months. Use case would be customer X takes the survey on 1/1 and then on 9/1 takes it again after working with the CSM for awhile.  The rules sees the timestamp is different than the 1/1 and makes a new record.  Now the CSM can see both survey responses from teh same person and see what improvements have changes.

 

I have the following identifiers to help assist with this upsert:

GS Company ID

Survey Answered time stamp

email address.

 

Every time I do a test data load it’s just duplicating the information, even though, according to upsert, this data is the same so no action should be taken.  Is there a step I’m missing that’s causing this duplicate data to populate?

Best answer by phani_kumar

Hi @Justin Bills 

I guess if you are working with Data Designer to create your Survey Data Space Object. By default, the Data Designer works as Upsert Operation.

But, if you are using Rules, please convert the “Survey Answered timestamp” field to Date Data Type and use that as one of your identifiers. And in the rule execution history every time it shows success records count even though there are no New records. 

For ex: if you run the rule in Live and 200 records are created in the Object and in the next minute again if you run the rule and if we check the execution history we can see 200 records got successed.

But if we validate the Object we can see only 200 records, not 400 records.

 

Thanks.

View original
Did you find this topic helpful?

4 replies

sai_ram
Forum|alt.badge.img+1
  • Expert ⭐️⭐️
  • 3727 replies
  • January 22, 2021

@Justin Bills sorry for the inconvenience. Let me check this and get back to you.


Justin Bills
Forum|alt.badge.img+2
  • Author
  • Helper ⭐️
  • 20 replies
  • January 22, 2021

Thanks @sai_ram - So it appears that duplicates aren’t getting generated after I cleared the data source and ran it again a few times.  What is confusing is that the logs show that the rule succeeded and 200 accounts passed and none failed.

 

What I would have expected to see here was that 0 accounts passed because none of them meet the criteria to be upserted. 

 

 


phani_kumar
Forum|alt.badge.img+3
  • Gainsight Employee ⭐️⭐️
  • 332 replies
  • Answer
  • January 25, 2021

Hi @Justin Bills 

I guess if you are working with Data Designer to create your Survey Data Space Object. By default, the Data Designer works as Upsert Operation.

But, if you are using Rules, please convert the “Survey Answered timestamp” field to Date Data Type and use that as one of your identifiers. And in the rule execution history every time it shows success records count even though there are no New records. 

For ex: if you run the rule in Live and 200 records are created in the Object and in the next minute again if you run the rule and if we check the execution history we can see 200 records got successed.

But if we validate the Object we can see only 200 records, not 400 records.

 

Thanks.


Justin Bills
Forum|alt.badge.img+2
  • Author
  • Helper ⭐️
  • 20 replies
  • January 25, 2021

Thanks, it does appear to be working properly now! 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings