Answered

Get the ref and id for choices in a webhook


Userlevel 4
Badge +2

Hey,

Would it be possible to have the ref for choices be added to the webhook payload? Right now, the response from the response API looks like this:

{
"field": {
"id": "VGEKytqoG5pL",
"ref": "question-type_membership-level",
"type": "multiple_choice"
},
"type": "choice",
"choice": {
"id": "oIw7G6Aav6vT",
"ref": "membership-level_Lev5",
"label": "Level 5 - Phaser Lotus"
}
}

While the webhook payload, for the same response, looks like this:

{
"type": "choice",
"choice": {
"label": "Level 5 - Phaser Lotus"
},
"field": {
"id": "oIw7G6Aav6vT",
"type": "multiple_choice",
"ref": "question-type_membership-level"
}
}

Both the id and ref field for the choice is absent from the payload. 

As far as I can tell, these fields were added to the response API a few months ago. Would it be possible to also have it added to the webhook payload?

 


 

If relevant, the main use case that this impacts is that we are using a typeform to gather input, which in turn is used to generate a new typeform. For instance, in the initial typeform, we gather the name, workspace, theme, and more, for a desired new typeform. We then use this information to generate a new typeform through the Generate API. We prefer to use the ref field instead of the label to identify choices, as the strings in the labels will probably be more frequently changed than the code we add to the ref field.

We’d prefer this to happen right after the initial typeform is submitted, as webhook response. However, without the ref field, that’s a bit more tricky. We could work around it, for instance by adding an API call to the response API using the token from the webhook payload, but instead settled on a scheduled update once an hour.

Regards,

Mikkel

icon

Best answer by mathio 15 July 2022, 12:54

View original

11 replies

Userlevel 7
Badge +5

@picsoung or @mathio might have some insight on this!

Userlevel 7
Badge +5

Hello @Mikkel I think this is a valid point and a good feature request. @Liz can you please help with getting this request to respective team?

Userlevel 4
Badge +2

Much obliged, @mathio 😊

Userlevel 7
Badge +5

Hey @Mikkel 

This makes a lot of sense, and we indeed added this to the webhook payload a few months ago, but we had to revert it because it was causing issues with forms with too many options 😅

We are looking for better solutions to implement this feature, and hopefully, it should be back soon 🤞

Userlevel 4
Badge +2

Hey @picsoung, and thank you for the update! Out of curiosity, would it be possible to read somewhere about what the issues were?

Userlevel 7
Badge +5

@Mikkel I believe the issue was mainly about sending payloads that were too big, and it was causing some overflow issues on both sides.

Userlevel 4
Badge +2

Ah, I see! Thank you for explaining, and I hope you can resolve the issue without too much trouble.

Userlevel 1

Hi @picsoung,

Is there any update ? We are very interested for this feature, as we have complexe scores processing in the backend for a survey of more than 500 questions.

Without the ref of the choice for each answer in the payload, we must find the choice number based on the label in the backend side, which is very time consumming when the backend receives the payload.

Best regards

 

Is there any update with this? We are also experiencing the same pain point. 

Any update here? Also running into this issue here. Otherwise I need to match the label to a record in the db...

Userlevel 7
Badge +5

@Mikkel @makle @PaJones @nickola we just released this update below which you might like! 😀

 

Reply