I want to create a custom UI which will only let users wire the flow.Store it. And would deploy the flow only after a specific event is generated.
In the Node-RED backend there is no distinction between storing and deploying.
If you store the flow in your own code, then you can use the Admin API to deploy it.