Mentoring Session - Webhooks and Acumatica with Naveen Boga - September 27, 2023 - Recording

  • 13 September 2023
  • 22 replies
  • 411 views

Userlevel 7
Badge

Hi everyone,

We’re delighted to announce this Community Mentoring session with @Naveen Boga!

Webhooks and Acumatica

Naveen will give a session on the use of webhooks with Acumatica

Community Mentoring sessions are approximately 30 minutes and limited to small groups (10-12) of members with one of our power users who is an expert on a topic. If this session is one you feel will help you in your development journey with Acumatica, please let us know in the comments below. We’ll be selecting from those who respond to attend on September 27th at 9am PT(12pm ET). The session will be recorded and recording posted to the Community Resource Library.

Naveen Boga, Technical Lead, Kensium


22 replies

Badge +11

I would like to attend.

Userlevel 7
Badge +10

I’d like to attend

Userlevel 6
Badge +4

I am interested, but I also can yield my spot and wait for the recording if the workshop fills up.

I would like to attend.

Userlevel 7
Badge +5

Yes please!

I’d like to attend, thank you!

Hello, I would like to attend. 

Userlevel 4
Badge

Hello, I would like to attend

Hello, I will be present at the session

Userlevel 1

I’m in!!

Userlevel 7
Badge

Thank you everyone who has responded! We have only a couple spots left.

Userlevel 5
Badge +2

I’d like to join this session.

Userlevel 7
Badge +11

I am interested.

Userlevel 7
Badge

Hi everyone - We have reached to limit on attendees. We will be recording the session for those who missed the opportunity to participate live. Thank you!

Userlevel 7
Badge

Thank you @Naveen Boga for this great mentoring session! For those who missed it (or would like to watch again) below is the recording.

 

Naveen has also supplied the presentation and sample webhook project attached.

 

 

Userlevel 6
Badge +4

Thank you, @Naveen Boga.  To follow up from my question in during the session… I am running 23r1.  Acumatica seems to have marked IWebhookHandler as obsolete in PX.Data.Webhooks with a message stating to use PX.Api.Webooks.IWebhookHandler which actually is not available to us yet in 23r1.  From what I understood in this session, we should continue to use it in PX.Data.Webhooks through 23r1 and be prepared to make the change when upgrading to 23r2.

 

 

Thank you for clearing up this confusing misdirection within the Visual Studio IDE on 23r1!

Userlevel 7
Badge +18

Hi @Brian Stevens  In the 23 R1, both WebhookHandlers are supported. Please refer to my screenshots below. Hope the below info will clarfies.

  1. PX.API.Webhook.IWebhookHandler (Use this, we need to add the PX.Api.Webhooks.Abstraction DLL as a reference)
  2. PX.Data.Webhook.IWebhookHandler (But is obsolete but still supporting 23 R1 and completely removed in the 23 R2)

 

 

23 R1  - PX.API.Webhook.IWebhookHandler

 

23 R1  - PX.Data.Webhook.IWebhookHandler
Recommended to use this DLL from 23 R1 version

 

This info from 23 R1 Developer Release Notes

 

 

Userlevel 6
Badge +4

Thank you, @Naveen Boga .  I had added PX.Api.Webhooks,dll instead of PX.Api.Webhooks.Abstraction.dll which explains why I couldn’t see it as valid in 23r1.

Userlevel 7
Badge +18

@Brian Stevens  You're welcome! Thank you for the clarification. Kindly let me know if you have any other questions.

Userlevel 2
Badge

In the older versions of the IWebhookHandler (using PX.Data.Webhooks) I could get the body of the request like this: var result = request.Content.ReadAsStringAsync().Result;

How do I accomplish the same thing with the new version (PX.Api.Webhooks)? 

Userlevel 4
Badge

Now I think the WebhookContext object has request and response, 

so you can read like this

var result = new JsonTextReader(context.Request.CreateTextReader()))

 

Here my example

 

public async Task HandleAsync(WebhookContext context, CancellationToken cancellation)        
{
if (!context.Request.Headers.TryGetValue(HeaderNames.Authorization, out var authValue))
{
context.Response.StatusCode = StatusCodes.Status401Unauthorized; return;
}
if (authValue != "Bearer token")
{
context.Response.StatusCode = StatusCodes.Status403Forbidden; return;
}

using (var scope = GetAdminScope())
{
if (context.Request.Method == HttpMethod.Post.Method)
{
MyCustomGraph graph = PXGraph.CreateInstance<MyCustomGraph>(); using (var result = new JsonTextReader(context.Request.CreateTextReader())) {

… do something
}
Badge

@Naveen Boga How do we include “PX.Api.Webhooks.Abstractions” in the customization project?

My customization project does not get deployed and build fails since the dll is missing. I do not see this dll while trying to add files in customization.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved