- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
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)
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
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.
- 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. - 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.
- 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
- The notification endpoint specification in Swagger is wrong. It returns the Json displayed in the webhook tab.
- The developer support does not have access to logs for webhooks.
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.
- 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. - 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. - 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 - The notification endpoint specification in Swagger is wrong. It returns the Json displayed in the webhook tab.
- The developer support does not have access to any logs for webhooks.
Hello, could you please send your API Client ID & Company ID that webhook subscription made with ? <developersupport@visma.com>
