ENGAGE HELP CENTER
Sending activity submissions to webhook
This section will describe the functionality of sending activity submissions to webhook.
You can configure an activity to call a webhook every time someone completes it. With that, every time your activity is completed, Engage will send the user's submitted answers to the endpoint (webhook) of your choice.

To make it work, you will need:
- the webhook itself,
- authentication credentials, so that Engage can access your webhook.

Here is an example of data Engage will send you:
{
  "participant_id": "AABB0011",
  "activity": "abcdef",
  "answers": {
    "question1": {
      "answer": "Pizza",
      "answer_value": "item2",
      "question": "Favorite food",
      "question_value": "question1",
      "type": "radiogroup"
    },
    "question2": {
      "answer": 61,
      "answer_value": 61,
      "question": "Age",
      "question_value": "question2",
      "type": "text"
    }
  },
  "url_variables": {
    "visit_id": "qqwweerrtt00998877"
  },
  "response_alerts": [
    {
      "name": "older_than_50",
      "color": "#ff7c87ff"
    }
  ],
  "calculated_answers": {
    "square_root_of_age": 7.81
  }
}
Engage webhook caller supports POST and GET methods. With the POST method the full participant answer, like in the example above, is sent to the webhook.

With the GET method only the participant_id is sent to the webhook. Like in the example below:
{
  "participant_id": "AABB0011",
  "activity": "abcdef"
}
If there is no authentication method set, then the webhook is called without authentication. In such case only the GET method is allowed and no data is sent in the request.
Our team is ready to provide you assistance in any of the steps and will gladly guide you through the process.

Do not hesitate to contact us via support@longenesis.com if you have any questions or any help is required.