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 « J'aime »