Conversations API Beta

ryan-cambium
投稿者

newMessage Webhooks should include the message body

newMessage webhooks should include the message body -- or at least a truncated version.

 

The fact that the webhooks don't provide this information means that I have to refresh my access token and then issue a request to pull the content myself. In high-volume environments, this could add significant extra compute cost. This is compounded by the fact that in my scenario, we're expecting to ignore the majority of new messages; something I was hoping I'd be able to do quickly based on the payload.

 

I don't think privacy should be a concern here. The application has already been approved by the customer. 

4件の返信
jhartz
HubSpot製品開発チーム
HubSpot製品開発チーム

newMessage Webhooks should include the message body

Hey all, thanks for the feedback here.

 

One other thing I want to point out is that you shouldn't need to refresh your access token for each request; each access token should live for about 30 minutes before it expires (more info here), so you should be able to reuse the same access token within that 30-minute window.

 

That doesn't resolve the concerns you've brought up here, but it might let you reduce the 2 round trips to just 1 round trip in some cases.

0 いいね!
JCarber
HubSpot製品開発チーム
HubSpot製品開発チーム

newMessage Webhooks should include the message body

@ryan-cambium @PWickham thank's for the feedback! We see what you mean that having more information in the webhooks payload would be valuable. It's not something we are able to solve immediately but we are keeping this in mind as we continue to develop our conversation's APIs and the webhooks that go with them. If there is other specific metadata besides what has already been mentioned that comes up that would help to add, please feel free to update us here so we can keep track of the requests for improvement.

0 いいね!
ryan-cambium
投稿者

newMessage Webhooks should include the message body

Furthermore, any additional metadata that could be included here would be useful as well. i.e. the channel_account that it arrived in, the actor ID, etc. 

0 いいね!
PWickham
参加者

newMessage Webhooks should include the message body

+1 for this. I know we want event surface area to be small, but 2 round trips (refresh token, then fetch message) for something as high-frequency as "new message" is a lot of overhead.

Other info that would be useful on the newMessage hook (currently looking this up on each webhook):
- Direction
- clientType (integration / Hubspot dashboard)
- Sender (agent ID / hs emails / anything)