Attribute: poll - evolv-ai/metrics GitHub Wiki

If a value is not immediately available when the integration is processed, a poll can be specified to periodically reevaluate the attribute until it is detected, or poll duration expires.

An example of a poll to check on an expression window.delayedObject.value every 50ms for 2 seconds and then bind the results to audience attribute captured.value would be:

{
  "source": "expression",
  "key": "window.delayedObject.value",
  "action": "bind",
  "tag": "captured.value",
  "poll": {
    "duration": 2000,
    "interval": 50
  }
}

Note: If window.delayedObject.value does not have a value within 2 seconds, the audience attribute captured.value will be left unbound. If you need to force it to have a value, you can utilize the default attribute