Recently, Birchbox moved non-transactional emails from Selligent to Braze(tech doc). This page is mainly a quick reference of braze events being sent within Magento.
All Braze configurations(endpoint url, api key, threshold etc) could be found in magento admin UI. They are under System -> Configuration -> Birchbox APIs.
relevant code is here
In Magento, there is a helper class(EventPost.php) which includes all the fundamental methods(read configurations, send post request to Braze endpoint) for braze event post.
Any further implementations should also go to this class to avoid duplicated code.
There two places where we send user track purchases object to Braze endpoint.
payload:
{
"api_key": "",
"purchases": [
{
"external_id": "",
"properties": {
"product_type": "",
"sku": "",
"name": "",//order item name
"qty":
},
"time": "", //ISO-8601
"name": "expired_gift",
"product_id": ,//order item id
"price": ,
"currency":
}
]
}
expired gift:code
payload:
{
"api_key": "",
"events": [
{
"external_id": "",
"properties": {},
"time": "", //ISO-8601
"name": "expired_gift"
}
]
}
order is shipped: code
payload:
{
"api_key": "",
"events":[
{
"external_id": "",
"properties": {},
"time": "",//ISO-8601
"name": "fullsize_has_shipped"
}
],
}
check for vip dollar spent: code
There is check_for_vips.php in the same directory.It is an older version of check_for_vips_dollars_spent.php so it would possibly be removed later but you could refer code here
payload:
{
"api_key": "",
"events": [
{
"external_id": "",
"properties": {},
"time": "", //ISO-8601
"name": "vip_earned"
}
]
}