dousuochu7291 2019-01-14 23:45
浏览 68
已采纳

FluidReview / SurveyMonkey应用 - webhook格式化/设置问题

I'm having trouble implementing webhooks in FluidReview (used to be SurveyMonkey Apply). Specifically, I want to send a webhook with the applicant and current application status, triggered upon any change in application state, so that we can update our CRM with the latest status data. The problem is that I can't figure out setup the webhooks in FluidReview, and their documentation is abysmal (Fluid Review Webhooks, Fluid Review Triggers). Can anyone help me out by providing an example of setting up a simple or advanced webhook?

Steps followed thusfar:

1) I have a php endpoint on my wordpress site that uses the following code snippet to save the JSON from a webhook to the error log:

if(isset($_GET['fr-listener']) && $_GET['fr-listener'] == 'fr') {
    error_log("fr-listener==fr hook caught!");
    if($json = json_decode(file_get_contents("php://input"), true)) {
    // if($json = json_decode(file_get_contents("php://input"), true)) {
        error_log("JSON found");

        error_log(print_r($json,true));
        error_log(var_dump($json));
        // $data = var_export($json, true);
        // error_log("data dump: " + $data);
        // print_json($json);
    } else {
        error_log("no JSON found");
        print_r($_POST);
        $data = $_POST;
    }
}

I can use this to successfully catch webhooks from Stripe (I used the above snippet to help develop my Stripe webhook catcher) and get a look at their JSON contents. When I catch one of the webhooks from FluidReview, I get the "no JSON found" response. This is how I have the webhook set: My Webhook Action (URL = https://wfadev.pairsite.com/listen?fr-listener=fr, Method = POST, Request content = {{applicant.email}})

2) I have tried both setting simple and advanced webhooks, and neither of them are producing the JSON output I'd expect.

  • 写回答

1条回答 默认 最新

  • dongmi1864 2019-01-15 17:55
    关注

    I did some more testing and it turns out that the "Request content" field is just a blank text field. To have it send JSON data from FluidReview, write it out like this, using the piping variables ("{{variable name}}")

    {
    "first_name": "{{user.first_name}}",
    "last_name":"{{user.last_name}}",
    "email":"{{user.email}}",
    "application_type":"{{user.}}",
    "date":"{{date}}",
    "trigger":"{{trigger}}"
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PointNet++的onnx模型只能使用一次
  • ¥20 西南科技大学数字信号处理
  • ¥15 有两个非常“自以为是”烦人的问题急期待大家解决!
  • ¥30 STM32 INMP441无法读取数据
  • ¥15 R语言绘制密度图,一个密度曲线内fill不同颜色如何实现
  • ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
  • ¥15 用visualstudio2022创建vue项目后无法启动
  • ¥15 x趋于0时tanx-sinx极限可以拆开算吗
  • ¥500 把面具戴到人脸上,请大家贡献智慧,别用大模型回答,大模型的答案没啥用
  • ¥15 任意一个散点图自己下载其js脚本文件并做成独立的案例页面,不要作在线的,要离线状态。