When a Webhook connector sends a lead, Albacross makes an HTTP POST with the lead as JSON to the URL you set up. This article explains what your endpoint needs to do for the lead to count as delivered, and what happens when it doesn't. The same rules apply to the Clay connector.
What counts as delivered
Your endpoint answers with a
2xxstatus code (for example200or204).It answers within 5 seconds. Slower answers are cut off and count as a failed attempt.
If your endpoint needs longer than that, do the slow work after you answer: accept the lead, return 200, then process it in the background.
What happens when an attempt fails
An attempt fails when your endpoint answers with any status code other than 2xx, doesn't answer within 5 seconds, or can't be reached.
A failed lead is sent again about 30 seconds later.
Each lead gets up to 4 attempts. After the fourth failed attempt it is not sent again.
The same lead can arrive more than once
If your endpoint saves the lead but answers too late, or the answer is lost on the way back, Albacross treats the attempt as failed and sends the lead again. The same company is also sent again whenever it comes back to your website. Make your endpoint safe to receive a lead twice, for example by updating the record for the lead's id instead of creating a new one.
The Idempotency-Key header
Every request carries an Idempotency-Key header. Every retry of the same send carries the same key. A new send, for example when the company comes back to your website, gets a new key.
To drop repeats, keep the keys you have processed for a day and skip any request whose key you have already seen. Answer it with 200 so it isn't sent again.
Troubleshooting
Leads arrive late or not at all: check that your endpoint returns
2xxwithin 5 seconds, and that it doesn't reject the request because of the security token or the payload size.Duplicate records: skip requests whose
Idempotency-Keyyou have already processed, or update by the lead'sid, as described above.
