Discussions

Ask a Question
Back to All

Survey : How to get submitted data on Surveys on a Webhook or via API

I have checked API Docs, and Webhook couldn't find how to send all the data from a survey to Webhook or Get Data via API.

This is what I am referring to.

I want to send all of this data to How to do https://prnt.sc/r_r9Ymm2Z2ni

Admin

Hey Amir,

Have you checked the FormSubmission resource? This should provide you with the data that you are looking for, since after all, a survey submission is a form submission. Please let me or support know what workspace you are acting on if you still experience issues.

Marked as answered by Rich Steinmetz

Yes, I tested the FormSubmission, and it doesn't send any notification when a Survey Form is filled out. I tested with Funnel Step and without Funnel, but it doesn't send anything. It only sends data. When "workflows/steps/integration_step.executed" is selected on the webhook, that sends data only for name, email, and phone but not the data for the Quiz Answers

If survey results are unavailable for Webhook, please advise how I can query the survey result data via API.

Kindly guide!

Admin

Hey Amir, thanks for the clarification, we will look into this further!

Admin

Hey Amir,

Sorry for the delay here, we are knee-deep into the preparations for the FHL at the moment!

I verified your issue. "Surveys" is quite a recent feature and we don't have a nice object for you in place right now, that has all the information bundled from all survey steps. We will be working on enabling an easy retrieval of the data in the near future.

In the meantime, you can still get that data by leveraging several API resources. For example, you could poll the API for recent Forms::Submissions::Answer records:

    {
        "id": 18,
        "public_id": "wjGvNP",
        "submission_id": 10,
        "field_id": 5,
        "fields_option_id": null,
        "entry": "Jose", // <- User's answer.
        "fields_option_ids": [],
        "created_at": "2025-02-04T14:38:54.927Z",
        "updated_at": "2025-02-04T14:38:54.927Z"
    }

You can see that the "entry" field is the user's answer to one of your survey questions. From here, you could ping the Forms::Submission, Forms::Field, and Forms::Fields::Options APIs to get more information about the field, the contact and the submission that this answer maps to.

Depending on the data you gather and your exact use case and where you want to send the data to, there might also be easier ways to get there than what I suggest above (which is more of a current workaround).

Thanks for the response. I successfully made a request via API and received the response, but there is no reference in the API response where the Lead was originally generated. example: https://prnt.sc/PI54njF9WUSa

Without funnel ID or Quiz ID, I can't map the data correctly.

The second issue with API response is that it doesn't provide Answers that the user made via the Quiz

Pls advise. TY

Admin

Hey Amir,

Yes, unfortunately, those don't have that info yet. It would help us prioritize this work if you could make a feature request here.

The answers are here: Forms::Submissions::Answer

Unfortunately, currently you would need to pick each answer separately and map it back to the form/contact it came from.

Marked as answered by Rich Steinmetz

ο»Ώ