unomi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Huber <shu...@apache.org>
Subject Re: Merge Profiles based on Multiple Properties
Date Thu, 08 Nov 2018 07:56:44 GMT
Hello Michael,

I would suggest that you either try to activate some logging or
connect a debugger. That's what I usually do when trying to figure out
those types of issues.

You can launch Karaf in debugging simply by using the command line :
./karaf debug

And then connect a remote debugging session on port 5005.

I hope this helps,
Regards,
  Serge...

On Wed, Nov 7, 2018 at 5:55 PM Michael Ghen <mike@mikeghen.com> wrote:
>
> It looks like this rule is working just not as I expected it to.
>
> I have to profiles that share the same properties.ssn. When I update a property in one
of the profiles (the one created last), it updates the property of the other profile. Seems
like the two profiles are in a one-way sync, changes on one profile are reflected on the other.
>
> Unfortunately, the mergedWith property is still null. I would expect that when the profiles
are merged based on the rule, it would set the mergedWith to the itemId of the merged profile.
Am I missing something to get this mergedWith property to be set?
>
> On Tue, Nov 6, 2018 at 2:24 PM Michael Ghen <mike@mikeghen.com> wrote:
>>
>> Here is the rule I created, after I run this I then create two profiles with the
same SSN. Unfortunately, I see the mergedWith attribute is null for both profiles.
>>
>> require 'httparty'
>> require 'json'
>>
>> rule = {
>>   metadata: {
>>     id: "exampleMerger",
>>     name: "Example Merger",
>>     description: "Dedup on SSN"
>>   },
>>   condition: {
>>     type: "profileUpdatedEventCondition",
>>     parameterValues: { }
>>   },
>>   actions: [
>>     {
>>       parameterValues: {
>>         mergeProfilePropertyValue: "eventProperty::target.properties(ssn)",
>>         mergeProfilePropertyName: "mergeIdentifier"
>>       },
>>       type: "mergeProfilesOnPropertyAction"
>>     }
>>   ]
>> }
>>
>> request = HTTParty.post("http://127.0.0.1:8181/cxs/rules",
>>   body: rule.to_json,
>>   basic_auth: { username: "karaf", password: "karaf" },
>>   headers: {
>>     "Content-Type" => "application/json"
>>   })
>>
>> if request.code != 200
>>   raise "Unable to create rule: #{request}"
>> end
>>
>> Even though I get a 204 response, I see the rule is created in /cxs/rules.
>>
>> On Tue, Nov 6, 2018 at 11:38 AM Michael Ghen <mike@mikeghen.com> wrote:
>>>
>>> Hello again,
>>>
>>> I am trying to set up Unomi so that profiles are merged based on first name,
last name, and SSN. I'm not finding a clear example for exactly how to do this. I would like
to get an example working and add it to this tutorial I have going.
>>>
>>> It looks like I need to set up a rule for this, I'm thinking I can use the profileUpdatedEventCondition.
What I'm confused about is what the action should look like? I see the note in the documentation
about MergeProfileOnPropertyAction. I'm just not sure how the rule JSON should look.
>>>
>>> Also, it seems like only 1 property can be used for merging profiles, is that
correct?
>>>
>>>

Mime
View raw message