Hi guys,
I am finally diving a little deeper into writing PQL audiences and have a beginner question.
Let's say I want to create an audience that includes anyone who has seen at least one web page view.
{
"name": "People with page views",
"profileInstanceId": "ups",
"description": "People who have seen the website i.e., have created at least one page view event",
"type": "SegmentDefinition",
"expression": {
"type": "PQL",
"format": "pql/text",
"value": "exists(event => event.web.webPageDetails.pageViews.value = 1.0)"
},
"schema": {
"name": "XDM ExperienceEvent"
},
"labels": [
"core/C1"
]
}
This body gives me an error
* code: "NEBULA-000000-400",
* message: "There is a problem with the input value. Please check your request and try again."
Any idea what's wrong? Also tried a "==" in the condition with the same result.
Views
Replies
Total Likes
Hey @bjoern__koth ,
I think the issue is with schema name, can you try "_xdm.context.experienceevent" for this field?
Cheers!
Views
Replies
Total Likes
hmm also not really.
{
"name": "People with page views",
"profileInstanceId": "ups",
"description": "People who have seen the website i.e., have created at least one page view event",
"type": "SegmentDefinition",
"expression": {
"type": "PQL",
"format": "pql/text",
"value": "exists(event => event.web.webPageDetails.pageViews.value = 1.0)"
},
"schema": {
"name": "_xdm.context.experienceevent"
},
"labels": [
"core/C1"
]
}
{
"type": "https://ns.adobe.com/aep/errors/NEBULA-000000-400",
"title": "Bad Request",
"status": 400,
"instance": "/audiences",
"request-id": "yhM6CWHP67fCMTcbVTSkzcNjvyqmOSwu",
"errors": {
"400": [
{
"code": "NEBULA-000000-400",
"message": "There is a problem with the input value. Please check your request and try again."
}
]
}
}
Views
Replies
Total Likes
Hey @bjoern__koth ,
In that case it is most probably related to the expression.value field. Can you try one of these,
Views
Replies
Total Likes
Nope, all nebula errors xD
By any chance, can you check if any works on your end?
Views
Replies
Total Likes
Hello @bjoern__koth
this should be the value for PQL/text this is for experienceEvent
"value" : "CHAIN(xEvent, timestamp, [C0: WHAT(web.webPageDetails.pageViews.value = 1.0)])"
for PQL/json
Views
Replies
Total Likes
Hey @bjoern__koth
I suggest using this below PQL expression
"value": "exists event from xEvent where (event.web.webPageDetails.pageViews.value = 1.0)"
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies