Synchronizing Projects
Create and synchronize projects
Prerequisites
- Next is master
- project id is the key in the API but it is the project number that should be used in external system.
Relevant endpoints
To get the id of a project you could for example call this endpoint using a filter string on name or projectno: /project/
Get a single project by id (not number): project/{project_id}
That response will include a field projectstatusid
which can be used in this endpoint to get the project status code: status/project/{status_id}
This endpoint can be used with a filter string on projectno or projectid to get work orders for that project: workorder/
For variation orders (additional work orders): additionalworkorder/
Details
Project number
When new projects are registered in Next they're given a project number either by the user or by Next (the next available number in the series). Default setting is that the project number is not required to have a fixed length but it is recommended.
Work orders belonging to Project
When creating a project in Next a work order will automatically be created for it and given number 1 and the description Scope of work (also called basic scope). If no other work order exists on the project, all costs and revenues will be booked against this work order when including it in accounting transactions. The user can add more work orders and variation orders (also called additional work orders) manually in Next to make it possible to divide costs and revenues between different activities/tasks.
Status codes
Projects, work orders and variation orders all have status codes in Next to indicate whether it should be seen as as active or not. Status codes are therefore a good indicator to determine which transactions should be handled by the integration. Recommended is to set up integration sync rules according to below:
- <40 is ignored (the project is either for administrative use or has not yet been properly started)
- =40 but <90 is synchronized (active projects)
- =90 is usually not synchronized, but it can be used to decide whether the project in the external application should be closed. Before closing projects in external applications, it is important to make sure that all data has been synced such as customer invoices, voucher rows etc.
Choosing entity in external system
The Next entities project and work order don't always have an obvious counterpart in the system which is integrated.
Please note that the project status may differ from the work order/variation order status. It is therefore important to discuss how the statuses should be handled and also whether work orders and variation orders should be handled as a separate entity in the integration or possibly as an accounting dimension instead. This depends on the capabilities of the external system. If it should be treated as its own entity, you need to decide whether:
- work orders and variation orders are handled as long as the project status code is within a given interval
- work orders and variation orders are handled if the project status code and the work order/variation order status code is within a given interval
Continuous sync
The projects in Next are continuously updated, it is therefore recommended that you set up a continuous synchronization of the project information and decide which information should be synced (projectno, project name, customer, start-/end date etc..)
Naming
If there is a requirement that the project name in the accounting system is made up of a combination of the project name and work order/variation order description, multiple endpoints will need to be called. This will most likely not be the standard case but it could happen if the customer previously has been running a standard integration distributed by Next with the possibility to configure format masks.
Documents
The documents (e.g. PDFs) in Next directly tied to a project through the "Document" tab on the project in Next UI can be accessed or created via the endpoints in this group: /document/
There are separate endpoints for getting documents tied to a Customer invoice
Updated 2 months ago