{"id":21737,"date":"2022-04-11T13:53:18","date_gmt":"2022-04-11T11:53:18","guid":{"rendered":"https:\/\/help.openbee.com\/open-bee-email-capture\/administrators-guide\/custom-variables\/"},"modified":"2026-05-13T09:37:43","modified_gmt":"2026-05-13T07:37:43","slug":"custom-variables","status":"publish","type":"page","link":"https:\/\/help.openbee.com\/en\/open-bee-email-capture\/administrators-guide\/custom-variables\/","title":{"rendered":"Custom variables"},"content":{"rendered":"\n<p><strong>In addition to the indexes that come with the Open Bee\u2122 eMail Capture application, it is possible to create custom variables to meet more specific needs.<\/strong><\/p>\n\n<h1 class=\"wp-block-heading\" id=\"Variablespersonnalis&#xE9;es-Cr&#xE9;ationd'unevariablepersonnalis&#xE9;e\"><strong>Creating a Custom Variable<\/strong><\/h1>\n\n<p>From the interface for creating or modifying a rule, the <strong>&#8220;Custom variable&#8221; <\/strong>button will allow you to specify a regular expression.<\/p>\n\n<p>A regular expression will allow you to search for a word or a string of characters corresponding to a predefined format.<\/p>\n\n<p>In the example presented here, we want to look for a folder reference that is always made up in the same way: 3 letters, 1 hyphen, 3 numbers.<\/p>\n\n<p>Examples (<strong>Ref-123<\/strong>, <strong>XET-943<\/strong>, <strong>AZE-341<\/strong>, etc.)<\/p>\n\n<p>Access the screen for creating and modifying a custom variable.<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/253624342.png\" alt=\"\"\/><\/figure>\n\n<p>Click the <strong>&#8220;+&#8221;<\/strong> button on the left to create a new variable.<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/253624343.png\" alt=\"\"\/><\/figure>\n\n<p>There are 2 fields to fill in:<\/p>\n\n<ul class=\"wp-block-list\"><li>The name of the variable<\/li><li>Regular expression<\/li><\/ul>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Astuteness<\/strong><\/p><cite>There is an abundance of literature on regular expressions on the Internet.<br\/>A quick search will allow you to find documentation on their creation and operation.<\/cite><\/blockquote>\n\n<p>However, two creation aids are present on this interface<\/p>\n\n<ol class=\"wp-block-list\"><li>The <strong>&#8220;&gt;&gt;&#8221; <\/strong>button allows you to help with typing<img decoding=\"async\" width=\"500\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/253624344.png\"\/><\/li><li>The <strong>&#8220;Idea&#8221;<\/strong> button allows you to generate a regular expression from a previously entered example  <img decoding=\"async\" width=\"410\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/253624345.png\"\/><\/li><\/ol>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Note that the regular expression generated from the example additionally adds a condition. The search word must not be in the middle of another word, i.e. there must be a space before and after the search phrase.<\/p><\/blockquote>\n\n<p>In any case, it is possible to test its regular expression to check that it behaves as expected.<\/p>\n\n<p>Insert text in the field provided to test the result.<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/252937563.png\" alt=\"\"\/><\/figure>\n\n<h1 class=\"wp-block-heading\" id=\"Variablespersonnalis&#xE9;es-Utilisationd'unevariablepersonnalis&#xE9;e\">Using a Custom Variable<\/h1>\n\n<p>Once the variable is created, it can be used throughout the application both in the <strong>&#8220;Conditions&#8221;<\/strong> tab and as an index in the<strong> &#8220;Destination&#8221;<\/strong> tab.<\/p>\n\n<h3 class=\"wp-block-heading\" id=\"Variablespersonnalis&#xE9;es-Variablepersonnalis&#xE9;etest&#xE9;edanslesconditions\">Custom variable tested under conditions<\/h3>\n\n<p>If a custom variable has been defined in the application, the double arrow icon allows you to switch between entering free text and choosing a custom variable.<\/p>\n\n<p>It is therefore possible to test regular expression instead of free text.<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/252937570.png\" alt=\"\"\/><\/figure>\n\n<h3 class=\"wp-block-heading\" id=\"Variablespersonnalis&#xE9;es-Variablepersonnalis&#xE9;eentantqu'indextrue\">Custom variable as an Open Bee\u2122 Portal index<\/h3>\n\n<p>In our example here, we want to automatically classify our emails according to the folder number contained in our received emails.<\/p>\n\n<p>We therefore want to use the result of the regular expression as the index of Open Bee\u2122 Portal.<\/p>\n\n<p>If you scroll down to the list of available Open Bee\u2122 Portal indexes, the custom variables appear in the list of available indexes and you can select them.<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/help.openbee.com\/wp-content\/uploads\/2022\/04\/252937569.png\" alt=\"\"\/><\/figure>\n\n<p>This phrase will be searched first in the subject line of the email, then in the body of the message, and finally in the name of the attachment. The search stops at the first occurrence found.<\/p>\n\n<p><strong>It is possible that no match is found, in which case the email will not be indexed and you will have to complete the indexing manually.<\/strong><\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>It is important to note that as soon as a &#8220;custom index&#8221; is added, it may result in manual action by the user to correct the missing indexes (see &#8221; <strong>History Management&#8221;<\/strong> chapter)<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>In addition to the indexes that come with the Open Bee\u2122 eMail Capture application, it is possible to create custom variables to meet more specific needs. Creating a Custom Variable From the interface for creating or modifying a rule, the &#8220;Custom variable&#8221; button will allow you to specify a regular expression. A regular expression will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":21717,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"templates\/ob-help-products.php","meta":{"footnotes":""},"class_list":["post-21737","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/comments?post=21737"}],"version-history":[{"count":1,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21737\/revisions"}],"predecessor-version":[{"id":21740,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21737\/revisions\/21740"}],"up":[{"embeddable":true,"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/pages\/21717"}],"wp:attachment":[{"href":"https:\/\/help.openbee.com\/en\/wp-json\/wp\/v2\/media?parent=21737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}