Customize Business Central webhook payload

Hi

I am currently working on integrating Business Central with our upcomming PIM system.

The use-case is as following: When an item is updated in Business Central PIM should be notified with following attributes:

  • Update DateTime
  • Item No.
  • Old Value
  • New value

To solve this, I have been taking a look into webhooks in Business Central.

Currently I have been able to Subscribe to my own custom API but it seems like the payload is fixed and cannot be changed.

The default payload I recieve is as following:

My Question:

Is there anyway to customize this payload, so I am able to recieve the data I need through the default webhook implementation Microsoft has made?

Otherwise I think I would have to make a custom webhook implementation and use the TaskScheduler to fire the events.

What are your thoughts on this?

Thanks in advance :slight_smile:
Nicolai Rosenkvist

You cannot customize the payload.
With the resouce you can get the whole record and then change those fields in your other application.

Okay thanks.

Doesn’t really fit my use-case, since I only want to update the fields which actually got changed and not update the whole item in PIM. Of course I could do validation code on those fields in PIM.

Also I assume the flow would be as following:

BC Notifies PIM with update → PIM calls BC to get that record → PIM updates itself with data from record.

Instead of validating data from a whole record I think I will just proceed with good old httpclient and make post requests with that one field, which has been updated, based on events instead.

Yes indeed your flow is correct.
PIM has to call BC to get the record.