
{"id":1997,"date":"2018-10-01T22:17:29","date_gmt":"2018-10-01T12:17:29","guid":{"rendered":"https:\/\/whispir.wpengine.com\/?p=1997"},"modified":"2024-12-23T16:37:09","modified_gmt":"2024-12-23T05:37:09","slug":"whispir-callbacks-enhanced-error-handling","status":"publish","type":"post","link":"https:\/\/www.whispir.com\/en-sg\/blog\/whispir-callbacks-enhanced-error-handling","title":{"rendered":"Whispir callbacks &#8211; enhanced error handling"},"content":{"rendered":"<section class=\"pt-12 md:pt-16 pb-20 md:pb-30 | bg-primary text-primary\">\n<div class=\"RichText_RichTextComponent__iZ2s5 text-body\" data-component=\"RichText\">\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">As part of Whispir&#8217;s continuous improvement programme, in the coming weeks, Whispir will be providing enhancements to the way that callback errors are handled.<\/p>\n<h3 class=\"ts-h3 text-primary | mt-[1.14em] first:mt-0\">What are callbacks?<\/h3>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">Whispir currently has the capability to POST responses to Whispir Messages back to customer applications through the use of callbacks (sometimes called webhooks).<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">Using this capability, customers don&#8217;t need to poll Whispir looking for responses to messages, instead this information will be provided as soon as it is made available.<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">This process is much faster for both customers and Whispir, and is the industry standard for transferring data that is made available asynchronously.<\/p>\n<h3 class=\"ts-h3 text-primary | mt-[1.14em] first:mt-0\">What happens if my service isn&#8217;t available?<\/h3>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">Currently, Whispir will send customers an email with every failed callback.\u00a0 Customers can then triage these emails and insert them into their back end applications as needed.<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">While this works with smaller numbers, with larger sendouts there is potential for Whispir to send hundreds or even thousands of emails when callbacks fail.<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">This isn&#8217;t an ideal solution<\/p>\n<h3 class=\"ts-h3 text-primary | mt-[1.14em] first:mt-0\">What is the alternative?<\/h3>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">In the next release, Whispir will be enhancing the way that callback failures are handled.\u00a0 Instead of sending an email for every callback, Whispir will instead send a single email to advise that the callback endpoint had an issue, and if the new feature is enabled Whispir will periodically retry the callback until it is successful.<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">This process will continue periodically (~ every 5m) for 24 hours from the original call that detected a failure.\u00a0 After 24 hours no further retries will be attempted for that particular response.<\/p>\n<h3 class=\"ts-h3 text-primary | mt-[1.14em] first:mt-0\">What happens after 24 hours?<\/h3>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">If Whispir cannot contact your service for 24 hours there&#8217;s only two explanations, it&#8217;s been turned off intentionally, or there has been a large failure.<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">In either case, the callback will no longer be automatically retried; we&#8217;ve given you enough time, now the onus is on you.<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">To make it easy for you, we&#8217;ve provided a new API endpoint `\/callbacks\/:id\/calls`.\u00a0 This endpoint contains all of the attempts to access your callback, both successful and unsuccessful.<\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">Users can use this to write a script to process all of the callback attempts.\u00a0 Once processed, users can use a `PUT` request to any of the calls listed to update the status from\u00a0<span class=\"font-bold\">failed<\/span>\u00a0to\u00a0<span class=\"font-bold\">successful<\/span>.<\/p>\n<h3 class=\"ts-h3 text-primary | mt-[1.14em] first:mt-0\">How do I enable this feature?<\/h3>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">To support backwards compatibility we&#8217;ve decided to have this feature off by default.\u00a0 To turn it on, simply log into Whispir and under the Administration console select Company Settings -&gt; Portals &amp; Apps -&gt; Manage API Callbacks. Locate your callback entry and click\u00a0<span class=\"font-bold\">Edit<\/span>. You can set retries to be enabled or disabled in this screen.<\/p>\n<h3 class=\"ts-h3 text-primary | mt-[1.14em] first:mt-0\">Questions \/ Contact<\/h3>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">If you&#8217;ve got any further questions or would like to know more about this feature, please contact\u00a0<a class=\"underline font-bold text-body text-primary\" href=\"mailto:support@whispir.io\" target=\"_blank\" rel=\"noopener noreferrer\">support@whispir.io<\/a><\/p>\n<p class=\"ts-body text-primary mt-[1.5em] first:mt-0\">For more information, please visit our callbacks page on\u00a0<a class=\"underline font-bold text-body text-primary\" href=\"https:\/\/github.com\/whispir\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/whispir\/<\/a><\/p>\n<\/div>\n<\/section>\n<div class=\"space-y-4\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>As part of Whispir&#8217;s continuous improvement programme, in the coming weeks, Whispir will be providing enhancements to the way that callback errors are handled. What are callbacks? Whispir currently has the capability to POST responses to Whispir Messages back to customer applications through the use of callbacks (sometimes called webhooks). Using this capability, customers don&#8217;t [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1999,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":"","_links_to":"","_links_to_target":""},"categories":[41],"tags":[],"study-solution-blog-resource":[],"solutions-blogs-resources":[],"features-blogs-resources":[100],"topic":[],"industry":[],"class_list":["post-1997","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation-and-ai","features-blogs-resources-message-builder","entry","has-media"],"_links":{"self":[{"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/posts\/1997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/comments?post=1997"}],"version-history":[{"count":0,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/posts\/1997\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/media\/1999"}],"wp:attachment":[{"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/media?parent=1997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/categories?post=1997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/tags?post=1997"},{"taxonomy":"study-solution-blog-resource","embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/study-solution-blog-resource?post=1997"},{"taxonomy":"solutions-blogs-resources","embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/solutions-blogs-resources?post=1997"},{"taxonomy":"features-blogs-resources","embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/features-blogs-resources?post=1997"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/topic?post=1997"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.whispir.com\/en-sg\/wp-json\/wp\/v2\/industry?post=1997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}