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 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。