In the bulk order import process, you will be able to upload a file .csv (comma-separated values), with UTF-8 encoding that complies with the structure required by the system, to generate work orders in AFLS from third-party applications or your own
⚐ Note: To display and manage bulk order actions, during the configuration of web users, when defining as user roles the Dispatcher, turn on the Allow the user to perform bulk actions. Enable bulk actions on web users
1. To perform a bulk import of orders, with the Dispatcher role, go to the AFLS web console, select the option Orders From the main menu, in the Info view, select the Import.

2. In the window work area File Import You will be able to access the records of the movements and upload the information to be imported by selecting the option Drag or upload the file you are importing. The Windows Explorer window drops down where you need to search for and select the .csv file.
You can also download a template to import by selecting the EXAMPLE. CSV.

Structure of the work order file to be imported
The archive Fields Workorder_Template.csv Order import maintains the following structure:

| Field | Description | Required Fields | Optional Fields |
|---|---|---|---|
| ContactName | Username that the order client has configured. | X | |
| ServiceID | ID of the service to be associated with the work order. | X | |
| Subject | Subject matter that the work order will have. | X | |
| Description | Description of the work order. | X | |
| SpareParts | ID of the spare part that will be associated with the order, followed by the quantity (separated by space). | X | |
| ContactEmail | Email of the work order contact. | X | |
| ContactPhone | Work order contact phone. | X | |
| Latitude-Longitude | latitude and longitude of the address (separated by comma). | X | |
| Address | Work order address. | X | |
| AddAddress | Address detail. | X | |
| Specialist | Name of the specialist assigned to the order. | X | |
| UniqueReference | Unique code of the customer for whom the work order is to be created. | X | |
| AttentionStartDate | Initial date for restriction allowance. | X | |
| WorkDayId | Schedule ID for restriction assignment. | X |
⚐ Warning:
- If the user does not associate any spare parts (SpareParts), the system will take the default spare parts that the service has (if it has them associated).
- If the user associates a spare part ID, it is necessary to indicate the number of spare parts to be associated; the spare part ID is put first and then the quantity. Example: 1 1 (ID 1 and quantity 1).
- If the user configures latitude and longitude, the Address field does not need to be configured. If the user configures the Address field, you do not need to configure latitude and longitude.
- The start date for constraint assignment cannot be less than the current date and the format must be DD/MM/YYYY.
- The IDs for the constraint assignment day are as follows: (1: Morning, 2: Afternoon, and 3: Night)
⚐ Note: Unused fields should be left blank.
3. After selecting and uploading the order import file, click Accept in the import view, to confirm the changes made and the system will schedule the processing of the file.

4. When an order is successfully imported, a comment will appear in the detailed information for that order in the Feedback indicating that it is an imported order.

5. To check the result of the load, whether successful or not, it will be possible to view the graphical configuration interface Bulk Uploads in Event Management.
⚐ Please note:
- By default, orders are imported in the Open state.
- In the list of work orders, it will be possible to identify which ones have been imported.
- The imported orders will follow the consecutive of the list of existing orders in the application, that is, if you have 98 orders created to date and 10 are imported, the consecutive one that the import will take will be from 99 to 109.
- If you fail to successfully import orders, the application will allow you to view, modify and retry uploading the records or download the file to visualize the reason for the non-import.
⚐ Note: Post-import, for orders to be automatically assigned by the mapping engine, they must have a vendor. The assignment of the provider is performed by the UNASSIGNER_ORDERS_PROVIDER task that by default runs every hour (this time can be changed, depending on how required by each client).
Importing Work Orders with Additional Fields
When loading additional fields into the work order import template, you should consider the following recommendations:
| Import recommendations for additional fields | |
|---|---|
| 1 | Verify that the column titles in the header are not empty. |
| 2 | Additional fields must have the name of the additional field in the column title. (Table AFW_ADDITIONAL_FIELD name field). |
| 3 | Additional fields set in the application as read-only should not be added in the file header. |
| 4 | Verify that all additional fields set as required in the application are filled in the file (note general and model additional fields). |
| 5 | Only add orders with services associated with the same model. |
| 6 | For additional date-type fields, fill out the DD/MM/YYYY format. |
| 7 | Verify that there are no empty records. |
| 8 | Within the information of the import fields, semicolons (;) should not be used, because this is the separator that is used between columns for the process. |
| 9 | The additional fields that are included in the header must be filled in, otherwise the record must be left empty, respecting the semicolon separator (;). |
| 10 | The user performing the import with additional model fields must have permissions to the UNSCHEDULED status in the workflow for the role. |
Example:

⚐ Note:
-The processing time of the file depends on the memory and processor resources of the computer. In addition, the complexity of the business in terms of status flow configurations, additional fields, and permissions, can make field verification take longer.
- Imports must have the same service so that the model to which it belongs and its additional fields are consistent and allow for more optimal processing.