My Products
Help
adrianm
PARTNER

Is it possible to see the webhook response?

by adrianm

I have a webhook receiver in Azure which is never triggered.


If I run the hook receiver in my own network instead it works fine.

It also works if I manually post with curl to the (Azure) hook receiver from my machine.

I have other similar Azure hook receivers which works fine.


I'm sure I have done something stupid or missed some configuration but I am out of ideas where to look. Can you see what response this hook got?

Visma.Net shows

{"EntityId":"e08f35c8-fa82-42c0-8c78-3e3473ee1165",
"NotificationId":"a9c45d9e-24d4-4e2e-bd69-1827f6017ff1",
"EntityLocation":"api/v1/salesorder/4300078",
"Event":"SalesOrder_Action_Triggered",
"ActionCommand":"https://<hidden>.azurewebsites.net/api/CalculateFreight",
"TimeStamp":"638097334481200000",
"ApiClientId":null,
"TenantId":"bb504cc1-6034-11ed-98d8-06a0b4eada6b",
"ConnectId":"385e779c-4b1d-4d64-ac86-7be9ae96f448",
"IsScheduler":false}

(also curious why the json displayed in Visma.Net is not the same as the one sent)
 

 

4 REPLIES 4
Florian Haase
PARTNER

by Florian Haase

We are using ngrok a lot. This also has a web-interface and a great way to see if the webhook is triggered and also the payload of the webhook message.

 

Florian

adrianm
PARTNER

by adrianm

I assume Visma changed something because on friday the azure webhook receiver worked without change.
(Visma.Net version is changed from 9.30.00.1004 to 9.30.00.1005).

 

One difference I see is the webhook body is back to the original content without the clientid, tenantid etc which was introduced in 9.30.00.1004.

 

Anyway, I learned some things which is probably public knowledge but new to me.

  1. The webhook registration is connected to the user (i.e. token).
    It means two tokens generated with different users can't see each other's subscriptions.
    I understand it must be that way but I haven't seen it stated anywhere.
  2. The only webhooks actually sent are the ones registered via the subscription endpoint. i.e. if you create a menu item in the GUI, the webhook tab will show event "Sales_Action_Triggered" but the hook sent is "salesorder_changed". (if you haven't subscribed to the "salesorder_changed" event nothing is sent). In general the information in the webhook tab is mostly useless.
  3. If your receiver returns an error code 4xx,5xx, Visma.Net will resend the hook 6 times with exponential backoff i.e. somthing like 2s,4s,8s,16s,32s,64s
  4. The notification endpoint specification in Swagger is wrong. It returns the Json displayed in the webhook tab.
  5. The developer support does not have access to logs for webhooks.

 

adrianm
PARTNER

by adrianm

I assume Visma changed something because this friday the azure webhook receiver started working.
(Visma.Net version is changed from 9.30.00.1004 to 9.30.00.1005).

 

One difference I see is the webhook body is back to the original content without the clientid, tenantid etc which was introduced in 9.30.00.1004.

 

Anyway, I learned some things which is probably public knowledge but new to me.

  1. The webhook registration is connected to the user (i.e. token).
    It means two tokens generated with different users can't see each other's subscriptions.
    I fully understand it must be that way but I haven't seen it stated anywhere.
  2. The only webhooks actually sent are the ones registred via the subscription endpoint.
    i.e. if you create a menu item in the GUI, the webhook tab will show event "Sales_Action_Triggered" but the hook sent is "salesorder_changed".
    (if you haven't subscribed to the "salesorder_changed" event nothing is sent)
    In general the information in the webhook tab is mostly useless.
  3. If your receiver returns an error code 4xx,5xx, Visma.Net will resend the hook 6 times with exponential backoff
    i.e. somthing like 2s, 4s, 8s, 16s, 32s, 64s
  4. The notification endpoint specification in Swagger is wrong. It returns the Json displayed in the webhook tab.
  5. The developer support does not have access to any logs for webhooks.

 

by Yıldırım (Updated ‎20-01-2023 09:49 by Yıldırım VISMA )

Hello, could you please send your API Client ID & Company ID that webhook subscription made with ?  <developersupport@visma.com>