I have a query with profiles and I want as additional data the name of the campaign where is located the workflow where is running the query.
So for instance, I have
Inside "Campaign A" there is "Workflow A"
I run a query on "workflow a" and I want as additional data 'Campaign A'
I guess I need something like context.workflow.campaign.name but this doesn't work.
When querying directly on profile resource, the Workflow and Campaign details are not directly exposed in the table links. However what you can do is configure a second query on the Workflow resource itself and then use an enrichment to join the Campaign details to the profile records.
First, set the profile query (add an additional column with a value set to 1)
Second, set the workflow query conditions to target the current workflow from which you are building (adding the Campaign Id and Campaign Label, also add an additional column with a value set to 1... same as above)
Third, you will configure an enrichment using Profile as the primary set and using the additional columns (each set to 1) as the join condition. Within the enrichment after you set the join, also add the Campaign Id and Label as Additional Data.
Final result gives all of the profiles you queried (workflow still remains on the profile resource as the targeting dimension) but now all of the additional data from the Campaign itself is included as added columns.