Espresso Logic SDK package interacts with rules and resources defined in Logic Designer. We can navigate customer purchase orders, edit their attributes, and add line items. Almost all the application interactions with the Logic Demo project API use a single resource hierarchy: the CustomerBusinessObject, a neatly packaged custom endpoint which queries and structures purchase orders, line items, and products belonging to a customer.
routes/index.js file. In the express router we have examples of several requests, their parameters, and some helpful comments on what is happening at each stage of the SDK method.
AngularJS acts as a facade for the interesting stuff taking place within the express router, though to understand what might be happening during each request, the OrderDetailsCtrl.js contains the best slice of the client side behaviors.
The espressologic package is connected, by default, to a read only instance of the Logic Demo project, though we invite you to sign up for your own evaluation account and point the final line of node_modules/espressodemo/config.js to your own evaluation project API URL and username/password for the Espresso Demo project, it should always be "demo"/"Password1").
Note: after any modifications are made to module files will require a local serve restart.
Evaluation accounts update the "User name" value from your registration email to the project endpoints, so the updated config.js file should look similar to the sample code below:
module.exports = espressologic.connect('https://eval.espressologic.com/rest/AAAAA/demo/v1', 'demo', 'Password1');
For more about rules, visit our rules operation documentation, or visit the npm page for more getting started info.