Handling scheduled transactional email batches

Hello,

We have a service running on our application that allows us to send transactional emails to customers whose file status requires them to take action.

We would like to offer the possibility of scheduling a single wave of emails to be sent at a specific time despite the service being launched several times a day.

We communicate with Brevo via the API using the C# nugget (https://github.com/getbrevo/brevo-csharp).

To schedule the emails, we use the sendTransacEmail method, visible here https://developers.brevo.com/reference/sendtransacemail, to which we pass a date for the scheduledAt parameter, and a UUIDv4 converted to a string for the batchId parameter.

The scheduling works well, and the emails are correctly sent at the desired time.

However, when we try to retrieve the list of emails associated with this batchId, the https://developers.brevo.com/reference/getscheduledemailbyid method returns a document_not_found error with the message ‘Record not found for batchId/messageId’.

If we pass one of the messageId’s as a parameter, this method works correctly.

We also tried using the https://developers.brevo.com/reference/deletescheduledemailbyid method to see if it worked better, and also because it’s something we’d like to implement if we need to cancel a send, but this time we get the ‘Record not found for batchId/messageId’ message whether we pass the batchId or one of the messageId’s which works with the get method.

Has anyone encountered this problem before?

Thank you in advance for any help you can give us.

Guilhem

French version :
Bonjour,
Nous avons un service qui tourne sur notre application permettant de lancer l’envoi de mails transactionnels pour des clients dont l’état de leur dossier nĂ©cessite une action de leur part.
Nous souhaitons offrir la possibilitĂ© de programmer une seule vague d’envoi de mails Ă  une heure prĂ©cise malgrĂ© le lancement multiple du service dans la journĂ©e.

Nous communiquons avec Brevo via l’API à l’aide du nugget C# (GitHub - getbrevo/brevo-csharp).
Pour la programmation des mails, nous utilisons la mĂ©thode sendTransacEmail, visible ici Send a transactional email, Ă  laquelle nous passons une date pour le paramĂštre scheduledAt, ainsi qu’un UUIDv4 converti en string pour le paramĂštre batchId.

La programmation fonctionne bien, et les mails sont correctement envoyĂ© Ă  l’heure souhaitĂ©e.

Toutefois, lorsque nous essayons de rĂ©cupĂ©rer la liste des mails associĂ© Ă  ce batchId, la mĂ©thode Fetch scheduled emails by batchId or messageId nous renvoi une erreur de type : document_not_found avec le message « Record not found for batchId/messageId Â».

Si nous passons un des messageId en paramÚtre, cela fonctionne par contre correctement pour cette méthode.

Nous avons Ă©galement essayĂ© d’utiliser la mĂ©thode https://developers.brevo.com/reference/deletescheduledemailbyid pour voir si cela fonctionnait mieux, et car c’est Ă©galement quelque chose que nous souhaiterions implĂ©menter si besoin d’annuler un envoi, mais cette fois-ci nous recevons le message document_not_found que l’on passe le batchId ou l’un des messageId qui pourtant fonctionne avec la mĂ©thode get.

Est-ce que quelqu’un a dĂ©jĂ  rencontrĂ© ce problĂšme ?

Merci d’avance pour l’aide que vous pourrez nous apporter.

In reply to the first message.

We ran the tests again today, and this time everything works as expected.
In other words, the GET and DELETE methods work with the batchId even though we haven’t made any changes on our end.

We assume that this was an occasional service malfunction on the Brevo side.


French version :
Pour répondre au premier message.

Nous avons refait des tests aujourd’hui, et cette fois-ci tout fonctionne comme attendu.
A savoir que les mĂ©thodes GET et DELETE fonctionnent avec le batchId alors que nous n’avons opĂ©rĂ© aucune modification de notre cĂŽtĂ©.

Nous supposons qu’il s’agissait d’un disfonctionnement ponctuel du service cĂŽtĂ© Brevo.

1 Like