Expand my Community achievements bar.

Using Array Objects appends data when two records are merged?

Avatar

Level 2

Hi All,

 

Need your advice, we are using array object to store the indicators data like below,

Ankita05_0-1680774411498.png

Now when 2 record are merging which are having the exact same data within their respective arrays , merged record in the profile store is having duplicate data in array coming from both the records. Is this this usual array behavior or am I missing some setting?

Data from 2 records that are merging :

Record 1:

"ID": "1",
"email": "testemail123@gmail.com",
"T_Indicator": [{

"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
},{
"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
}]}

 

Record 2:

"ID": "2",
"email": "testemail123@gmail.com",
"T_Indicator": [{

"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
},{
"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
}]}

Output

"T_Indicator": [{

"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"},

{"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05" },

{"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"},

{"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"}]



2 Replies

Avatar

Employee Advisor

@Ankita05 

Do you get the same behaviour when on a 'Timestamp ordered' merge policy? 

       |   In the event of a conflict, priority is given to the profile fragment which was updated most recently

 

See Merge policies overview