$ bin/console app:webhook:configure dummy-subscriber \
--url "https://dummy-endpoint.com/webhooks" \
--lead-type "facebook_form" \
--lead-type "instagram_form" \
--erp-shop-id "shop1" \
--erp-shop-id "shop2"
> WebhookConfig successfully created with secret "25af5d78-572c-4d29-ae42-999d499f43db"
Types de lead supportés:
EventSubscriber Symfony côté lisa-app qui envoie les leads normalisés dans la queue SQS via aws/aws-php-sdk
{
"body":{
"created_at": "2005-08-15T15:52:01+00:00",
"retry": 0,
"id": "ee76725c-53e2-5aa9-b5ec-ef4eddfb6f4d",
"geolid_shop_id": "erp shop id",
"customer_shop_id": "XXX",
"lead_type": "facebook_form",
"first_name": "John",
"last_name": "Doe",
"full_name": null,
"address": "1563 cours bayard",
"city": "La Clusaz",
"zip_code": "74220",
"phone": "0609653214",
"email": "john@example.com",
"is_geolid": true,
"is_organic": false,
"extra_data": {
...
}
}
}
Standard JSON document
Signature HMAC SHA1 crée à partir du payload JSON et du secret généré pendant la configuration du payload
sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
Le secret est transmis à la lambda via le message SQS, encrypté au préalable avec paragonie/halite (basé sur libsodium) et décrypté par la lambda
Requête HTTP POST sur l'url configurée au préalable côté lisa-app.
POST /webhooks HTTP/1.1
Host: localhost:4567
X-Hub-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
Content-Type: application/json
Content-Length: 6615
{
"body":{
"created_at": "2005-08-15T15:52:01+00:00",
...
}
A partir de la date du premier échec d'envoi, on retry à:
2 Monolog handlers câblés :