English
Configuration Steps
About 185 wordsLess than 1 minute
2026-01-09
Function Configuration
1. Select Namespace and Binding Object
The binding object should select the [Incentive Policy]'s [Target Object]

2. Add Parameter Configuration
Note: The [Name] in this step must be exactly consistent

Code Example
// Get incentive policy
Map policyData = policy["containerDocument"] as Map
// Get policy name (refer to corresponding object for other fields)
String policyName = policyData["name"] as String
log.info("policyName:"+policyName)
// Get incentive rules
List rulelList = rules["IncentivePolicyRuleObj"] as List
// Loop through incentive rules
rulelList.each{item ->
Map detailDataMap = item as Map
// Get incentive rule data
Map detailData = detailDataMap["containerDocument"] as Map
// Get rule name (refer to corresponding object for other fields)
String ruleName = detailData["name"] as String
log.info("ruleName:"+ruleName)
}
// Get transaction event information
Map eventData = context.data as Map
// Get member ID (refer to corresponding object for other fields)
String member_id = eventData["member_id"] as String
log.info("member_id:"+member_id )
// Update member information (modify according to actual situation)
// update member info by actual situation
Long result = 1
return result