Sales Cycle Integration

Using REST API, standard whitelisted approaches and workflows are used to integrate external order management systems and sales cycles.

1. Sales Order

All DocTypes are automatically generated as REST API by the Frappe Framework. Using this method, the very first document of the sales cycle can be produced. If you are starting with a sales order, you can create the order using a typical REST API POST request. The example below shows how to include custom fields and other doctype information in the body.

2. Delivery Note

Use the same procedure as for a Sales Order if you are starting with a Delivery Note; however, change the doctype key value from Sales Order to Delivery Note. Use the URL listed below if you wish to create a delivery note from a sales order. The Sales Order ID is the source name parameter in this case.

The response from the endpoint contains a Delivery Note JSON object that lists all the outstanding items in the order they should be delivered.

3. Sales Invoice

Again, using the regular REST API will be the best course of action if you are simply creating a sales invoice. Please refer to the sales order section's example there for this.

Use the endpoint shown below to create a sales invoice from a sales order. Here, the Sales Order ID serves as the source name parameter.

Use the URL listed below to create a Sales Invoice from a Delivery Note. The Delivery Note ID is the source name argument in this case.

Both endpoints return a Sales Invoice JSON object that contains all the outstanding charges that need to be made.

4. Payment against the order or invoice

Use the URL below to create a payment entry against a sales order or invoice.