Simple Event-based PQL question | Community
Skip to main content
bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
August 22, 2025
Question

Simple Event-based PQL question

  • August 22, 2025
  • 2 replies
  • 2500 views

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.

2 replies

Harveer_SinghGi1
Community Advisor
Community Advisor
August 22, 2025

Hey @bjoern__koth ,

I think the issue is with schema name, can you try "_xdm.context.experienceevent" for this field?

Cheers!

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
August 22, 2025

@harveer_singhgi1 

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." } ] } }
Cheers from Switzerland!
sreeCharan73
September 5, 2025

Hi @harveer_singhgi1 

 

Nope, all nebula errors xD

By any chance, can you check if any works on your end?


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

"format": "pql/json",
"value": "{\"nodeType\":\"chain\",\"array\":{\"nodeType\":\"fieldLookup\",\"fieldName\":\"xEvent\",\"object\":{\"nodeType\":\"parameterReference\",\"position\":1}},\"timestampField\":{\"nodeType\":\"lambda\",\"varNames\":[\"v0\"],\"body\":{\"nodeType\":\"fieldLookup\",\"fieldName\":\"timestamp\",\"object\":{\"nodeType\":\"varRef\",\"varName\":\"v0\"}}},\"elements\":[{\"nodeType\":\"element\",\"name\":\"C0\",\"negated\":false,\"what\":{\"nodeType\":\"lambda\",\"varNames\":[\"v0\"],\"body\":{\"nodeType\":\"fnApply\",\"fnName\":\"=\",\"params\":[{\"nodeType\":\"fieldLookup\",\"fieldName\":\"value\",\"object\":{\"nodeType\":\"fieldLookup\",\"fieldName\":\"pageViews\",\"object\":{\"nodeType\":\"fieldLookup\",\"fieldName\":\"webPageDetails\",\"object\":{\"nodeType\":\"fieldLookup\",\"fieldName\":\"web\",\"object\":{\"nodeType\":\"varRef\",\"varName\":\"v0\"}}}}},{\"nodeType\":\"literal\",\"literalType\":\"Double\",\"value\":1.0}]}}}]}"
 
the conversion from PQL/text to PQL/Json can be done using  API
https://developer.adobe.com/experience-platform-apis/references/segmentation/#operation/convertSegmentDefinition


Hope this works
September 1, 2025

Hey @bjoern__koth 

I suggest using this below PQL expression

"value": "exists event from xEvent where (event.web.webPageDetails.pageViews.value = 1.0)"
I tried this and got 200. Although for some unknown reason, I can neither see the audience in UI nor fetch that audience details using get endpoint. I hope it works for you!

Thanks,
Ganesh Kumar C