{"id":13261,"date":"2024-03-20T15:41:47","date_gmt":"2024-03-20T14:41:47","guid":{"rendered":"https:\/\/helpcenter.blendee.com\/article\/configure-an-api-call-trigger\/"},"modified":"2024-03-20T15:41:48","modified_gmt":"2024-03-20T14:41:48","slug":"configure-an-api-call-trigger","status":"publish","type":"article","link":"https:\/\/helpcenter.streamwise.it\/en\/article\/configure-an-api-call-trigger\/","title":{"rendered":"Configure an API Call Trigger"},"content":{"rendered":"\n<p>An <strong>API Call Trigger<\/strong> allows you to engage a user in real time when an API call is triggered. This trigger can be useful, for example, if you want to use Blendee to create experiences linked to transactional emails (e.g.: Order confirmation, shipment, etc&#8230;).<\/p>\n\n<p>Let&#8217;s take a look at the steps required to configure the trigger<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.42.04.png\" data-lbwps-width=\"365\" data-lbwps-height=\"778\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.42.04.png\"><img data-original=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.42.04.png\" alt=\"\" class=\"wp-image-10638\"\/><\/a><\/figure><\/div>\n<p>To configure this filter, click on Journey -&gt; Trigger -&gt; Real Time, click on New Trigger and in step 3 of the configuration, after setting the configuration in the previous steps, select the &#8220;API Call&#8221; trigger. To learn how to set up all configurations, read the article &#8220;<a href=\"https:\/\/helpcenter.blendee.com\/article\/configurare-un-trigger\/\">Configure a trigger<\/a>&#8220;.<\/p>\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16.png\" data-lbwps-width=\"1907\" data-lbwps-height=\"1048\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1907\" height=\"1048\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16.png\" alt=\"\" class=\"wp-image-10642\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16.png 1907w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16-300x165.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16-1024x563.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16-768x422.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-12.44.16-1536x844.png 1536w\" sizes=\"(max-width: 1907px) 100vw, 1907px\" \/><\/a><\/figure>\n\n<p>Select &#8220;Next&#8221; and Save.<\/p>\n\n<p><br\/>The <strong>API Call Trigger<\/strong> provides specific contextual fields that can be invoked during the creation of flows within the experience. The available data are:<\/p>\n\n<ul class=\"wp-block-list\">\n<li><em>Order number<\/em><\/li>\n\n\n\n<li><em>Name of the first product<\/em> purchased within the order<\/li>\n\n\n\n<li><em>Total Order Import<\/em><\/li>\n\n\n\n<li><em>Date of receipt of the order<\/em><\/li>\n\n\n\n<li><em>Number of products ordered<\/em><\/li>\n\n\n\n<li><em>Dynamic Html<\/em>: allows you to pass to Blendee the HTML code to be used to build the customization (e.g. html template of an email)<\/li>\n\n\n\n<li><em>List of purchased products<\/em> in the order<\/li>\n<\/ul>\n\n<p>Below is an example of how to insert Dynamic Html into the Blendee email editor.<\/p>\n\n<p>Create a new <a href=\"https:\/\/helpcenter.blendee.com\/article\/come-creare-delle-nuove-esperienze\/\" target=\"_blank\" rel=\"noopener\">Experience<\/a> within the <a href=\"https:\/\/helpcenter.blendee.com\/article\/come-creare-una-nuova-campagna\/\" target=\"_blank\" rel=\"noopener\">Campaign Manager<\/a> from the API trigger you created<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49.png\" data-lbwps-width=\"1907\" data-lbwps-height=\"967\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1907\" height=\"967\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49.png\" alt=\"\" class=\"wp-image-10644\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49.png 1907w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49-300x152.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49-1024x519.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49-768x389.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.13.49-1536x779.png 1536w\" sizes=\"(max-width: 1907px) 100vw, 1907px\" \/><\/a><\/figure><\/div>\n<p>Insert an <strong>email block<\/strong> into the experience flow, connect it to the starting trigger, and access the email content configuration.<\/p>\n\n<p>Insert an <strong>HTML block<\/strong> inside the <a href=\"https:\/\/helpcenter.blendee.com\/article\/introduzione-allutilizzo-delle-mail-editor\/\" target=\"_blank\" rel=\"noopener\">email editor<\/a> in the place where we want to show the content of the Dynamic Html and insert the merge tag <strong>{{dynamicFields.dynamicHtml}}<\/strong><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40.png\" data-lbwps-width=\"1907\" data-lbwps-height=\"967\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1907\" height=\"967\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40.png\" alt=\"\" class=\"wp-image-10646\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40.png 1907w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40-300x152.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40-1024x519.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40-768x389.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-14.15.40-1536x779.png 1536w\" sizes=\"(max-width: 1907px) 100vw, 1907px\" \/><\/a><\/figure><\/div>\n<p>When submitting, the merge tag will be replaced with the content sent via the APIs.<\/p>\n\n<p><em><strong>IMPORTANT<\/strong><\/em><\/p>\n\n<p>Make sure that your HTML and CSS code are correct and meet the requirements for the layout of your email messages. Your code can affect the entire display of the email message.<\/p>\n<div class=\"wrap-post-useful post_useful_13261\">\n<p><div style=\"color: black; margin-bottom: 15px;\"><strong>Was this content useful?<\/strong><\/div><\/p>\n<p class=\"post_useful_success post_useful_success_13261\">Thanks for contributing!<\/p>\n<div class=\"post-useful-buttons post_useful_buttons_13261\">\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"Yes\" class=\"post-useful-vote post-useful-vote-yes\" data-id=\"13261\" data-rate=\"1\">Yes<\/a>\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"No\" class=\"post-useful-vote post-useful-vote-no\" data-id=\"13261\" data-rate=\"0\">No<\/a>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>An API Call Trigger allows you to engage a user in real time when an API call is triggered. This trigger can be useful, for example, if you want to use Blendee to create experiences linked to transactional emails (e.g.: Order confirmation, shipment, etc&#8230;). Let&#8217;s take a look at the steps required to configure the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","format":"standard","article-category":[591,641],"article-tag":[643,642,198],"class_list":["post-13261","article","type-article","status-publish","format-standard","hentry","article-category-experience-manager-en","article-category-trigger-en","article-tag-custom-action-en","article-tag-real-time-triggers","article-tag-trigger-en"],"_links":{"self":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13261"}],"collection":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13261\/revisions"}],"predecessor-version":[{"id":13262,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13261\/revisions\/13262"}],"wp:attachment":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/media?parent=13261"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-category?post=13261"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-tag?post=13261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}