Advanced Topics
Custom Signals
Add your own business-specific signals to the VerifyStack scoring engine.
Custom signals let you incorporate your own business-specific data into the VerifyStack scoring engine. Pass domain-specific attributes (order history, account age, loyalty tier) alongside the standard device and behavioral signals.
Passing Custom Signals
Include custom signals in decide()javascript
const decision = await vs.decide({
action: 'checkout',
userId: user.id,
metadata: {
// Your custom signals
accountAgeDays: user.accountAgeDays,
previousOrders: user.orderCount,
loyaltyTier: user.loyaltyTier,
averageOrderValue: user.avgOrderValue,
cartValue: cart.total,
shippingMatchesBilling: address.matches,
isGiftCard: cart.hasGiftCards,
// Standard context
email: user.email,
ip: request.ip
}
});How Custom Signals Are Used
- Custom signals are passed through the metadata field in /decide requests
- They're available in policy rule conditions (e.g. "metadata.cartValue > 500")
- The scoring engine incorporates custom signals into weight calibration via the feedback loop
- Custom signals appear in the dashboard decision details and audit trail
Custom Policy Rules
Policy using custom signalsjson
{
"name": "High-value new account",
"rules": [
{
"condition": "metadata.accountAgeDays < 7 AND metadata.cartValue > 500",
"action": "challenge",
"description": "Challenge high-value orders from new accounts"
}
]
}Custom signals are never shared with consortium partners. Only anonymized decision outcomes and standard signals participate in consortium sharing.