Webhook

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
jannes
Posts: 100
Joined: Tue Jul 02, 2019 12:22 pm

Webhook

Post by jannes »

We want to use : https://www.calculoid.com/web-calculato ... -calculoid
for onboarding customers (in a WordPress-website) and send data via a webhook (REST-API) to AIM.

Is it possible ? Can AIM "listen" to receive incoming data ?
Which URL must be specified ?
How to set up the "process" in AIM which is receiving the data ?

= Jannes
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Webhook

Post by Jaymer »

Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
jannes
Posts: 100
Joined: Tue Jul 02, 2019 12:22 pm

Re: Webhook

Post by jannes »

Hi Jaymer,

I used the CRM-with_REST.bsv (in my AIM called "CRMRest").

I added in BO "REST_custs" the property : communication = REST
Name : custs
Base URL : http://<IP server>/AwareIM/REST/CRMRest
HTTP Verb : GET

Request body : application/json
Use this string : name


In PostMan :
http://<IP server>/AwareIM/REST/CRMRest/custs?name=All

Authorization :
Username : admin
Password : password

But there is no response yet.

Any idea ?
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Webhook

Post by Jaymer »

I’m not sure exactly what you’re saying.
You say you used this BSV, but then you made a new BO.
That’s not what the instructions say to do.
I think I would go back and create a CRM app using the sample application.
Then import my demo BSV over the top of that, just like it says in that other thread.
Publish it, And it should work right away with no changes.
Try to get that working first before you try to work with your BSV
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
jannes
Posts: 100
Joined: Tue Jul 02, 2019 12:22 pm

Re: Webhook

Post by jannes »

Hi Jaymer,

Your example is workin now.
I can enter an URL now in the browser to request a service in AIM.
That's great. Thanks!

The next step to let Calculoid work with it.
However, the result = exception: Unrecognized content type application&#47;x-www-form-urlencoded in the body of the request

The content-type should be :
Content type: text/html;charset=utf-8

Is there a way to specify the content-type in your example ?

= Jannes
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Webhook

Post by Jaymer »

Not at my desk, but that would be up to aware.
I’m not sure if there is any setting on the REST screen to set a Type.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: Webhook

Post by johntalbott »

It looks like the content-types that can be exposed are application/json or text/xml

https://www.awareim.com/forum/viewtopic ... 880#p50880
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Webhook

Post by Jaymer »

In the upper right of the REST screen, there's a section:
Reply Returned by the Service

Aware is probably setting the header to match the type selected by those radio buttons.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
jannes
Posts: 100
Joined: Tue Jul 02, 2019 12:22 pm

Re: Webhook

Post by jannes »

Calculoid support responded :

The webhooks, for now, send the data in application/x-www-form-urlencoded content-type/format.
Unfortunately, there is no other option.

========
Let us don't give up.
It would be a nice add-on when Calculoid-forms could be used.
I asked Vlad to look also.. hope it helps..

= Jannes
Post Reply