Solved

Dynamic objects versus application webhooks v rule webhooks

  • 22 June 2023
  • 3 replies
  • 85 views

Userlevel 2
Badge +2

I’m looking to implement a lookup to an external database where I'm basically fetching a row based on a query to bring data into a Front conversation. I’m wondering what the best solution would be between webhooks (application or rules) and dynamic objects.

icon

Best answer by Javier - Developer Relations 22 June 2023, 18:51

View original

3 replies

Userlevel 5
Badge +8

Dynamic objects are a fantastic and simple way to set up links to external systems. However, it sounds like that’s not really your primary use case here. Therefore, I would recommend using an Application Webhook to be notified of new messages and using the Core API to add data to the Front conversation (I assume as a comment).

Userlevel 2
Badge +2

Ok I think I follow, I think the reason I liked using Dynamic objects for this problem is because we can
1.) Be very specific about when we want to perform a lookup to an external system, IE - the existence of a specific ID in a message
2.) Go directly to the external application without needing to use a middleware or in-house solution. To your point will we be able to create additional conditions on the Application Webhook in the future?
Imagining the webhook would be: Send 'Inbound Messages' WHERE body of email contains 'Order-XXXXX', rather than sending all events of inbound messages to be parsed for the existence of an ID

Userlevel 5
Badge +8

In that case, the behavior you are describing is closer to sending webhook requests from the rule engine, so I would instead recommend using rule webhooks. The conditions for Application Webhooks are designed to be as generic as possible so as to allow the implementation details to be customized by the customer, so for what you’re describing you’ll want to look at rule webhooks. You can read more in our Webhooks topic

Reply