Skip to main content

Hi, I have a question about journey orchestrator and using query builder to pull in participants. If I pull in different types of contacts per account for a query and want to prioritize who I contact for that send how can I do this in query builder? For example, I am pulling in all contacts that are contact role a, b or c. If an account has a contact with role a I want to contact that person, if they don't have one with contact role a I want to reach out to contact b, and if they don't have b I want to reach out to contact with role c. Any input/tips would be greatly appreciated!

I think you could do this by using a Pivot on Company so you would end up with a row per company with contact role a, role b, role c and then filter in a Transformation Task (Role A not equal to null OR Role A Null AND Role B not Equal to Null OR Role A Null AND Role B Null AND Role C Not Equal to Null). This assumes that there is only one contact role per account (e.g. no accounts have two contacts for Role A).


Thanks @john_apple for taking a look!  The accounts do have more than one contact for each role unfortunately, but I will keep pivot tables in mind for the future.  My colleague suggested Transforms with case expressions with similar logic so I am going to try that and see if I can get that to work.  Any other suggestions are greatly appreciated!


Reply