{"id":1493,"date":"2018-03-15T09:50:48","date_gmt":"2018-03-15T14:50:48","guid":{"rendered":"https:\/\/www.teamdesk.net\/blog\/?p=1493"},"modified":"2018-03-15T09:50:48","modified_gmt":"2018-03-15T14:50:48","slug":"call-url-action-option","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/","title":{"rendered":"New option for Call URL action&#8217;s error handling"},"content":{"rendered":"<p>Today, we&#8217;ve added new option to improve Call URL error handling to <a href=\"https:\/\/www.teamdesk.net\/\">TeamDesk<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>Let&#8217;s make a quick recap on Call URL logic:<\/p>\n<ol>\n<li>TeamDesk calls third-party server.<br \/>\nIf there is a network error, roll back all changes and display error message.<\/li>\n<li>Then TeamDesk evaluates response status.<br \/>\nIf status indicates error, roll back all changes and display generic message.<\/li>\n<li>Then TeamDesk evaluate Error Message formula, if not empty.<br \/>\nIf formula evaluates to some text, roll back all changes and display text as error message.<\/li>\n<li>Execute assignments and subsequent triggers and actions normally.<\/li>\n<\/ol>\n<p>This logic works well if third-party server mostly responds with success codes. However it is not always a case.<\/p>\n<p>Consider integration with online payment service. You have your customer&#8217;s credit card on file and call a service to charge credit card. Service responds with error. But what kind of?<\/p>\n<p>It could be the result of malformed request. In this case you should definitely stop processing, fix your <a href=\"https:\/\/www.teamdesk.net\/help\/11.4.4.aspx\">Call URL action<\/a> definition and retry. But what if credit card has expired? In this case you should likely mark the record as &#8220;failed to process&#8221; and notify customer to update credit card information. But at second step TeamDesk aborts all the changes made to the moment and stops all trigger and action execution.<\/p>\n<p>No longer.<\/p>\n<h2>Call URL&#8217;s On Error new option<\/h2>\n<p>New <strong>On Error<\/strong> option controls the behavior at step 2.<\/p>\n<p>If set to <strong>Stop Execution<\/strong> we use old logic &#8211; this option is a default.<\/p>\n<p>If you need greater flexibility, set <strong>On Error<\/strong> to <strong>Continue Execution<\/strong>. Step 2 will be skipped. <span style=\"display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">Error Message formula<\/span>, if set, handles both successful and error responses. The formula has a chance to evaluate response status using new <b>ResponseStatus()<\/b> function. Then it can extract specific error message from server&#8217;s response and abort execution if needed, or return NULL to suppress error and continue execution.<\/p>\n<p>If execution is not aborted, you can use assignments to flag whether the record was successfully processed or not, for example:<\/p>\n<p>If(ResponseStatus() = 200, &#8220;OK&#8221;, &#8220;FAILED!&#8221;) \/\/ to Status<\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, we&#8217;ve added new option to improve Call URL error handling to TeamDesk.<\/p>\n","protected":false},"author":4,"featured_media":1495,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whats-new"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>New option for Call URL action&#039;s error handling - TeamDesk Blog<\/title>\n<meta name=\"description\" content=\"Call URL&#039;s new On Error option provides greater flexibility for error state evaluation and handling. You can now suppress server error and continue trigger and action execution.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New option for Call URL action&#039;s error handling - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"Call URL&#039;s new On Error option provides greater flexibility for error state evaluation and handling. You can now suppress server error and continue trigger and action execution.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-15T14:50:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2018\/03\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kirill Bondar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirill Bondar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/\"},\"author\":{\"name\":\"Kirill Bondar\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"headline\":\"New option for Call URL action&#8217;s error handling\",\"datePublished\":\"2018-03-15T14:50:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/\"},\"wordCount\":342,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg\",\"articleSection\":[\"What's New\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/\",\"name\":\"New option for Call URL action's error handling - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg\",\"datePublished\":\"2018-03-15T14:50:48+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"description\":\"Call URL's new On Error option provides greater flexibility for error state evaluation and handling. You can now suppress server error and continue trigger and action execution.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg\",\"contentUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg\",\"width\":800,\"height\":600,\"caption\":\"Call URL error handling\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/call-url-action-option\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New option for Call URL action&#8217;s error handling\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\",\"name\":\"Kirill Bondar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"caption\":\"Kirill Bondar\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/kirill-bondar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New option for Call URL action's error handling - TeamDesk Blog","description":"Call URL's new On Error option provides greater flexibility for error state evaluation and handling. You can now suppress server error and continue trigger and action execution.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/","og_locale":"en_US","og_type":"article","og_title":"New option for Call URL action's error handling - TeamDesk Blog","og_description":"Call URL's new On Error option provides greater flexibility for error state evaluation and handling. You can now suppress server error and continue trigger and action execution.","og_url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/","og_site_name":"TeamDesk Blog","article_published_time":"2018-03-15T14:50:48+00:00","og_image":[{"width":800,"height":600,"url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2018\/03\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg","type":"image\/jpeg"}],"author":"Kirill Bondar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirill Bondar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/"},"author":{"name":"Kirill Bondar","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"headline":"New option for Call URL action&#8217;s error handling","datePublished":"2018-03-15T14:50:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/"},"wordCount":342,"commentCount":0,"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2018\/03\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg","articleSection":["What's New"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/","url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/","name":"New option for Call URL action's error handling - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#primaryimage"},"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2018\/03\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg","datePublished":"2018-03-15T14:50:48+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"description":"Call URL's new On Error option provides greater flexibility for error state evaluation and handling. You can now suppress server error and continue trigger and action execution.","breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#primaryimage","url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2018\/03\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg","contentUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2018\/03\/b0999e84-db3d-475c-9b9b-101473e3c48e.jpg","width":800,"height":600,"caption":"Call URL error handling"},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/call-url-action-option\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"New option for Call URL action&#8217;s error handling"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2","name":"Kirill Bondar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","caption":"Kirill Bondar"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/kirill-bondar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/1493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=1493"}],"version-history":[{"count":4,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/1493\/revisions"}],"predecessor-version":[{"id":1498,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/1493\/revisions\/1498"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media\/1495"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=1493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=1493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=1493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}