Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

How to retrieve campaign name from its workflow

gabrieleg615679
Level 3
Level 3

Hi,

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

CAMPAIGN A

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.

 

Kr

Gabriele

1 Reply
kpotts1985
Employee
Employee

Hi Gabriele, 

 

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.

 

kpotts1985_0-1620770365515.png

 

First, set the profile query (add an additional column with a value set to 1)

kpotts1985_2-1620770588835.png

 

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)

kpotts1985_3-1620770637656.png

 

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.

kpotts1985_4-1620770671161.png

 

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.

kpotts1985_1-1620770533524.png

 

-KP