{"id":28410,"date":"2024-12-26T07:38:16","date_gmt":"2024-12-26T07:38:16","guid":{"rendered":"https:\/\/doc.probance.com\/?post_type=tutoriels&#038;p=28410"},"modified":"2025-11-11T06:31:45","modified_gmt":"2025-11-11T06:31:45","slug":"woocommerce-send-an-automatic-email-after-a-newsletter-subscription","status":"publish","type":"tutoriels","link":"https:\/\/doc.probance.com\/en\/knowledge-base\/woocommerce-send-an-automatic-email-after-a-newsletter-subscription\/","title":{"rendered":"Woocommerce : Send an automatic email after a newsletter subscription"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>This tutorial will explain how to implement an automatic email, sent after a visitor subscribes to your newsletter with the subscription form built with our Optin module in Woocommerce.<\/em><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-style-note-probance is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Our newsletter subscription form must be configured in your Woocommerce back-office and displayed in your website to follow this tutorial.&nbsp;<a href=\"https:\/\/doc.probance.com\/en\/tuto-en\/implementing-a-newsletter-subscription-form-for-woocommerce\/\">Read our dedicated guide to learn how to proceed<\/a>.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ancre1\">1. Create an API campaign<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You must first build the email that will be sent following the creating of any new account, by creating an API campaign on email channel in Probance One.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2138\" height=\"1121\" src=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-34.png\" alt=\"\" class=\"wp-image-28411\" srcset=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-34.png 2138w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-34-300x157.png 300w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-34-1024x537.png 1024w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-34-768x403.png 768w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-34-1536x805.png 1536w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-34-2048x1074.png 2048w\" sizes=\"auto, (max-width: 2138px) 100vw, 2138px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once your campaign is ready, you won\u2019t need the full json call to integrate it with our Woocommerce module. Only its identifier \u2013 or<strong>&nbsp;campaign_external_id<\/strong>&nbsp;\u2013 will be required.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2130\" height=\"1121\" src=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-35.png\" alt=\"\" class=\"wp-image-28414\" srcset=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-35.png 2130w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-35-300x158.png 300w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-35-1024x539.png 1024w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-35-768x404.png 768w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-35-1536x808.png 1536w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-35-2048x1078.png 2048w\" sizes=\"auto, (max-width: 2130px) 100vw, 2130px\" \/><figcaption class=\"wp-element-caption\">The campaign identifier in this example is&nbsp;<strong>RT-452<\/strong><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ancre2\">2. Configure the Optin module<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In your wordpress administration board, access the menu&nbsp;<strong>Probance &gt; Optin &gt;<\/strong><strong>PMAIL \u2013 Campaigns<\/strong>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Fill in the PMAIL Token field with API token of your Pmail platform. Contact your Probance consultant to get the token.<\/li>\n\n\n\n<li>Fill in the&nbsp;<strong>01 &#8211; New Subscriber- campaign field<\/strong>&nbsp;with the identifier of your API campaign<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2117\" height=\"819\" src=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-36.png\" alt=\"\" class=\"wp-image-28417\" srcset=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-36.png 2117w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-36-300x116.png 300w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-36-1024x396.png 1024w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-36-768x297.png 768w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-36-1536x594.png 1536w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-36-2048x792.png 2048w\" sizes=\"auto, (max-width: 2117px) 100vw, 2117px\" \/><\/figure>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>You can configure up to 3 different campaigns to be send after a newsletter subcription, using the fields&nbsp;<strong>02 \u2013 New Subscriber \u2013 campaign<\/strong>&nbsp;and&nbsp;<strong>03 \u2013 New Subscriber<\/strong>. If there more than one version of the form in your website, this allows you to send a different email depending on which form has been filled by the visitor.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ancre3\">3. Link the campaign to the subscription form<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To link a form to a campaign, you need to add a&nbsp;<strong>campaign_id<\/strong>&nbsp;parameter to its shortcode, and affect the number of the campaign it will trigger.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:&nbsp;<code>[probance_newsletter campaign_id=\"01\"]<\/code><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>campaign_id=\"01\"<\/code>&nbsp;will link the form to the campaign configured in the field&nbsp;<strong>01 \u2013 New Subscriber \u2013 campaign<\/strong><\/li>\n\n\n\n<li><code>campaign_id=\"02\"<\/code>&nbsp;will link the form to the campaign configured in the field&nbsp;<strong>02 \u2013 New Subscriber \u2013 campaign<\/strong><\/li>\n\n\n\n<li><code>campaign_id=\"03\"<\/code>&nbsp;will link the form to the campaign configured in the field&nbsp;<strong>03 \u2013 New Subscriber \u2013 campaign<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ancre4\">4. Start the sendings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The sending will only start once the campaign is enabled in the Optin module, and the API campaign is activate in Probance One.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>To activate the API campaign in Probance One, switch its<strong>&nbsp;Status<\/strong>&nbsp;to&nbsp;<strong>Active<\/strong>&nbsp;in the campaign page.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2138\" height=\"1121\" src=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-37.png\" alt=\"\" class=\"wp-image-28420\" srcset=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-37.png 2138w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-37-300x157.png 300w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-37-1024x537.png 1024w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-37-768x403.png 768w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-37-1536x805.png 1536w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-37-2048x1074.png 2048w\" sizes=\"auto, (max-width: 2138px) 100vw, 2138px\" \/><\/figure>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>To enable the campaign in the Optin module, check the <strong>Enabled<\/strong> option of the corresponding&nbsp;<strong>New Subscriber \u2013 campaign<\/strong>&nbsp;field.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2117\" height=\"819\" src=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-38.png\" alt=\"\" class=\"wp-image-28423\" srcset=\"https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-38.png 2117w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-38-300x116.png 300w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-38-1024x396.png 1024w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-38-768x297.png 768w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-38-1536x594.png 1536w, https:\/\/doc.probance.com\/wp-content\/uploads\/2024\/12\/image-38-2048x792.png 2048w\" sizes=\"auto, (max-width: 2117px) 100vw, 2117px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ancre5\">5. Option: multilingual mode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The module also allows you to configure the campaign in several languages. This option requires the creation of several API campaigns in PONE, one in every language you wish to cover.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click on the&nbsp;<strong>Translation<\/strong>&nbsp;button next to the&nbsp;<strong>New Subscriber \u2013 campaign&nbsp;<\/strong>field.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the popup that displays, each tab correspond to a language, and can be filled in with a campaign identifier: you can therefore define which campaign will be sent to which contact based on their browsing language at the moment of their registration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If there is no specific settings for the language of a contact, they will receive the campaign set directly in the&nbsp;<strong>New Subscriber \u2013 campaign&nbsp;<\/strong>field.<\/p>\n<div id=\"wpmem_restricted_msg\"><p>This content is restricted to site members.  If you are an existing user, please log in.  New users may register below.<\/p><\/div><div id=\"wpmem_login\"><a id=\"login\"><\/a><form action=\"https:\/\/doc.probance.com\/en\/knowledge-base\/woocommerce-send-an-automatic-email-after-a-newsletter-subscription\/\" method=\"POST\" id=\"wpmem_login_form\" class=\"form\"><input type=\"hidden\" id=\"_wpmem_login_nonce\" name=\"_wpmem_login_nonce\" value=\"af0e76e092\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/en\/wp-json\/wp\/v2\/tutoriels\/28410\" \/><fieldset><legend>Existing Users Log In<\/legend><label for=\"log\">Username or Email<\/label><div class=\"div_text\"><input name=\"log\" type=\"text\" id=\"log\" value=\"\" class=\"username\" required  \/><\/div><label for=\"pwd\">Password<\/label><div class=\"div_text\"><input name=\"pwd\" type=\"password\" id=\"pwd\" class=\"password\" required  \/><\/div><input name=\"a\" type=\"hidden\" value=\"login\" \/><input name=\"redirect_to\" type=\"hidden\" value=\"https:\/\/doc.probance.com\/en\/knowledge-base\/woocommerce-send-an-automatic-email-after-a-newsletter-subscription\/\" \/><div class=\"button_div\"><input name=\"rememberme\" type=\"checkbox\" id=\"rememberme\" value=\"forever\" \/>&nbsp;<label for=\"rememberme\">Remember Me<\/label>&nbsp;&nbsp;<input type=\"submit\" name=\"Submit\" value=\"Log In\" class=\"buttons\" \/><\/div><\/fieldset><\/form><\/div><div id=\"wpmem_reg\"><a id=\"register\"><\/a><form name=\"form\" method=\"post\" action=\"https:\/\/doc.probance.com\/en\/knowledge-base\/woocommerce-send-an-automatic-email-after-a-newsletter-subscription\/\" id=\"wpmem_register_form\" class=\"form\"><input type=\"hidden\" id=\"_wpmem_register_nonce\" name=\"_wpmem_register_nonce\" value=\"35f8bfaf05\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/en\/wp-json\/wp\/v2\/tutoriels\/28410\" \/><fieldset><legend>New User Registration<\/legend><label for=\"username\" class=\"text\">Choose a Username<span class=\"req\">*<\/span><\/label><div class=\"div_text\"><input name=\"username\" type=\"text\" id=\"username\" value=\"\" class=\"textbox\" required  \/><\/div><label for=\"first_name\" class=\"text\">First Name<span class=\"req\">*<\/span><\/label><div class=\"div_text\"><input name=\"first_name\" type=\"text\" id=\"first_name\" value=\"\" class=\"textbox\" required  \/><\/div><label for=\"last_name\" class=\"text\">Last Name<span class=\"req\">*<\/span><\/label><div class=\"div_text\"><input name=\"last_name\" type=\"text\" id=\"last_name\" value=\"\" class=\"textbox\" required  \/><\/div><label for=\"user_email\" class=\"text\">Email<span class=\"req\">*<\/span><\/label><div class=\"div_text\"><input name=\"user_email\" type=\"email\" id=\"user_email\" value=\"\" class=\"textbox\" required  \/><\/div><input name=\"a\" type=\"hidden\" value=\"register\" \/><input name=\"wpmem_reg_page\" type=\"hidden\" value=\"https:\/\/doc.probance.com\/en\/knowledge-base\/woocommerce-send-an-automatic-email-after-a-newsletter-subscription\/\" \/><div class=\"button_div\"><input name=\"submit\" type=\"submit\" value=\"Register\" class=\"buttons\" \/><\/div><div class=\"req-text\"><span class=\"req\">*<\/span>Required field<\/div><\/fieldset><\/form><\/div>","protected":false},"excerpt":{"rendered":"<p>This tutorial will explain how to implement an automatic email, sent after a visitor subscribes to your newsletter with the subscription form built with our Optin module in Woocommerce. Our newsletter subscription form must be configured in your Woocommerce back-office and displayed in your website to follow this tutorial.&nbsp;Read our dedicated guide to learn how [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"template":"","sujets":[633],"class_list":["post-28410","tutoriels","type-tutoriels","status-publish","hentry","sujets-transactional-campaigns"],"_links":{"self":[{"href":"https:\/\/doc.probance.com\/en\/wp-json\/wp\/v2\/tutoriels\/28410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doc.probance.com\/en\/wp-json\/wp\/v2\/tutoriels"}],"about":[{"href":"https:\/\/doc.probance.com\/en\/wp-json\/wp\/v2\/types\/tutoriels"}],"author":[{"embeddable":true,"href":"https:\/\/doc.probance.com\/en\/wp-json\/wp\/v2\/users\/6"}],"wp:attachment":[{"href":"https:\/\/doc.probance.com\/en\/wp-json\/wp\/v2\/media?parent=28410"}],"wp:term":[{"taxonomy":"sujets","embeddable":true,"href":"https:\/\/doc.probance.com\/en\/wp-json\/wp\/v2\/sujets?post=28410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}