rudderlabs / rudderstack-docs

Documentation repository for RudderStack - the Customer Data Platform for Developers.
https://rudderstack.com
MIT License
23 stars 45 forks source link

Need more detail on the payload being sent and examples on transformations on the payload #1194

Open asennoussi opened 1 month ago

asennoussi commented 1 month ago

https://www.rudderstack.com/docs/destinations/webhooks/setup-guide/ I'm dying to try to change the payload to a simple payload:

[{
    "version"    : 1,
    "type"       : "track",
    "userId"     : "019mr8mf4r",
    "event"      : "Purchased an Item",
    "properties" : {
        "revenue"        : "39.95",
        "shippingMethod" : "2-day"
    },
    "timestamp" : "2012-12-02T00:30:08.276Z"
}]'

But the webhook payload has always a specific format:

{
    "body": {
        "XML": {},
        "FORM": {},
        "JSON": {
                    "data": {
                        "premium": false,
                        "question_id": 103597,
                        "answers_count": 0
                    },
                    "name": "Question visited",
                    "external_id": "0f288e49-fbd6-4d65-a7af-ecadfdd225da"
                }
        },
        "JSON_ARRAY": {}
    },
ameypv-rudder commented 6 days ago

Hi @asennoussi - thanks for raising the issue and apologies for a delayed response - we'll get back to you ASAP.