{"title":"Custom rules","category":"default","creationDate":1779620071,"content":"<p>Custom rules let you fine-tune your risk profile. You can use them to address risks specific to your business or to complement the risk evaluation by the <strong>Machine learning: fraud risk<\/strong> rule.<\/p>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirements and limitations.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have built an <a href=\"\/online-payments\/build-your-integration\/\">online payments integration<\/a>, that <a href=\"\/risk-management\/configure-risk-settings\/\">risk management is enabled<\/a>, and that you have enabled <a href=\"\/risk-management\/configure-risk-settings\/#risk-general\">premium features<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/account\/user-roles\/#risk\">Customer Area roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have one of the following role(s): <ul><li markdown=\"1\"><strong>Merchant change risk settings<\/strong><\/li><li markdown=\"1\"><strong>Risk admin<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\">You can only use custom rules when you use Protect premium.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>You can add custom rules to complement the fraud risk evaluation. When you configure a rule in your risk profile, you configure which action should be taken when a transaction matches that rule.<\/p>\n<p>For each rule, you configure if the rule should run before or after authorization, and what to do if a transaction matches the rule: <strong>Allow<\/strong>, <strong>Block<\/strong>, <strong>Review<\/strong>, or <strong>Check for 3DS<\/strong>.<\/p>\n<p>You can also label your rules for easy classification, and to further personalize your risk profile setup.<\/p>\n<h2>Create a custom rule<\/h2>\n<p>To create a new rule in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>:<\/p>\n<ol>\n<li>Go to <strong>Revenue &amp; risk<\/strong> &gt; <strong>Risk profiles<\/strong>.<\/li>\n<li>Select a risk profile.<\/li>\n<li>Select <strong>Risk rules<\/strong>.<\/li>\n<li>Select <strong>+ Create new custom rule<\/strong>, and then select <strong>Pre-authorization<\/strong> or <strong>Post-authorization<\/strong>.<\/li>\n<li>Enter a rule name.<\/li>\n<li>In the <strong>Action<\/strong> section, select <strong>Allow<\/strong>, <strong>Block<\/strong>, <strong>Review<\/strong>, or <strong>Check for 3DS<\/strong> to define the action you want to take when the rule triggers.\n<ul>\n<li><strong>Allow<\/strong>: do not block the transaction if the transaction matches this rule.<\/li>\n<li><strong>Block<\/strong>: block the transaction if the transaction matches this rule.<\/li>\n<li><strong>Review<\/strong>: send the transaction to case management if the transaction matches this rule.<\/li>\n<li><strong>Check for 3DS<\/strong>: do not make a risk decision if the transaction matches this rule.<br \/>\nWhen you create a pre-authorization rule with the <strong>Check for 3DS<\/strong> action, you can use it to influence the authentication engine. Because no risk decision is made to block or allow the transaction, you can select the custom rule as a trigger for <a href=\"\/risk-management\/dynamic-3d-secure#configuring-dynamic-3d-secure-rules\">Dynamic 3D Secure rules<\/a>.<\/li>\n<\/ul><\/li>\n<li>In the <strong>Label<\/strong> section, select one of the following labels for the rule:\n<ul>\n<li><strong>Business<\/strong>: for rules specifically related to your business.<\/li>\n<li><strong>Legal<\/strong>: for rules based on regulations or laws.<\/li>\n<li><strong>Fraud<\/strong>: for rules to prevent specific fraud risks for your business.<\/li>\n<li><strong>Block list<\/strong>: for rules to add payment properties to predefined block lists.<\/li>\n<li><strong>Trust list<\/strong>: for rules to add payment properties to predefined trust lists.<\/li>\n<\/ul><\/li>\n<li>Enter conditions. You can add conditions to the rule by selecting <strong>AND<\/strong> or <strong>OR<\/strong>. For each condition, select:\n<ul>\n<li><strong>Field Name<\/strong>: choose a field to use as a risk variable.<\/li>\n<li><strong>Operator<\/strong>: how to compare the Field Name and the Field Value. The type of the fields you are comparing defines which <a href=\"#operators\">operators<\/a> you can use. For example, you can use  <strong>greater than (&gt;)<\/strong> for numbers, or <strong>starts with<\/strong> for strings.<\/li>\n<li><strong>Field Value<\/strong>: value that triggers your rule.<\/li>\n<\/ul><\/li>\n<li>Select <strong>Create new rule<\/strong>.<\/li>\n<\/ol>\n<h3 id=\"operators\">Operators<\/h3>\n<p>When you build your custom risk rule, you can use operators to define the rule conditions. You can use <strong>AND<\/strong> and <strong>OR<\/strong> to add conditions to the custom risk rule.<br \/>\nThe data type of the field you are building your rule around determines if you can use a specific operator, which and how many values you can enter, and how the fields will be compared.<\/p>\n<div class=\"sticky-table-container\">\n    \n<table>\n<thead>\n<tr>\n<th>Operator<\/th>\n<th>When to use<\/th>\n<th>Example<\/th>\n<th>Data type<\/th>\n<th>Multiple values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>equals (==)<\/td>\n<td>Compare the field against another field, against a single field value, or verify that the field value is true or false.<\/td>\n<td><code>quantity<\/code> equals (==) <strong>2<\/strong><\/td>\n<td>String, Number or Boolean<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>does not equal (!=)<\/td>\n<td>Compare the field against another field, against a single field value, or verify that the field value is true or false.<\/td>\n<td><code>quantity<\/code> does not equal (!=) <strong>2<\/strong><\/td>\n<td>String, Number or Boolean<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>is one of<\/td>\n<td>Compare the field against multiple field values of a list.<\/td>\n<td><code>currency<\/code> is one of <strong>EUR, USD, AUD<\/strong><\/td>\n<td>String or Number<\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>is not one of<\/td>\n<td>Compare the field against multiple field values of a list.<\/td>\n<td><code>currency<\/code> is not one of <strong>EUR, USD, AUD<\/strong><\/td>\n<td>String or Number<\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>is in list<\/td>\n<td>Compare the field against a custom or Adyen-provided risk list. Using this operator, you can create custom list comparisons, or create a condition to compare a field against an Adyen-provided risk list.<\/td>\n<td><code>productTitle<\/code> is in <strong>YOUR_CUSTOM_LIST<\/strong><\/td>\n<td>List<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>is not in list<\/td>\n<td>Compare the field against a custom or Adyen-provided risk list. Using this operator, you can create custom list comparisons, or create a condition to compare a field against an Adyen-provided risk list.<\/td>\n<td><code>productTitle<\/code> is not in <strong>YOUR_CUSTOM_LIST<\/strong><\/td>\n<td>List<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>contains string<\/td>\n<td>Compare the field value to a specific string.<\/td>\n<td><code>emailDomain<\/code> contains <strong>example.com<\/strong><\/td>\n<td>String or Number<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>starts with<\/td>\n<td>Compare the start of the string in the field value to a specific string.<\/td>\n<td><code>emailName<\/code> starts with <strong>test<\/strong><\/td>\n<td>String<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>ends with<\/td>\n<td>Compare the end of the string in the field value to a specific string.<\/td>\n<td><code>emailName<\/code> ends with <strong>test<\/strong><\/td>\n<td>String<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>greater than (&gt;)<\/td>\n<td>Compare the field value against a specific value.<\/td>\n<td><code>amount<\/code> greater than (&gt;) <strong>1000<\/strong><\/td>\n<td>Number<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>greater than or equals (&gt;=)<\/td>\n<td>Compare the field value against a specific value.<\/td>\n<td><code>amount<\/code> greater than or equals (&gt;=) <strong>1000<\/strong><\/td>\n<td>Number<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>less than (&lt;)<\/td>\n<td>Compare the field value against a specific value.<\/td>\n<td><code>amount<\/code> less than (&lt;) <strong>1000<\/strong><\/td>\n<td>Number<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<tr>\n<td>less than or equals (&lt;=)<\/td>\n<td>Compare the field value against a specific value.<\/td>\n<td><code>amount<\/code> less than or equals (&lt;=) <strong>1000<\/strong><\/td>\n<td>Number<\/td>\n<td><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<\/div>\n\n<h2 id=\"new-profile-backtest\">Backtest a rule<\/h2>\n<p>You can backtest the impact before you activate a new rule, or change the settings of an existing rule.<\/p>\n<p>You can run the rule on your historical data to build more confidence in the effect of the rule before you turn it on. Or, after you identify a rule that is not performing well, you can test the effect of any changes to the rule before you make them.<\/p>\n<p>Backtesting can give you helpful insights in your risk profile performance, and reduces the time you have to spend on manually monitoring risk rule performance over time.<\/p>\n<p>To backtest a rule in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>:<\/p>\n<ol>\n<li>Go to <strong>Revenue &amp; risk<\/strong> &gt; <strong>Risk profiles<\/strong>.<\/li>\n<li>Select a risk profile.<\/li>\n<li>Select <strong>Risk rules<\/strong>.<\/li>\n<li>Select a pre-authorization rule from the <strong>Allow<\/strong>, <strong>Block<\/strong> or <strong>Review<\/strong> tab, and then select <strong>Backtest<\/strong>.<\/li>\n<\/ol>\n<h2 id=\"new-profile-copy\">Copy a rule<\/h2>\n<p>To copy a custom rule to another risk profile:<\/p>\n<ol>\n<li>Go to <strong>Revenue &amp; risk<\/strong> &gt; <strong>Risk profiles<\/strong>.<\/li>\n<li>Select the risk profile that contains the rule you want to copy.<\/li>\n<li>Select <strong>Risk rules<\/strong>.<\/li>\n<li>Select the custom rule you want to copy and then select <strong>Copy to another profile<\/strong>.<\/li>\n<li>Select the risk profile to copy the rule to, select a rule label and action, then optionally edit the rule name or conditions.<\/li>\n<li>Select <strong>Copy<\/strong>.<\/li>\n<\/ol>\n<h2>See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/risk-management\/configure-your-risk-profile\/risk-lists\"\n                        target=\"_self\"\n                        >\n                    Risk lists\n                <\/a><\/li><li><a href=\"\/risk-management\/configure-your-risk-profile\/machine-learning-rules\"\n                        target=\"_self\"\n                        >\n                    Machine learning rules\n                <\/a><\/li><li><a href=\"\/risk-management\/configure-your-risk-profile\/post-auth-rules\"\n                        target=\"_self\"\n                        >\n                    Post-authorization rules\n                <\/a><\/li><li><a href=\"\/risk-management\/configure-your-risk-profile\/risk-field-reference\"\n                        target=\"_self\"\n                        >\n                    Data quality and risk field reference\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/risk-management\/configure-your-risk-profile\/custom-rules","articleFields":{"description":"Build your own custom risk rules around the unique fraud risks faced by your business.","id":"27528124","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"01-04-2020 11:43","feedback_component":true},"algolia":{"url":"https:\/\/docs.adyen.com\/risk-management\/configure-your-risk-profile\/custom-rules","title":"Custom rules","content":"Custom rules let you fine-tune your risk profile. You can use them to address risks specific to your business or to complement the risk evaluation by the Machine learning: fraud risk rule.\nRequirements\nBefore you begin, take into account the following requirements and limitations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built an online payments integration, that risk management is enabled, and that you have enabled premium features.\n\n\nCustomer Area roles\nMake sure that you have one of the following role(s): Merchant change risk settingsRisk admin\n\n\nLimitations\nYou can only use custom rules when you use Protect premium.\n\n\n\nHow it works\nYou can add custom rules to complement the fraud risk evaluation. When you configure a rule in your risk profile, you configure which action should be taken when a transaction matches that rule.\nFor each rule, you configure if the rule should run before or after authorization, and what to do if a transaction matches the rule: Allow, Block, Review, or Check for 3DS.\nYou can also label your rules for easy classification, and to further personalize your risk profile setup.\nCreate a custom rule\nTo create a new rule in your Customer Area:\n\nGo to Revenue &amp; risk &gt; Risk profiles.\nSelect a risk profile.\nSelect Risk rules.\nSelect + Create new custom rule, and then select Pre-authorization or Post-authorization.\nEnter a rule name.\nIn the Action section, select Allow, Block, Review, or Check for 3DS to define the action you want to take when the rule triggers.\n\nAllow: do not block the transaction if the transaction matches this rule.\nBlock: block the transaction if the transaction matches this rule.\nReview: send the transaction to case management if the transaction matches this rule.\nCheck for 3DS: do not make a risk decision if the transaction matches this rule.\nWhen you create a pre-authorization rule with the Check for 3DS action, you can use it to influence the authentication engine. Because no risk decision is made to block or allow the transaction, you can select the custom rule as a trigger for Dynamic 3D Secure rules.\n\nIn the Label section, select one of the following labels for the rule:\n\nBusiness: for rules specifically related to your business.\nLegal: for rules based on regulations or laws.\nFraud: for rules to prevent specific fraud risks for your business.\nBlock list: for rules to add payment properties to predefined block lists.\nTrust list: for rules to add payment properties to predefined trust lists.\n\nEnter conditions. You can add conditions to the rule by selecting AND or OR. For each condition, select:\n\nField Name: choose a field to use as a risk variable.\nOperator: how to compare the Field Name and the Field Value. The type of the fields you are comparing defines which operators you can use. For example, you can use  greater than (&gt;) for numbers, or starts with for strings.\nField Value: value that triggers your rule.\n\nSelect Create new rule.\n\nOperators\nWhen you build your custom risk rule, you can use operators to define the rule conditions. You can use AND and OR to add conditions to the custom risk rule.\nThe data type of the field you are building your rule around determines if you can use a specific operator, which and how many values you can enter, and how the fields will be compared.\n\n    \n\n\n\nOperator\nWhen to use\nExample\nData type\nMultiple values\n\n\n\n\nequals (==)\nCompare the field against another field, against a single field value, or verify that the field value is true or false.\nquantity equals (==) 2\nString, Number or Boolean\n\n\n\ndoes not equal (!=)\nCompare the field against another field, against a single field value, or verify that the field value is true or false.\nquantity does not equal (!=) 2\nString, Number or Boolean\n\n\n\nis one of\nCompare the field against multiple field values of a list.\ncurrency is one of EUR, USD, AUD\nString or Number\n\n\n\nis not one of\nCompare the field against multiple field values of a list.\ncurrency is not one of EUR, USD, AUD\nString or Number\n\n\n\nis in list\nCompare the field against a custom or Adyen-provided risk list. Using this operator, you can create custom list comparisons, or create a condition to compare a field against an Adyen-provided risk list.\nproductTitle is in YOUR_CUSTOM_LIST\nList\n\n\n\nis not in list\nCompare the field against a custom or Adyen-provided risk list. Using this operator, you can create custom list comparisons, or create a condition to compare a field against an Adyen-provided risk list.\nproductTitle is not in YOUR_CUSTOM_LIST\nList\n\n\n\ncontains string\nCompare the field value to a specific string.\nemailDomain contains example.com\nString or Number\n\n\n\nstarts with\nCompare the start of the string in the field value to a specific string.\nemailName starts with test\nString\n\n\n\nends with\nCompare the end of the string in the field value to a specific string.\nemailName ends with test\nString\n\n\n\ngreater than (&gt;)\nCompare the field value against a specific value.\namount greater than (&gt;) 1000\nNumber\n\n\n\ngreater than or equals (&gt;=)\nCompare the field value against a specific value.\namount greater than or equals (&gt;=) 1000\nNumber\n\n\n\nless than (&lt;)\nCompare the field value against a specific value.\namount less than (&lt;) 1000\nNumber\n\n\n\nless than or equals (&lt;=)\nCompare the field value against a specific value.\namount less than or equals (&lt;=) 1000\nNumber\n\n\n\n\n\n\n\nBacktest a rule\nYou can backtest the impact before you activate a new rule, or change the settings of an existing rule.\nYou can run the rule on your historical data to build more confidence in the effect of the rule before you turn it on. Or, after you identify a rule that is not performing well, you can test the effect of any changes to the rule before you make them.\nBacktesting can give you helpful insights in your risk profile performance, and reduces the time you have to spend on manually monitoring risk rule performance over time.\nTo backtest a rule in your Customer Area:\n\nGo to Revenue &amp; risk &gt; Risk profiles.\nSelect a risk profile.\nSelect Risk rules.\nSelect a pre-authorization rule from the Allow, Block or Review tab, and then select Backtest.\n\nCopy a rule\nTo copy a custom rule to another risk profile:\n\nGo to Revenue &amp; risk &gt; Risk profiles.\nSelect the risk profile that contains the rule you want to copy.\nSelect Risk rules.\nSelect the custom rule you want to copy and then select Copy to another profile.\nSelect the risk profile to copy the rule to, select a rule label and action, then optionally edit the rule name or conditions.\nSelect Copy.\n\nSee also\n\n\n                    Risk lists\n                \n                    Machine learning rules\n                \n                    Post-authorization rules\n                \n                    Data quality and risk field reference\n                \n","type":"page","locale":"en","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Risk management","lvl2":"Configure your risk profile","lvl3":"Custom rules"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/risk-management","lvl2":"https:\/\/docs.adyen.com\/risk-management\/configure-your-risk-profile","lvl3":"\/risk-management\/configure-your-risk-profile\/custom-rules"},"levels":4,"category":"Risk Management","category_color":"green","tags":["Custom","rules"]}}
