Initiate your app to run whenever you feel like it and add custom data to the request. Perhaps to start a scheduled job or if receiving web hooks or any kind of data changes from other systems.
How to run your app manually
Let us know you want your app to run by doing a POST to Upsales API /appHook endpoint
Replace customerId with the customerId you want the app to run for. If your app is user configurable, also add the users userId.
Replace authenticationKey with your apps authentication key and appId with your apps id. Send any JSON data you like as the body for the request. This will be forwarded in our request to your app.
What we will post to your app
When we receive your request to /appHook, we'll send a POST back to your app to /external.
https://yourapp.com/external The requests body.data will contain the JSON body you sent to /appHook.
The great thing is, the request body to your /external contains all the config, appdata and metadata (like any other app request) complete with the body you sent to our /appHook.