-
Notifications
You must be signed in to change notification settings - Fork 34
tool Spreadsheet Converter
Contents:
- Overview
- Sample Spreadsheets
- Empty Spreadsheet Templates
- Spreadsheet Documentation
- Entitlement Mode
- Usage
- Swagger API
- API Responses
- Next Steps
IBM Food Trust™ Spreadsheet Converter converts Microsoft® Excel® files into XML format for submission to the IBM Food Trust API. This tool enables you to easily generate valid IBM Food Trust messages from Excel files. This service converts content directly from a spreadsheet file to an IBM Food Trust message type in XML format. The template files also contain each XML field that is available in the message type.
To start, download a sample Excel spreadsheet (or a blank template) below, and review the worksheets and the layout required by the Spreadsheet File Converter. Your input file may contain multiple worksheets— including one for locations and one for products. Together, these two worksheets consist of your Master Data, and provide a single source of attributes and values for easy reuse. The worksheets contain drop-down lists to easily select values that the Spreadsheet File Converter requires.
Click any sample link to view or save the sample spreadsheet file:
- Aggregation
- Commission
- Decommission
- Despatch Advice
- Disaggregation
- Master Facility
- Master Product
- Observation
- Payloads
- Purchase Order
- Receive Advice
- Transformation
Click any template link to save the blank spreadsheet file; select Excel Workbook (.xslx)
as the extension:
- Aggregation
- Commission
- Decommission
- Despatch Advice
- Disaggregation
- Master Facility
- Master Product
- Observation
- Payloads
- Purchase Order
- Receive Advice
- Transformation
The Excel workbooks below provide field-by-field details for each spreadsheet accepted by IBM Food Trust. They include detailed field descriptions, required formats, examples, and requirements. Each table entry contains the collection of documentation files for each IBM Food Trust message type. Because many fields are similar across message types, they are grouped into spreadsheets to easily help you locate the documentation.
Note: Many of the workbooks contain a Level column, which represents groupings. Level 1 represents a new event or transaction. Anything above Level 1 represents an array. For example, the Aggregation description workbook contains both Level 1 and Level 2 groupings. To populate an Aggregation template workbook with one aggregation event, and three trade items, for example:
- First populate all required Level 1 cells in the first workbook row. The first trade item description, quantity, and quantity UoM cells (all Level 2) will be populated in the first workbook row.
- To populate the second trade item, create a new row, do NOT populate the Level 1 cells, and populate the Level 2 trade item description, quantity, and quantity UoM cells.
- Then create another row and populate the Level 2 cells for the third trade item.
- Adding a new row and populating the required Level 1 cells creates a new aggregation event.
You can view this Level usage in the sample spreadsheets above.
Excel Workbooks
Click any sample link to view or save the sample spreadsheet file:
All spreadsheets have an Entitlement Mode worksheet, which lets you change the data access control. To change the entitlement mode, select a new value from the dropdown list in the Entitlement Mode column. This entitlement mode applies to the entire XML file that is generated from a spreadsheet.
A mode of "none" indicates that an entitlement will not be applied to the generated XML. When the XML is submitted to the IBM Food Trust API without an entitlement mode, the default entitlement is applied.
Please see data entitlement and access control to learn about Data Entitlement and default access control levels for each IBM Food Trust message type.
Note: The Data Entitlement documentation discusses setting the entitlement mode via an IFT-Entitlement-Mode header when submitting the XML to the IBM Food Trust API; usage of this header takes precedence over setting the entitlement mode in the spreadsheet.
The Entitlement Mode worksheet also includes a column named Explicit Entitled Org Ids, which lets you explicitly specify which organizations are entitled to the mode selected in the Entitlement Mode dropdown. Simply place each organization's Org Id on a separate row in the Explicit Entitled Org Ids column.
Once you become comfortable with the input file format, modify your downloaded sample (or create it programmatically) and submit it to the Spreadsheet File Converter. If you have multiple single events to convert to XML, simply enter the additional events on their corresponding worksheets and submit them to the API.
Attention: To comply with data privacy laws, NO data that personally identifies an individual can be submitted to IBM Food Trust.
The Spreadsheet Converter API is available on Swagger.
To submit data, you must include the following Authorization Header:
Header | Value |
---|---|
Authorization | Bearer <token> |
Note: If necessary, refer to the details on obtaining a valid authentication token.
One of three responses is typically returned by calling a Spreadsheet Converter API endpoint:
Response | Meaning |
---|---|
200 | Success |
400 | Error in Spreadsheet File |
401 | User Unauthorized |
401: User Unauthorized - Indicates a problem with the caller's authorization token, such as a missing Authorization Header, or an expired token (valid for three hours after assignment). This message can also result from specifying a token for the incorrect zone (integration or production).
400: Bad Data - Indicates a problem with the submitted data, with a detailed description.
All errors are returned in the response body separated by a new line. Here is an example with multiple errors:
<BadRequestResponse>
<message>
[Aggregations][2, 9]: BizTransaction may not be null when associated BizTransaction Type is populated.
[Aggregations][2, 11]: Trade Item Description may not be null when associated fields are populated.
Aggregation starting with Event ID urn:uuid:6926712e-599f-4c4e-b6e9-8dd888c906bd must have a Trade Item Description populated with Lot and/or Serial populated.</message>
</BadRequestResponse>
Errors (fatal) | Description | Message Format |
---|---|---|
Unrecognized Workbook | IBM Food Trust Converter is unable to recognize the workbook format. You will receive this error if you attempt to submit a spreadsheet from the deprecated IBM Food Trust Basic Converter. | Uploaded File Error: Could not recognize Spread Sheet Format. |
Missing Sheets | The workbook is missing a required worksheet | The following required sheets are missing. [sheet_names] |
Unrecognized Sheets | The workbook is missing a required worksheet | The following sheets are not recognized. [sheet_names] |
Missing Header | A worksheet is missing a header entry (column) | <sheet_name> sheet has missing headers [header_names] |
Missing Field | The sheet specified is missing a value | [sheet_name][row, column]: <column_name> may not be null. |
Two Missing Fields | The sheet specified requires that at least one of two values must be populated | [sheet_name][row, column]: <column_name_1> and <column_name_2> may not both be null. |
Multiple Missing Fields | The sheet specified requires multiple associated values must be populated | <sheet_name> starting with <primary_key_column> <primary_key_column> must have a <column_name_1> populated with <column_name_2> and/or <column_name_3>. |
Once you have successfully converted your spreadsheet data to XML, you will upload the returned XML files to IBM Food Trust.
WELCOME!
Modules
Membership
Languages
Browsers
ONBOARDING
Onboarding Steps
Data Requirements
Data Types
Supplier Data
Payload Data
Insights Data
HOW-TO
Join by Invitation
Log in as New User
Authenticate Human Users
Authenticate System Users
Java Sample
Typescript Sample
IIB Sample
Assign User Roles
Upload Data
Automate Data Upload
Convert Spreadsheets
Convert Data
Whitelist Custom URLs
APIs-Swagger
Connector API
Documents API
Converter API
Trace API
Insights API
APIs-Usage
APIs
Insights API
Insights API Usage
Trace API
Connector API Errors
API Error Codes
REFERENCE
GS1
GS1 Identifier Reuse
Authentication
Identifiers
Message Codes
Cryptographic
Signatures
Signature Header
Access Control
Firewall Settings
XML to JSON
EPCIS Aggregation Add
EPCIS Aggregation Delete
EPCIS Object Add
EPCIS Object Delete
EPCIS Object Observed
EPCIS Transformation
Purchase Order
Despatch Advice
Receiving Advice
Master Data Item
Master Data Facility
Standard Business
Document Header