我们的印象是,我们可以添加一个web钩子/url与每个收件人,我们添加使用收件人/散装。因此,如果我们的收件人看起来像下面,我们就可以添加每个条目的web钩子数据。在查看了一段时间的文档之后,似乎没有出现这种情况。
{
"contacts" :[{
"email":"email@here.com",
"first_name": "John",
"last_name": "Doe",
"custom_fields": {
"1": "2428156"
}
},
{
"email":"somebodyelse@here.com",
"first_name": "Somebody",
"last_name": "Else",
"custom_fields": {
"1": "2428143"
}
}]
}有人知道这是否可能吗?如果不是,其他人如何批量发送收件人,并让列表中的每个收件人转到适当的web钩子URL来解析响应?
提前谢谢你,乌帕
发布于 2016-12-20 18:24:36
可用的web钩子事件用于响应,而不是收件人。您可能要做的是为您的所有响应提供一个钩子,例如:
POST /v3/webhooks
{
"name": "Test Webhook",
"event_type": "response_completed",
"object_type": "survey",
"object_ids": ["<survey_id>"],
"subscription_url": "http://example.com/mywebhook"
}然后,对于指定调查的每一条已完成的消息,您将得到一个通知,其中的正文类似于您的subscription_url:
{
"respondent_id": "<response_id>",
"recipient_id": "<recipient_id>",
"survey_id": "<survey_id>",
"user_id": "<user_id>",
"collector_id": "<collector_id>"
}recipient_id将让您知道该特定响应是哪个收件人,您可以将其用于任何您的用例。如果需要更多信息,则可以请求获取回应细节。
GET /v3/surveys/<survey_id>/responses/<response_id>/details或者,如果不需要答案,只需要响应的元数据,就不要包含/details。
或者,如果您需要更多关于收件人的详细信息,而不是有关响应的详细信息,则可以获取收件人详细信息。
GET /v3/collectors/<collector_id>/recipients/<recipient_id>这给了您可能已经存储在extra_fields或诸如此类的信息。
https://stackoverflow.com/questions/41246880
复制相似问题