Technical

Components

ERP Connector - Order consists of the following components:

  • VBA module in Lime CRM, ControlsHandlerOrder.
  • VBA module in Lime CRM, AO_ERPConnector_Order.
  • LIP package including standard fields for order and orderrow.
  • Code in Syncify's on-premise service.
  • Code in Syncify's cloud service.

In the projects where this add-on is used, typically some customization for how to create an order is needed.

  • VBA module in Lime CRM, AO_ERPConnector_Order.
  • LBS app for a button which is placed in the index actionpad. When some Lime objects are selected and the button is clicked, it fetches the id's from the selected Lime objects and send them to a Custom Endpoint which create the orders and orderrows.
  • A template and example for a Custom Endpoint which creates the Orders (together with the corresponding Order rows).

VBA

The VBA module ControlsHandlerOrder in Lime CRM handles setting fields to readonly.

Table and Field Definitions Lime CRM

These tables and fields must be created before you can use the ERP Connector - Order. The fields will be created by LIP. If you are not using LIP you will need to create them manually.

Order

The following table and fields are added by ERP Connector - Order:

Table database name: order

Database Field Name Field Type Length Description
order_number Text field 64 Unique order number
invoice_number Text field 64 Unique invoice number
invoice Relation (field) N/A Relation to invoice synced by standard ERP connector
erp_db Text field 32 id to erp_db in Syncify's API
company Relation (field) N/A Relation to company
customer_id Text field 128 Customer ID for matching to company
create_invoice_from_order Yes/no N/A Set to true if invoice automatically should be created from order
orderstatus Option field N/A The status of the order, see options below.
customer_reference Text field 256 Customer reference from ERP
coworker Relation (field) N/A Company reference (Our reference)
order_date Date field N/A The order date
currency Text field 3 Currency
order_sum Decimal field N/A Order sum excl. VAT and after discount
order_vat Decimal field N/A Total VAT
order_total_sum Decimal field N/A Order sum incl. VAT and after discount
error_message Text field 32 Readonly, Set by Syncify if orderstatus is set to 'error'
orderrow Relation (tab) N/A All order rows belonging to the order
Order Status Options
Key Description
notready The order needs to be manually checked by the customer before it is fetched.
readytosend Accepted by the customer. Fetched within 10 minutes.
processing Fetched from Lime. Being processed by the Syncify service, not yet created in the ERP system.
senttoerp Sent with success to the ERP system.
error Something went wrong while fetching the order. See property 'error_message' on the order.

Order Row

The following table and fields are added by ERP Connector - Order:

Table database name: orderrow

Database Field Name Field Type Length Description
order Relation (field) N/A Relation to order
item Text field 50 Connection to article in the ERP system
description Text field 50 Description of Items
quantity Decimal N/A Number of items
unit Text field 32 st, h etc.
price_per_unit Decimal N/A Price for one unit excl. VAT
vat Decimal N/A VAT percentage expressed as decimal number, e.g., 0.25
discount Decimal N/A Absolute figure (i.e. not percentage) in total for all units
vataccount Text field 32 Used if the orderrow should be connected to an vat account
incomeaccount Text field 32 Used if the orderrow should be connected to an income account
row_id Text field 32 Used to make a row unique

Deal Article

The following table and fields are added by ERP Connector - Order:

Table database name: dealarticle

Database Field Name Field Type Length Description
deal Relation (field) N/A Relation to deal
articlegroup Relation (field) N/A Relation to articlegroup
article Relation (field) N/A Relation to article
quantity Integer N/A Number of items
unit Text field 32 st, h etc.
price_per_unit Decimal N/A Price for one unit excl. VAT
discount Decimal N/A Absolute figure (i.e. not percentage) in total for all units
totalvalue Decimal N/A Excl. VAT. Calculated as quantity * price_per_unit - discount

Article Group

The following table and fields are added by ERP Connector - Order:

Table database name: articlegroup

Database Field Name Field Type Length Description
name Text field 64
article Relation (tab) N/A The articles that belongs to the article group
dealarticle Relation (tab) N/A The dealarticles that are linked to the article group
orderrow Relation (tab) N/A The order rows that are connected to the article group

Article

The following table and fields are added by ERP Connector - Order:

Table database name: article

Database Field Name Field Type Length Description
articlegroup Relation (field) N/A Which article group it belongs to
articleno Text field 32 Should contain the article number used in the ERP system
description Text field 50 The name of the article
price Decimal N/A Price for one unit. Excl. VAT
unit Text field 32 st, h etc.
vat Decimal N/A VAT percentage expressed as decimal number, e.g., 0.25
active Yes/No N/A
vataccount Text field 32 Used if the orderrow should be connected to an vat account
incomeaccount Text field 32 Used if the orderrow should be connected to an income account
orderrow Relation (tab) N/A The order rows that are connected to the article
dealarticle Relation (tab) N/A The dealarticles that are linked to the article

Syncify Services

Syncify has built two different services. One for cloud based ERP systems and one for on-premise ERP systems. Their cloud service is automatically updated and will support the ERP Order add-on. For their on-premise service, it is important to follow the requirement in version.

Special cases

Fortnox

  • The order properties item and customer_reference can maximum be 50 characters. Otherwise the fetch of the order will fail in the Syncify service and 'orderstatus' will be stuck on value 'inprocess'. Note that also the property description has a maximum length of 50 characters, but if that is longer, it will be chopped up into 50 character pieces and added as several order rows.