📢 Use this project, contribute to it or open issues to help evolve it using Store Discussion.
The Marketer is an application that connects VTEX to The Marketer platform in order to send events, data about orders, products, categories, brands and users and thus allowing you to send newsletters and integrate loyalty programs.
- Access the Apps section in your account's admin page and look for the "The Marketer" box;
- Then, click on the Install button;
- Add the tracking key, rest API key, customer ID settings from The Marketer platform and configuration of the feed generation crons
- Click on Save.
- Replace
{account}
with the actual account name in VTEX - Go to the https://{account}.ds.vtexcrm.com.br page > Triggers
- We will create 3 triggers on the
CL
(Clients) entity with the following names:- Subscribe theMarketer (ON INSERT)
- Subscribe theMarketer (ON UPDATE)
- Unsubscribe theMarketer (ON UPDATE)
- For the
Rules
tab, add a new filter onRecebe Newsletter?
, conditionIgual
, valueTrue
andTrigger rule
should beUm registro for inserido
- For the
Schedule
tab, tickRun ASAP
- For the
If positive
tab- Action should be
Send an HTTP request
- Method should be
POST
- URL: https://{account}.myvtex.com/themarketer/webhooks/subscribe
- Content as JSON should be:
- Action should be
{
"email": "{!email}",
"firstName": "{!firstName}",
"lastName": "{!lastName}",
"phone": "{!phone}"
}
- For the
Rules
tab, add a new filter onRecebe Newsletter?
, conditionIgual
, valueTrue
andTrigger rule
should beUm registro for alterado
- For the
Schedule
tab, tickRun ASAP
- For the
If positive
tab- Action should be
Send an HTTP request
- Method should be
POST
- URL: https://{account}.myvtex.com/themarketer/webhooks/subscribe
- Content as JSON should be:
- Action should be
{
"email": "{!email}",
"firstName": "{!firstName}",
"lastName": "{!lastName}",
"phone": "{!phone}"
}
- For the
Rules
tab, add a new filter onRecebe Newsletter?
, conditionIgual
, valueFalse
andTrigger rule
should beUm registro for alterado
- For the
Schedule
tab, tickRun ASAP
- For the
If positive
tab- Action should be
Send an HTTP request
- Method should be
POST
- URL: https://{account}.myvtex.com/themarketer/webhooks/unsubscribe
- Content as JSON should be:
- Action should be
{
"email": "{!email}"
}
The reason why there are 3 triggers instead of 2 is that on the If Negative
tab, the adding new action functionality doesn't work properly, therefor we need a third trigger for the unsubscribe event
Thanks goes to these wonderful people (emoji key):
Razvan Udrea 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!