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 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b