Write to a File: Orders Information (using data from Invoices)
Number of APIs: 6
Overview
This collection returns complete order information from the following FOLIO apps from a CSV data file. Use the FOLIO Invoices app to filter for and export the records you want to report on (see documentation). These scripts use the column names from exported file, so no editing is needed.
The following information is included in the report:
Orders
- PO Line number
- Material type
- Expense class
- Instance ID
Invoices
- Invoice creation date
- Invoice status
- Vendor invoice number
- Payment date
- Actual amount paid
Finance
- Fund paid from
Inventory
- Title
- LC Call number (if multiple LC call numbers are found, only the first one is written to the output file. )
Requirements
This collection requires the following:
The Qodex client (not the web version--still free!) using Collection Runner
The Node.js environment: https://nodejs.org/en/download/prebuilt-installer
A local web server running from this Node.js script: https://github.com/sivcan/ResponseToFile-Qodex
- These scripts are looking for a local server on port 3000.
A CSV of Invoice records downloaded from the FOLIO Invoices app
- NOTE: Download all Invoice and Invoice Line fields and do not change the field names in the file.
Documentation
Write Responses to a file using a local webserver: [link]
Use Qodex Collection Runner: [link]
Use Qodex Collection Runner with a data file: [link]
Running the Collection
This collection is meant to be run as a whole, using the above CSV input file and in this order the scripts are listed here.
To run the collection:
Export this collection at the folder level.
Export one of the sample environment files
Import the collection and environment file into your personal Qodex workspace
- Duplicate the environment file and modify it for your FOLIO tenant
Export your desired records (all fields) from the FOLIO Invoices app
Start your local web server running on port 3000 (or modify the "Write Order Data call to use your web server's port number
Use the
Run Collection
option from the folder level to run the scripts in order and input your invoice data file.
NOTE: We recommend selecting the Turn off logs during run
option if your file contains more than 50 lines to avoid any timeouts in the system. Also note that the free version of Collection Runner only allows a certain number of executions per hour before requiring a 30-second break.
-
Get Material Types GET {{baseUrl}}/material-types?limit=99
-
Get Classification Types GET {{baseUrl}}/classification-types?limit=99
-
Get Expense Classes GET {{baseUrl}}/finance-storage/expense-classes?limit=99
-
Find POL GET {{baseUrl}}/orders/order-lines?limit=5&query=(poLineNumber="{{POL}}")
-
Get Instance Info GET {{baseUrl}}/inventory/instances/{{instanceID}}