All Products
Document Center

:Associate variables with an event

Last Updated:Jan 14, 2022

Description: You can associate variables with an event so that you can use the event to perform various types of computing, including but not limited to function computing and data mapping. The decision engine provides the following types of variables: scenario recognition variables for risk control, function variables, string processing variables, and velocity variables. For example, you can use a scenario recognition variable to detect spam registrations. You can use a function variable to check whether an event field contains digits. You can use a string processing variable to extract the suffix of email addresses. You can use a velocity variable to calculate the number of accounts that are used on an IP address in an hour 1. Associate variables with an event in the variable center

Scenario: Alibaba Cloud expert team updates and publishes variables in the variable center from time to time. You can use these variables to perform computing or make judgments as required when you orchestrate an event policy. For example, if you need to use the credit fraud prevention feature provided by Alibaba Cloud for loan approval, you can find the variables of credit fraud detection in the variable center and associate them with the target event.

1. Log on to the Fraud Detection console and click Variables in the left-side navigation pane. On the Variables page, find the type of a variable that you want to associate with an event and click Detail in the Actions column. In the Variable Details pane, click Next Step. In the Associate Variable step, select the target event and enter the variable name and description. We recommend that you enter a name and description that can help you understand the variable in further use.

2. Select an event field to which the variable is to be mapped. After you select an event, the system lists all fields of the event in the Variable Field drop-down list. Select a proper event field as prompted.

3. Click OK. Then, the variable is customized and associated with the selected event. You can select the custom variable when you create a rule for a policy that is associated with the target event.

2. Customize a variable on the Variable Management page

You can also customize a variable on the Variable Management page by performing the following steps: On the Variables page, click Variable Management. On the page that appears, click Add Variable on the Variables tab. In the Add Variable pane, set parameters to customize a variable.

Create a list

Fraud Detection allows you to create a limited number of lists that can be used as variables. You can configure a policy to check whether variable values of requests are in such lists. For example, you can create a whitelist and use the whitelist to design the computing logic of a policy. If a request contains a variable value in the whitelist, the decision engine returns the analysis result as configured. You can set the property of a custom list as required. For example, you can create a whitelist, blacklist, graylist, or VIP list.

To create a list, perform the following steps: On the Lists tab of the Variable Management page in the variable center, click Create List. In the Create List pane, set List Name, List Description, and Import Method. Then, enter or import list items based on the selected import method. You can also import list items later if you select Import Later for Import Method.

Enter in Text Box

Import by Uploading

Note: After a list is created, it cannot be deleted. You can import items to a list multiple times, delete an item from a list, or clear a list. After you delete items of a list or clear the list, the decision engine cannot read the deleted data. As a result, a policy that is hit by a request before may be no longer hit.

To check whether a value exists in a list, perform the following steps: Click Search List Item in the upper-right corner of the Lists tab. In the Search List Item pane, enter the value that you want to search for.

Query a value

You can directly delete queried values in the Search List Item pane.