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