Next step …hub with data migration
Wow! Things just keep getting better and better… Thanks a lot for the great job
First thank you @revant_one for this awesome addition. Do you think I can utilize Webhooks in the following scenario:
- Multiple Erpnext websites e.g Companies (here each company has its own Erpnext instance under subdomain)
- One Erpnext website acts as unified customer portal
- The Companies utilize Webhooks to send updates to the portal
- costumers in portal can also make actions which triggers webhooks where the request URL is to the respective company
Do you think web hooks are suitable for such scenario?
I think it is suitable for such scenario. You can try it out.
Endpoints to receive the data sent by webhook have to be implemented on portal and on company servers.
You can also use it in combination with Custom apps for cloud users [extend ERPNext with microservices] to achieve single sign on
@revant_one thanks a lot. Yes I was planning to test the microsrvices , how do you think microservices would help me in that scenario?
Now i’m setting up WSO2 Identity Server and will test the single sign on with your integration of Open ID
Each of your frappe server is a separate service? Single Identity provider can provide userids to all your services. No need to create users on all services separately. Just
Login via Frappe via the main Frappe IDP
I’ve not use this service.
In case of frappe, primary identity provider is one of your frappe server.
This server will host all your identities. OAuth 2 provider for Frappe Apps - #12 by revant_one
I think I get what you mean, but correct me if I’m wrong.
Have all the Webhooks in a Microservice Custom App that will be installed on Companies servers
where this Microservice Custom App is granted tokens by OAuth 2.0 (here I assume all the companies share the same identity provider) , at the same time use Webhoks at the portal to inform the Microservice Custom App of any changes made by the customer
Thanks @revant_one soon I’ll be in touch with MN Technique. You guys are doing amazing work
Access related clarification.
Login via Frappe it creates a new user on the microservice or logs in to user if it exists.
e.g. email@example.com exists in IDP, you setup a new service on subcom.com and you can login via frappe on subcom.com with useid as firstname.lastname@example.org and It will create a new user on subcom.com
If erpnext_connector is installed on microservice, as it logs in via frappe it also stores the token for consuming resources from holdingcompany.com later.
If erpnext_connector is not installed it will just login via the ID on IDP, no token will be stored and you cannot access resources from holdingcompany.com without the token.
Is this functionality working? I tried creating webhooks to post with little success!!
I tried webhook on
after_insert of a
Note. It is working.
I could make
POST request to given url.
Okay. Let me dig a little deeper.
How can I call webhook on particular condition?
Is there any way to bulk create webhooks?
That cannot be done, you only have a choice of doc_events available for selection on webhook. Check if you can manage your code logic around firing doc_events.
No specific way to bulk create webhooks.
Webhook is just another doctype,
Try Data import?
And how about using doc id in the URL as a placeholder? Is that possible?
Didn’t get you.
After posting to another server from webhooks, how to handle the data responded from the external server?
I have the same question