Trigger an External API from an ERPNext DocType

Business Scenario:
Once we have a Customer in ERPNext, we want to give them a Username and Password on an External Portal System for which we have the required APIs to create the user

In ERPNext Scenario
After Creating a Customer within ERPNext, we want to have another DocType where the “required” customer fields are populated, and then we hit the “Submit” or “Save” button that would trigger an External API to create a user in an external Portal System. Is this conceptually do-able with ERPNext?

I am relatively new to ERPNext. Any suggestions on this would be appreciated. If there are better alternatives than what I have mentioned here, I’d welcome that too.

Thanks in advance

Would webhooks work in your case?
https://frappeframework.com/docs/v14/user/en/guides/integration/webhooks

1 Like

The External API is the API of ERPNext or of other system?
The external Portal System is ERPNExt or other system?

If the external is other system, maybe you can create webhook there.
Or, in ERPNext/Frappe use after_insert or after_save trigger to run a POST to the other system API.

Thank you @rahy
Yes, the external API is other system (It is the external portal)
I’ll ask our developer to check out the options you suggested

If it is another ERPNext Instance Use Event Streams
[Event Streaming](https://Event Streaming)