Confused about custom pause/unsubscribe in "marketing/transactional" content

Hi everyone,
I am trying to setup a project with the following type of notifications:

  1. standard transactional emails : confirm email, recover password, etc
  2. notification emails: each user sets up a bunch of notifications that he wants to receive. These I think count as transactional, but at the same time I send to several users with different content.
  3. Weekly newsletter, where I include a big block of content dynamically generated in my app (this is marketing).

I have created in my app options to subscribe/unsubscribe from the weekly newsletter and the individual notification items. However I initially thought that I can just pass in my apps unsubscribe link for marketing emails too, but Brevo does that automatically. My questions are:

Does 2 count as transactional and is it ok to use my own links towards the notification on/off page?
I want to keep email 3 as marketing. How can I sync my database with the Brevo unsubscribe thing so that I can set the status in my app?
Also, if someone chooses to resubscribe in my app, can I somehow re-add them to the marketing list?

Thank you for your help in figuring this out, it is much appreciated :slight_smile:

Hello Mircea,

To all your questions, I answer YES.

I solved these same questions but by coupling php/mysql development / brevo API. I’ll give you some ideas :

First question: custom fields can be integrated into email templates (see the documentation) and their content exported from your application (with the brevo API)

Second question: see the documentation and the API about webhocks (unsubscribe)

Third question; it’s entirely possible with the API with updateEnabled = true
https://developers.brevo.com/reference/createcontact

Good luck and… get to work! :slightly_smiling_face:

1 Like

Thanks Phil, I’ll take a look for the Webhooks as that I did not solve yet. 1 and 3 I did :slight_smile:

Hi !

https://developers.brevo.com/docs/marketing-webhooks#unsubscribe

Here is a very little gift for reading json / unsubscribe

<?php
//begin::test
//$entityBody = file_get_contents('webhookunsuscribe.json');
//end::test

//weebHook - ->convert json object to php associative array
$entityBody = file_get_contents('php://input');

//convert json object to php associative array

$quoteJson = json_decode($entityBody);

                                                                                                  
$email= $quoteJson->email;