You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by Saddam Hussain <sa...@ebizontek.com> on 2018/01/23 06:40:09 UTC
Get personalized list
Hello,
I have created plugin for a site of unomi.
I am able to save profile.
But Segments are not created .
Every profile is saved as new profile.
segments are not created.
It would be very helpfull for me if I got answers of following question:-
1.How to create segments.
2. How to get personalized content if I have PersonalizationService object.
I know I need to call List<String> personalizeList(Profile profile,
Session session, PersonalizationRequest personalizationRequest) function to
get personalized list
but how to create object of PersonalizationRequest .
3.How to create persona.
I hope I am able explain my probelms.
Thanks and regards
Saddam
contact: +919911997403
email: saddam.hussain@ebizontek.com
Re: Get personalized list
Posted by Saddam Hussain <sa...@ebizontek.com>.
Hello Damien,
Thanks for your support.
I think You have described that we can create persona and segments using
rest api, but rest api is not working.
Is there any build we have to do to make rest api working if it is then
what is name of plugin which we need to build and deploy?
Does Unomi not create persona/segments by their own?
How unomi process data to create personalised content?
If there is any documentation for this please share.
Your response really helps me to work on unomi.
I would like to again thanks you for your response.
BR
Saddam
On Tue, Jan 23, 2018 at 3:52 PM, Damien GAILLARD <dg...@jahia.com>
wrote:
> Hello Saddam,
>
> You can create segment through request like:
> POST /cxs/segments
>
> {
> "metadata": {
> "id": "contacts",
> "name": "Contacts",
> "scope": "systemscope",
> "description": "You can customize the list below by editing the
> contacts segment.",
> "readOnly":true
> },
> "condition": {
> "parameterValues": {
> "subConditions": [
> {
> "parameterValues": {
> "propertyName": "properties.email",
> "comparisonOperator": "exists"
> },
> "type": "profilePropertyCondition"
> },
> {
> "parameterValues": {
> "propertyName": "properties.phoneNumber",
> "comparisonOperator": "exists"
> },
> "type": "profilePropertyCondition"
> },
> {
> "parameterValues": {
> "propertyName": "properties.facebookId",
> "comparisonOperator": "exists"
> },
> "type": "profilePropertyCondition"
> },
> {
> "parameterValues": {
> "propertyName": "properties.twitterId",
> "comparisonOperator": "exists"
> },
> "type": "profilePropertyCondition"
> },
> {
> "parameterValues": {
> "propertyName": "properties.linkedInId",
> "comparisonOperator": "exists"
> },
> "type": "profilePropertyCondition"
> }
> ],
> "operator" : "or"
> },
> "type": "booleanCondition"
> }
> }
>
> Your second question is a bit more tricky you need to have a
> personalization system on your website, that allows you to set up two
> variants for one area.
> From there you need to associate condition to those variants and send the
> condition in the personalization request object, look at the following
> functions and their objects:
> personalizationRequest.setContents(List<PersonalizedContent>)
> personalizedContent.setFilters(List<Filter>)
> filter.setCondition(Condition)
>
>
> Last point, there is two ways to create a persona:
> POST /cxs/profiles/personas
>
> {
> "itemId": "europeanVisitor",
> "properties": {
> "description": "Represents a visitor browsing from Europe
> (Switzerland)",
> "firstName": "European",
> "lastName": "Visitor"
> },
> "segments": []
> }
>
> or
> POST /cxs/profiles/personasWithSessions
>
> {
> "persona": {
> "itemId": "europeanVisitor",
> "properties": {
> "description": "Represents a visitor browsing from Europe
> (Switzerland)",
> "firstName": "European",
> "lastName": "Visitor"
> },
> "segments": []
> },
> "sessions": [ {
> "itemId": "51c8e9a8-3db6-41f8-9569-057c339e3017",
> "profileId": "europeanVisitor",
> "properties": {
> "operatingSystemName": "OS X 10.9 Mavericks",
> "sessionCountryName": "Switzerland",
> "location": {
> "lat":46.1884341,
> "lon":6.1282508
> },
> "userAgentVersion": "37.0.2062.120",
> "sessionCountryCode": "CH",
> "deviceCategory": "Personal computer",
> "operatingSystemFamily": "OS X",
> "userAgentName": "Chrome",
> "sessionCity": "Lausanne",
> "remoteHost": "www.epfl.ch",
> "remoteAddr": "128.178.50.12"
> },
> "timeStamp": "2014-09-18T11:40:54Z",
> "lastEventDate": "2014-09-18T11:40:59Z",
> "duration": 4790
> } ]
> }
>
>
> Not sure I answered your questions, let us know if you need more
> information.
>
> Cheers
>
> On Tue, Jan 23, 2018 at 7:40 AM, Saddam Hussain <
> saddam.hussain@ebizontek.com> wrote:
>
> > Hello,
> > I have created plugin for a site of unomi.
> > I am able to save profile.
> > But Segments are not created .
> > Every profile is saved as new profile.
> > segments are not created.
> > It would be very helpfull for me if I got answers of following question:-
> >
> > 1.How to create segments.
> > 2. How to get personalized content if I have PersonalizationService
> object.
> > I know I need to call List<String> personalizeList(Profile profile,
> > Session session, PersonalizationRequest personalizationRequest) function
> to
> > get personalized list
> > but how to create object of PersonalizationRequest .
> >
> > 3.How to create persona.
> >
> > I hope I am able explain my probelms.
> >
> > Thanks and regards
> > Saddam
> > contact: +919911997403
> > email: saddam.hussain@ebizontek.com
> >
>
>
>
> --
> Damien GAILLARD
> Software Developer
> <https://www.jahia.com/cms/render/default/en/sites/
> jahiacom/home/employees/grid-layout/jahia-employee/
> GaillardDamien.signature.html.ajax>
> <https://www.jahia.com/cms/render/default/en/sites/
> jahiacom/home/employees/grid-layout/jahia-employee/
> GaillardDamien.signature.html.ajax>
> 8 rue du sentier | 75002 | France
> <https://www.jahia.com/cms/render/default/en/sites/
> jahiacom/home/employees/grid-layout/jahia-employee/
> GaillardDamien.signature.html.ajax>
> <https://www.jahia.com/cms/render/default/en/sites/
> jahiacom/home/employees/grid-layout/jahia-employee/
> GaillardDamien.signature.html.ajax>
> jahia.com <http://www.jahia.com/>
> SKYPE | TWITTER <https://twitter.com/> | VCARD
> <http://www.jahia.com/vcard/GaillardDamien.vcf>
>
> > JAHIA <http://www.jahia.com/> empowers organizations to create
> sophisticated websites that drive their business growth
>
Re: Get personalized list
Posted by Damien GAILLARD <dg...@jahia.com>.
Hello Saddam,
You can create segment through request like:
POST /cxs/segments
{
"metadata": {
"id": "contacts",
"name": "Contacts",
"scope": "systemscope",
"description": "You can customize the list below by editing the
contacts segment.",
"readOnly":true
},
"condition": {
"parameterValues": {
"subConditions": [
{
"parameterValues": {
"propertyName": "properties.email",
"comparisonOperator": "exists"
},
"type": "profilePropertyCondition"
},
{
"parameterValues": {
"propertyName": "properties.phoneNumber",
"comparisonOperator": "exists"
},
"type": "profilePropertyCondition"
},
{
"parameterValues": {
"propertyName": "properties.facebookId",
"comparisonOperator": "exists"
},
"type": "profilePropertyCondition"
},
{
"parameterValues": {
"propertyName": "properties.twitterId",
"comparisonOperator": "exists"
},
"type": "profilePropertyCondition"
},
{
"parameterValues": {
"propertyName": "properties.linkedInId",
"comparisonOperator": "exists"
},
"type": "profilePropertyCondition"
}
],
"operator" : "or"
},
"type": "booleanCondition"
}
}
Your second question is a bit more tricky you need to have a
personalization system on your website, that allows you to set up two
variants for one area.
From there you need to associate condition to those variants and send the
condition in the personalization request object, look at the following
functions and their objects:
personalizationRequest.setContents(List<PersonalizedContent>)
personalizedContent.setFilters(List<Filter>)
filter.setCondition(Condition)
Last point, there is two ways to create a persona:
POST /cxs/profiles/personas
{
"itemId": "europeanVisitor",
"properties": {
"description": "Represents a visitor browsing from Europe
(Switzerland)",
"firstName": "European",
"lastName": "Visitor"
},
"segments": []
}
or
POST /cxs/profiles/personasWithSessions
{
"persona": {
"itemId": "europeanVisitor",
"properties": {
"description": "Represents a visitor browsing from Europe
(Switzerland)",
"firstName": "European",
"lastName": "Visitor"
},
"segments": []
},
"sessions": [ {
"itemId": "51c8e9a8-3db6-41f8-9569-057c339e3017",
"profileId": "europeanVisitor",
"properties": {
"operatingSystemName": "OS X 10.9 Mavericks",
"sessionCountryName": "Switzerland",
"location": {
"lat":46.1884341,
"lon":6.1282508
},
"userAgentVersion": "37.0.2062.120",
"sessionCountryCode": "CH",
"deviceCategory": "Personal computer",
"operatingSystemFamily": "OS X",
"userAgentName": "Chrome",
"sessionCity": "Lausanne",
"remoteHost": "www.epfl.ch",
"remoteAddr": "128.178.50.12"
},
"timeStamp": "2014-09-18T11:40:54Z",
"lastEventDate": "2014-09-18T11:40:59Z",
"duration": 4790
} ]
}
Not sure I answered your questions, let us know if you need more
information.
Cheers
On Tue, Jan 23, 2018 at 7:40 AM, Saddam Hussain <
saddam.hussain@ebizontek.com> wrote:
> Hello,
> I have created plugin for a site of unomi.
> I am able to save profile.
> But Segments are not created .
> Every profile is saved as new profile.
> segments are not created.
> It would be very helpfull for me if I got answers of following question:-
>
> 1.How to create segments.
> 2. How to get personalized content if I have PersonalizationService object.
> I know I need to call List<String> personalizeList(Profile profile,
> Session session, PersonalizationRequest personalizationRequest) function to
> get personalized list
> but how to create object of PersonalizationRequest .
>
> 3.How to create persona.
>
> I hope I am able explain my probelms.
>
> Thanks and regards
> Saddam
> contact: +919911997403
> email: saddam.hussain@ebizontek.com
>
--
Damien GAILLARD
Software Developer
<https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax>
<https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax>
8 rue du sentier | 75002 | France
<https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax>
<https://www.jahia.com/cms/render/default/en/sites/jahiacom/home/employees/grid-layout/jahia-employee/GaillardDamien.signature.html.ajax>
jahia.com <http://www.jahia.com/>
SKYPE | TWITTER <https://twitter.com/> | VCARD
<http://www.jahia.com/vcard/GaillardDamien.vcf>
> JAHIA <http://www.jahia.com/> empowers organizations to create
sophisticated websites that drive their business growth