{"id":6794,"date":"2023-09-21T13:01:02","date_gmt":"2023-09-21T11:01:02","guid":{"rendered":"https:\/\/www.inboxroad.com\/webhook-e-mailgebeurtenissen-afhandelen\/"},"modified":"2024-06-11T14:53:36","modified_gmt":"2024-06-11T12:53:36","slug":"webhook-e-mailgebeurtenissen-afhandelen","status":"publish","type":"page","link":"https:\/\/www.inboxroad.com\/nl\/inleiding\/webhook-e-mailgebeurtenissen-afhandelen\/","title":{"rendered":"Webhook: e-mailgebeurtenissen afhandelen"},"content":{"rendered":"&#13;\n<h2>Introduction<\/h2>&#13;\n<p class=\"wp-block-paragraph\">Inboxroad webhooks bieden realtime meldingen, zodat er snel gereageerd kan worden op e-mailgebeurtenissen zoals afleveringen, bounces of klachten. Deze webhooks bieden waardevolle inzichten in e-mail deliverability, waardoor verfijnde e-mailcampagnestrategie\u00ebn mogelijk worden. Geautomatiseerd lijstbeheer via webhooks helpt bij het bijhouden van schone e-maillijsten, waardoor de kosten dalen en de betrokkenheid van gebruikers toeneemt. Real-time gegevens van webhooks zijn ook in lijn met best practices voor e-mail, waardoor de reputatie van de afzender behouden blijft.<\/p>&#13;\n<h2>1. Overview of Email Events<\/h2>&#13;\n<p>Inboxroad vergemakkelijkt het volgen van:<\/p>&#13;\n<ul>&#13;\n<li>Bounces (&#8220;b&#8221;) &amp; (&#8220;rb&#8221;): Emails that are not delivered, differentiated as HARD and SOFT based on the underlying reason.<\/li>&#13;\n<li>Delivered (&#8220;d&#8221;): Emails that reach the recipient&#8217;s inbox successfully.<\/li>&#13;\n<li>Complaints (&#8220;f&#8221;): Emails reported as spam or considered unwanted.<\/li>&#13;\n<\/ul>&#13;\n<h2>2. Setting up the Webhook for Email Events<\/h2>&#13;\n<ul>&#13;\n<li>Setup an endpoint on your end to receive webhook events.<\/li>&#13;\n<li>Reach out to <a href=\"mailto:contact@inboxroad.com\">contact@inboxroad.com<\/a>, mention your endpoint and we\u2019ll handle the rest.<\/li>&#13;\n<\/ul>&#13;\n<h2>3. Email Event Payload Structure and Sample<\/h2>&#13;\n<p>Wanneer een e-mailgebeurtenis plaatsvindt, stuurt Inboxroad een HTTP POST-verzoek met gedetailleerde payloadinformatie. Hier is een overzicht:<\/p>&#13;\n<ul>&#13;\n<li>type: Represents the event type (\u201cb\u201d for bounced, \u201crb\u201d for remote bounced, &#8220;d&#8221; for delivered, &#8220;f&#8221; for complaints).<\/li>&#13;\n<li>timeLogged: Timestamp marking when the event was logged.<\/li>&#13;\n<li>orig: Sender&#8217;s email address.<\/li>&#13;\n<li>rcpt: Recipient&#8217;s email address.<\/li>&#13;\n<li>dsnAction: Delivery status notification action.<\/li>&#13;\n<li>dsnStatus: Delivery status notification&#8217;s status.<\/li>&#13;\n<li>dsnDiag: Diagnostic information from the SMTP.<\/li>&#13;\n<li>bounceCat: The category of the bounce.<\/li>&#13;\n<li>rcvSmtpUser: The SMTP user who received the email.<\/li>&#13;\n<li>header_Message-Id: A unique identifier for the email.<\/li>&#13;\n<li>vmta: The Virtual Mail Transfer Agent used.<\/li>&#13;\n<\/ul>&#13;\n<p>\u00a0<\/p>&#13;\n<p>De payload moet het volgende formaat hebben:<\/p>&#13;\n\r\n<pre class=\"wp-block-code\" title=\"payload\"><code class=\"language-json\" lang=\"json\">\r\njson\r\n\r\n{\r\n    \"type\": \"d\",\r\n    \"timeLogged\": \"1695222842\",\r\n    \"orig\": \"adress@rp.domain.com\",\r\n    \"rcpt\": \"example@domain.net\",\r\n    \"dsnAction\": \"relayed\",\r\n    \"dsnStatus\": \"2.0.0 (success)\",\r\n    \"dsnDiag\": \"smtp;250 2.0.0 OK\",\r\n    \"bounceCat\": \"other\",\r\n    \"rcvSmtpUser\": \"user\",\r\n    \"header_Message-Id\": \"&lt;80894b937274b975f9e3ab05f0a009636d2016d9@rp.domain.com&gt;\",\r\n    \"vmta\": \"a000\"\r\n}<\/code><\/pre>\r\n\r\n<h2>4. Bounce Classification with BOUNCE_MAPPER<\/h2>\r\n<p>Inboxroad provides a granular bounce classification system to enable precise actions based on the bounce&#8217;s nature. This is categorized using the bounceCat field in the payload, as:<\/p>\r\n\r\n<pre class=\"wp-block-code\" title=\"\"><code class=\"language-json\" lang=\"json\">\r\npython\r\n\r\nBOUNCE_MAPPER = {\r\n    'message-expired': 'EXPIRED',\r\n    'bad-mailbox': 'HARD',\r\n    'bad-domain': 'HARD',\r\n    'quota-issues': 'SOFT',\r\n    'inactive-mailbox': 'SOFT',\r\n    'no-answer-from-host': 'SOFT',\r\n    'relaying-issues': 'SOFT',\r\n    'routing-errors': 'SOFT'\r\n}\r\n<\/code><\/pre>\r\n<p>Leverage this mapper to ascertain the nature of each bounce (e.g., HARD, SOFT, EXPIRED).<\/p>\r\n<h2>5. Handling Email Events<\/h2>\r\n<p>For Bounces (\u201cb\u201d) &amp; (\u201crb)\u201d: Use the BOUNCE_MAPPER to classify and act. For example:<\/p>\r\n<ul>\r\n<li>HARD bounces typically highlight persistent issues. These should not be targetted in your next campaign(s).<\/li>\r\n<li>SOFT bounces might be transient, necessitating careful observation before action. Monitor the soft bounces and exclude them from your list after 5 occurrences.<\/li>\r\n<\/ul>\r\n<p>For Delivered (&#8220;d&#8221;): Analyze, log, and respond as suitable for your application.<\/p>\r\n<p>For Complaints (&#8220;f&#8221;): Don\u2019t target these anymore since they\u2019ve complained on one of your campaigns.<small><\/small><\/p>\r\n\r\n\r\n&#13;\n<h2 class=\"wp-block-heading\">Neem contact met ons op als je hulp nodig hebt<\/h2>&#13;\n\r\n\r\n&#13;\n<p class=\"wp-block-paragraph\">Neem contact op met <a href=\"https:\/\/www.inboxroad.com\/contact\/\" data-type=\"link\" data-id=\"https:\/\/www.inboxroad.com\/contact\/\">ons ondersteuningsteam<\/a> als je hulp nodig hebt.<\/p>&#13;\n","protected":false},"excerpt":{"rendered":"<p>&#13; Introduction &#13; Inboxroad webhooks bieden realtime meldingen, zodat er snel gereageerd kan worden&#8230;<\/p>\n","protected":false},"author":4,"featured_media":6447,"parent":6852,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-documentation.php","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"class_list":["post-6794","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/pages\/6794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/comments?post=6794"}],"version-history":[{"count":0,"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/pages\/6794\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/pages\/6852"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/media\/6447"}],"wp:attachment":[{"href":"https:\/\/www.inboxroad.com\/nl\/wp-json\/wp\/v2\/media?parent=6794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}