Creating an EDIFACT document structure
Why Create an EDIFACT document structure?
SmartBridge recognizes EDIFACT documents by default, and is able to process all the default metadata. So, why create a document structure?
EDIFACT document structures are useful in case you need to extract more data than commonly required.
Step 1: Preparation
The general 'Preparation, Configuration, and Testing' process applies to Document Structures of all types, especially the Preparation phase. To learn more about the preparation for any Document Structure definition, follow the steps in Configuring Document Analysis & Document Labeling: Document Structures.
After that:
Click on the
+
at the bottom of the page and select ‘Add EDIFACT’.- Have an EDIFACT test document ready.
Step 2: Configuration
Step 2a: Selecting the specific EDIFACT document
As EDIFACT documents are identified by default, SmartBridge allows you to filter out a specific EDIFACT document using several metadata properties: document type, subtype, sender, recipient, and the test indicator. The Document structure selection rules allow you to indicate the specific EDIFACT document for which you are creating a custom Document Structure.
Sample settings:
Format | Type | SubType | Sender | Recipient | Test indicator | Result |
---|---|---|---|---|---|---|
EDIFACT | Any | Any | Any | Any | Any | All EDIFACT documents will use this Document Structure. |
EDIFACT | ORDERS | Any | Any | Any | Any | Only EDIFACT documents that are ORDERS will use this Document Structure. |
Any | ORDERS | Any | Any | Any | Any |
Step 2b: Value retrieval options
In case your EDIFACT document is not fully standards compliant you can have SmartBridge handle these customizations:
Option | What is it | How to use it |
---|---|---|
True value for test indicator | Use this option in case the document uses a non-standard test indicator. The EDIFACT standard test indicator is: 1 . | Enter an alphanumeric value that represents the custom test indicator. |
Values separator | Use this option in case the document could contain multiple values for a single attribute (e.g. a series). | Enter a separator. |
Step 2c: Setting metadata
Depending on what data is available in the document, your configuration involves:
- Providing your own static values for standard metadata.
- Adding custom metadata.
Usage:
Metadata | What to do |
---|---|
For values that can be extracted from the document. |
|
|
These values support macro substitutions for using document properties or system settings. See the Workflow Macros Reference for more details and examples. |
For custom metadata. | Click on the '+' below the metadata table to add a new row. |
Example:
Suppose you need to extract the code of NAD/DP from a D96A EDIFACT ORDER. The Xpath could be:
/Ichg/Msg[1]/Grp2/NAD[e3035='DP']/C082/e3039
Xpath is case sensitive.
These are the standard attributes necessary for each document.
Attribute | What you should enter | Example value |
---|---|---|
SenderIdentifier | The Sender Identifier includes the actual data that identifies the sender (for example, if the Sender Identifier type is EAN, the Sender Identifier will be the EAN number itself). Usage:
|
|
SenderIdentifierType | By setting the Sender Identifier Type SmartBridge understands in which way the Sender Identifier should be interpreted (for example, EAN). Usage:
|
|
RecipientIdentifier | The Recipient Identifier includes the actual data that identifies the sender (for example, if the Recipient Identifier type is EAN, the Recipient Identifier will be the EAN number itself). Usage:
|
|
RecipientIdentifierType | By setting the Recipient Identifier Type SmartBridge understands in which way the Recipient Identifier should be interpreted (for example, EAN). Usage:
|
|
DocumentType |
|
|
DocumentSubType |
|
|
DocumentNumber |
|
|
TestIndicator | Value that indicates whether the document is used for testing purposes. Usage:
|
You can add custom metadata using the plus sign below the 'Document attributes' table.
Usage:
- For metadata you would like to add: create a new line in the 'Document attributes' table, specify a unique name in the 'Name' column, enter the necessary XPath expression in the 'Value' column, and set ‘Is XPath’ to ‘true’.
In the upper right-hand corner click on the test button: A new window will open. Click on Click on You might run into unexpected results when you test a Document Structure definition that contains Macros. In most cases SmartBridge is able to set these Macros in case a communication module first processes the document. However, this testing method does not use a communication module for testing. As a consequence, during this type of testing you will likely encounter unprocessed Macros in the test results. This is expected behavior.Step 3: Test your Document Structure
Browse...
to select the test file, for testing whether the new Document Structure matches your test file.Test
to analyze your file. You will see all the information SmartBridge is able to extract from the document, using the Document Structure that you created.