eDocuments Schema
Creating an eDocuments Schema
To create a new eDocuments schema in Business Central, follow these steps:
- Open Microsoft Dynamics 365 Business Central.
- Click the search icon (magnifying glass) in the Role Center.
- Enter "eDocuments Schema" in the search field.
- Select the New action.
- A blank eDocuments schema will be created.
- Select the Schema Type. Choose XML for XML output or JSON for JSON output.
- You can now configure the schema according to your requirements.
Info
There are also predefined schemas available that can be imported via the Document Dispatch Configuration Wizard.
Schema Type
The Schema Type field specifies whether the schema is used for XML or JSON output. The field is available on the schema list and on the schema page.
When the schema type is changed, the page updates automatically. XML-specific areas are hidden for JSON schemas, while JSON-specific fields and actions become available.
For JSON schemas, the Use UBL area is hidden. JSON-related dispatch profile fields are prepared with the default values required for B2Brouter output. The Transport Type Code is set to peppol and the Document Type Code is set to xml.ubl.invoice.bis3. These fields cannot be edited in JSON mode.
Creating Default Schema Lines
The action for creating default schema nodes supports both XML and JSON schemas.
- For XML schemas, the action creates the default XML schema lines.
- For JSON schemas, the action creates the default JSON schema lines.
When default JSON schema lines already exist, the system may ask whether the existing lines should be deleted and rebuilt. If you decline this confirmation, the existing schema lines remain unchanged.
Configuring JSON Schema Lines
JSON schema lines include the field JSON Value Type. This field controls how the value is written to the JSON output:
| JSON Value Type | Behavior in the JSON output |
|---|---|
| String | The value is written with quotes. |
| Number | The value is written without quotes. If the value cannot be read as a number, the output uses 0. |
| Boolean | The value is written as true or false without quotes. Values such as true, 1, yes, and ja are treated as true. |
JSON schemas can contain nested objects and arrays. This is used for structures such as invoice lines, taxes, allowance charges, payment dues, invoice references, additional item properties, contacts, bank accounts, third parties, and receipt references.
For array structures, eDocuments can repeat the array entries based on the configured data mapping. If no mapping is configured for an array, a single array entry is created.
Optional JSON nodes and properties are skipped when no value or default value is available and the minimum occurrence is set to 0.
JSON Field Information
For JSON schema lines, the Information action shows a description of the selected JSON field based on the B2Brouter API specification. This helps administrators understand which field they are configuring without leaving the schema page.
Schema Data Search
The Schema Data Search is a feature within the eDocuments schema that significantly simplifies navigation and the retrieval of specific schema data. This is especially helpful for complex or extensive schemas, enabling targeted searches and a better understanding of the schema's structure.
Using the search function, you can filter by the name or value of individual schema data entries. When a match is found, the system also displays the corresponding subordinate elements (subcategories) to help you understand the data in its structural context.
Using the Schema Data Search
To use the schema data search within an eDocuments schema, follow these steps:
- Open the Simova Apps eDocuments Schema via the search bar.
- Select the desired schema from the list.
- The schema data search is located in the General section.
- Please note that the search is case-sensitive.
- To start the search, enter a Schema Name and press enter.
- The search results will display all matching entries, including their subordinate elements.
Info
- The search function is case-sensitive.
- The search is limited to the data within the currently opened eDocuments schema.
- If no results are displayed, please check the spelling or scope of the search term.
How It Works
The search dynamically scans the schema data contained within the eDocuments schema for the terms entered. It considers both identifiers (e.g., element names) and assigned values, if available.
Resetting the Search
To reset the search and display all schema data again, simply delete the entered text from the search field. The system will automatically refresh the view and display all available entries without restriction.