RefLink automation step
This example covers RefLink. To create your own step, start with the developer guide.
How the step is configured and executed
- When a user adds a RefLink step in the editor, Senler opens the same frontend with an
automation_step_configuratorlaunch type. useEmbeddedRefLinkApp.tsreads the launch type, current configuration, and branches from Senler Bridge.- Instead of the main page,
App.tsxdisplaysStepConfigurator. - On save,
configurator-protocol.tsreturns normalized configuration and automation-result variable bindings through the Bridge. - During a published run, Senler does not open the form again. It calls the signed step webhook in
webhook.controller.ts. - The backend verifies the signature, runs the use case, and returns the fields defined in the shared
REFLINK_STEP_RESULTScontract.
Result: the configurator only prepares and saves settings, while the webhook executes the step during an automation run.
Webhook Retries Are Expected
A webhook may arrive more than once, or a handler may stop after partial work. WebhookReceiptRepository uses the event ID for deduplication, stores processing status, and allows stalled work to be reclaimed after a bounded lease.
Domain operations are also atomic or idempotent: the first inviter is written only once, and an invited lead ID is added to an array without duplicates.