How It Works

Work Flow

The Order add-on is typically divided into two main parts.

  1. Orders are created from another Lime Object in Lime CRM. Either programmatically (added as customizations on top of the add-on) or manually. See information under Manual Orders below.
  2. Orders are synced (Syncify fetches) from Lime CRM to the ERP system.

How the two parts work is described below.

Creating Orders in Lime CRM From a Lime Object

This part is a customization implemented only by Lime consultants. The work flow typically looks like this:

  1. An order is created from a specific Lime object, a course for example. The course object contains some information about when the course should be invoiced (let's call this property 'nextorder'), and information about how frequent orders should be created (let's call this property 'orderfrequency').
  2. A filter on the course tab is created, preferably with an infotile that tells the user "X courses should be invoiced".
  3. The user goes to the course tab and selects the courses that he/she wants to invoice.
  4. The user clicks on the button "Create orders from selected courses".
  5. The orders with related order rows are created.
  6. The property 'nextorder' is moved forward X months, based on 'orderfrequency'.

Bundled with the code there is an example of an create order endpoint.

Send Orders From Lime CRM to the ERP System

The order flow looks like this:

  1. An order is by default created with order status 'notready'.
  2. The user manually checks that the order is ready to be sent to the ERP system.
  3. The user changes the order status to 'readytobesent'.
  4. Syncify fetches orders with status 'readytobesent'. The standard frequency for Syncify to fetch orders is every 10 minutes.
  5. While the order is being processed by the Syncify service, the order status is set to 'inprocess' and all fields on the order are set as readonly.
  6. Syncify makes a request to the ERP system to create the order.
  7. If create_invoice_from_order = True on the order object: Syncify makes a request to the ERP system to create an invoice based on the order.
  8. If success:
    • Syncify sets the order number in Lime CRM.
    • Syncify sets the order status to 'senttoerp'.
    • If create_invoice_from_order = True on the order object: When the related invoice has been booked in the ERP system, that invoice is attached on the order in Lime CRM by Syncify.
  9. If error:
    • Syncify sets the order status to error.
    • Syncify sets the error message property on the order in Lime CRM with what went wrong.

Order Status Options

The different statuses are explained in the chapter Technical.

Manual Orders

The step 'Creating orders in Lime CRM from a Lime Object' can be skipped, to instead let the user create manual orders. Prepared in this add-on are two different ways of creating manual orders. Either based on a deal with deal articles or in an order guide that can be configured for the web client.

Generate orders from deal

If working with deals and deal article objects the user can generate a new order from the deal. The information on the related deal articles will be copied to order rows on the newly created order.

Generating orders from other places than a deal needs some work to make it run smoothly and can be more riskful. For example the order object in Lime CRM has to contain information about correct erpid, and if the user misses this it will lead to a faulty sync.

Therefore, it can be good to make sure that some validations are added in VBA to see that the user has filled in the information correctly.

Order Guide in the Web Client

With this add-on you can configure an order guide that will replace the default create new dialog for orders in the web client. In Lime Admin you can configure from which tabs you wish to use this guide instead of the standard dialog. The order guide gives the user the possiblity to search for articles and as an example change description or add a discount and then placing them in a shopping cart. In the shopping cart the user can specifying all configured order details and finally create a complete order with order rows.

What is displayed in the order guide is configured in Lime Admin.

Field Mappings

See the field mappings for order and order row for each ERP System below.

Field mappings by ERP System

Good to Know

An order does not, by definition, have an expiration date. The default expiration date on an invoice is set by the customer in the ERP system. The customer can also set special expiration dates for their customers in the ERP system.