You can easily write the response from a webhook directly into a lead field.

To do this, go into the widget settings in Salesbot and choose the specific field where you want the response to be saved:

image.png

Writing a Specific Variable's Value

If the webhook response is in JSON format, it's possible to capture and store just a specific value from the response instead of the entire payload.

To do this, in the "Path to value" field, provide the path to the variable you want to extract.

Example

Here's a sample JSON response:

{
  "address": {
    "street": "Alexanderplatz",
    "house_number": "1",
    "postal_code": "10178",
    "city": "Berlin",
    "country": "Germany"
  }
}

If you only need the street value, in the “Path to value” field, you’d enter: address.street

image.png

If the path is correct, only the value of that variable will be written to the lead field.

However, if the variable isn’t found, the entire response will be saved to the field instead.

<aside> 💡

Please note that writing the response into the lead field may take several minutes. Therefore, if you need to use the field’s value in the next steps of the bot, we recommend setting a 5-minute delay after sending the webhook.

SCR-20241003-qxtf.png

</aside>

<aside> 👨‍💻 Support Contacts: