HubSpot Ideas

JBrake

Dynamic Filtering using GraphQL in programmatic emails

It would be great to be able to use GraphQL to load dynamic content in email templates. 


For example, I have an Email that has be triggered by a deal in a workflow. In that deal is a custom object, lets say an Event. I would like the details of said event to appear on the email loaded via the triggering deal, and the Event ID in the deal and not by association.

 

{% set event = data_query.data.CRM.Event($id=

personalization_token('deal.event_id', '0')

) %}

or,

 

In an e-commerce email triggered by a deal,  a list of related products based on filters created by line items in the deal. AKA "You may also like" or "Other customers also bought".

 

{% set relatedProducts = data_query.data.CRM.ProductListFilter(

filter: {product_category__in: ["pet food","flea treatment"]) %}

 

Regards,

Jonathan

2 Replies
nznicko
Member | Elite Partner

Yes please!! 

romi
Contributor | Elite Partner

This is critical for for building out more sophisticated email campaigns and solutions.