All Products
Search
Document Center

Fraud Detection:Add an event to the decision engine

Last Updated:Feb 19, 2024

After you create an event, you must provide business data as the input for the decision engine. The method is similar to that for calling the API of Fraud Detection, except that you must set the service parameter to saf_de. The value of the ServiceParameters parameter is a JSON string. For more information, see Common parameters. In this topic, the event in the following figure is used as an example.

Use the following code to send a request to add the event to the decision engine:

    https://saf.apsoutheast-1.aliyuncs.com  //Singapore Region
    ? Format=JSON
    &Version=2020-07-06
    &Signature=vpEEL0zFHfxXYzSFV0n7%2FZiFL9o%3D 
    &SignatureMethod=Hmac-SHA1
    &SignatureNonce=15215528852396
    &SignatureVersion=1.0
    &Action=ExecuteRequestSG //Singapore Region
    &AccessKeyId=1234567saf 
    &Timestamp=2018-06-01T12:00:00Z
    &Service=saf_de // Set the service parameter to saf_de.
    &ServiceParameters={"eventCode":"de_anlena4362","accountId":"101","mobileMd5":"e7beea81b7a03b38508428fbeeb3c69a","ip":"42.120.74.211","email":"admin2017@aliyun.com"}// The eventCode parameter is required.
        

Note: The ***eventCode*** parameter is required. You must set the parameter to the event code assigned by the system. The system does not check whether all fields of the target event are passed. For example, if the operateTime field defined in the event is not passed to the decision engine, no error is reported when the decision engine implements computing based on the policies of the event.