Skip to main content
Solved

What info is included in the "question.Answered" webhook?

  • May 10, 2023
  • 9 replies
  • 103 views

Daniele Cmty
Forum|alt.badge.img+1

Hello inSpired Community! ❤️

I’m trying to get more info about the question.Answered Webhook that can be found here on the API Documentation

 

 

What kind of info does this Webhook contain? (On a user level, post level, date level...)
There are no explanations on the Documentation and I wanna learn more about it.

 

Use case: we are transfering all our Community Analytics to Tableau and have most of the important Data points, except for “Best Answer” Data which we need to use in order to calculate peer support in our Community. However this data point is not included in the API so we’re looking into Webhooks as a workaround.

Cheers!
Daniele

 

 

Best answer by tom.shaddock

Hey @Daniele Cmty here’s an exact example payload of this:

{
"question.Answered": {
"markedAsAnswerBy": "9",
"previousAnswerAuthorId": "",
"previousAnswerId": "",
"publicId": "1539",
"questionId": "259",
"replyAuthorId": "374",
"replyId": "206"
}
}

 

Hope it helps!

9 replies

Daniele Cmty
Forum|alt.badge.img+1
  • Author
  • Helper ⭐️⭐️
  • May 11, 2023

I just found a  relevant discussion from 3 years ago

 

Hey ZapierSteph,

We do have a webhook for when a best answer is marked, which includes the user id of the user who marked the answer (see here on subscribing to webhooks).

The eventName is question.Answered

{
"questionId": "129",
"previousAnswerId": "",
"previousAnswerAuthorId": "",
"markedAsAnswerBy": "2008",
"replyId": "22",
"replyAuthorId": "2002"
}

Let us know if this helps you achieve what you’re after!

 

Can somebody from the Team confirm that this is still the case or if anything has changed in the meantime?

 

Cheers,
Daniele


Alistair FIeld
Forum|alt.badge.img+4

@leo-inspired or @olimarrio 

Can you confirm the validity of the above API for @Daniele Cmty ?

🙏🏻


tom.shaddock
  • Gainsight Employee ⭐️⭐️
  • Answer
  • May 11, 2023

Hey @Daniele Cmty here’s an exact example payload of this:

{
"question.Answered": {
"markedAsAnswerBy": "9",
"previousAnswerAuthorId": "",
"previousAnswerId": "",
"publicId": "1539",
"questionId": "259",
"replyAuthorId": "374",
"replyId": "206"
}
}

 

Hope it helps!


Daniele Cmty
Forum|alt.badge.img+1
  • Author
  • Helper ⭐️⭐️
  • May 11, 2023

Thank you @tom.shaddock!

Is there also a timestamp associated with it so we can know when the action took place?
(I guess it’s built into the webhook?)


tom.shaddock
  • Gainsight Employee ⭐️⭐️
  • May 11, 2023

Yep correct - timestamps are whenever you received the webhook broadcast event (as they happen in realtime the moment an event takes place).


Daniele Cmty
Forum|alt.badge.img+1
  • Author
  • Helper ⭐️⭐️
  • May 11, 2023

Great, thanks!

What about an edge case where a Best Answer is unmarked and assigned to a different reply, what happens then? Is a new Webhook created? 

 

Cheers.
 


Daniele Cmty
Forum|alt.badge.img+1
  • Author
  • Helper ⭐️⭐️
  • May 11, 2023

On a different note: this info is completely missing from the  API Documentation, as you can see on my screenshot at the very top,  so it would be super useful if it can be amended 😇 


tom.shaddock
  • Gainsight Employee ⭐️⭐️
  • May 11, 2023

Great, thanks!

What about an edge case where a Best Answer is unmarked and assigned to a different reply, what happens then? Is a new Webhook created? 

 

Cheers.
 

Yes thats correct, a new broadcast event will be emitted and yep point noted about this being missing from the documentation 🙂


Daniele Cmty
Forum|alt.badge.img+1
  • Author
  • Helper ⭐️⭐️
  • May 12, 2023

One more question @tom.shaddock (sorry, they keep popping up)

 

Q: What about an edge case where a Best Answer is unmarked and assigned to a different reply, what happens then? Is a new Webhook created? 

A: Yes thats correct, a new broadcast event will be emitted 


What happens with the “old” broadcast event, will that be overridden or will there be two separate entries?

Just making sure that changing a best answer will not break my reports 😬

Thank you!