Version: 17.07
Supported Since: 17.07
UN/EDIFACT Invoice Extractor Processor is a processing element which can be used to extract UN/EDIFACT invoice messages from the current message payload and assign it back to the current message as an XML payload.
In order to use this processing element, you must first select the EDI Processors dependency from the processor list when you are creating an empty Ultra project. If you have already created a project, you can add this dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Processors list, select the EDI Processors dependency. Alternatively, you can add the following dependency to the Maven
You should generally be able to adapt the above snippet to any UN/EDIFACT document type of your choice,
by replacing the |
Next |
The message will be sent to this out port if the extraction of the UN/EDIFACT invoice message is successful. |
On Exception |
The message will be sent to this out port if the processing element failed to process the message payload as an UN/EDIFACT invoice document. |
<?xml version="1.0" encoding="UTF-8"?>
<Invoices>
<Invoice>
<INVOIC>
<Beginning_of_message>
<DOCUMENT_MESSAGE_NAME>
<Document_message_name__coded>380</Document_message_name__coded>
</DOCUMENT_MESSAGE_NAME>
<Document_message_number>3430296768</Document_message_number>
</Beginning_of_message>
<Date_time_period>
<DATE_TIME_PERIOD>
<Date_time_period_qualifier>137</Date_time_period_qualifier>
<Date_time_period>20070322</Date_time_period>
<Date_time_period_format_qualifier>102</Date_time_period_format_qualifier>
</DATE_TIME_PERIOD>
</Date_time_period>
<Free_text>
<Text_subject_qualifier>INV</Text_subject_qualifier>
<Text_function__coded>1</Text_function__coded>
<TEXT_LITERAL>
<Free_text_-_-1>Free text to be handled manually</Free_text_-_-1>
</TEXT_LITERAL>
</Free_text>
<Segment_Group_1>
<Reference>
<REFERENCE>
<Reference_qualifier>ON</Reference_qualifier>
<Reference_number>1001234</Reference_number>
</REFERENCE>
</Reference>
</Segment_Group_1>
<Segment_Group_2>
<Name_and_address>
<Party_qualifier>SU</Party_qualifier>
<PARTY_IDENTIFICATION_DETAILS>
<Party_id_identification>YOUR_GLN_LOCATIONNUMBER</Party_id_identification>
<Code_list_responsible_agency__coded>9</Code_list_responsible_agency__coded>
</PARTY_IDENTIFICATION_DETAILS>
<PARTY_NAME>
<Party_name_-_-1>Acme</Party_name_-_-1>
</PARTY_NAME>
<STREET>
<Street_and_number_P.O._Box_-_-1>ADDRESS 1</Street_and_number_P.O._Box_-_-1>
</STREET>
<City_name>ADDRESS 2</City_name>
<Postcode_identification>ZIPCode</Postcode_identification>
<Country__coded>SE</Country__coded>
</Name_and_address>
<Segment_Group_3>
<Reference>
<REFERENCE>
<Reference_qualifier>VA</Reference_qualifier>
<Reference_number>SE123456789012</Reference_number>
</REFERENCE>
</Reference>
</Segment_Group_3>
</Segment_Group_2>
<!-- Some segment groups have been removed -->
<Segment_Group_45>
<Monetary_amount>
<MONETARY_AMOUNT>
<Monetary_amount_type_qualifier>86</Monetary_amount_type_qualifier>
<Monetary_amount>286.5</Monetary_amount>
</MONETARY_AMOUNT>
</Monetary_amount>
</Segment_Group_45>
<Segment_Group_47>
<Monetary_amount>
<MONETARY_AMOUNT>
<Monetary_amount_type_qualifier>176</Monetary_amount_type_qualifier>
<Monetary_amount>57.3</Monetary_amount>
</MONETARY_AMOUNT>
</Monetary_amount>
</Segment_Group_47>
</INVOIC>
</Invoice>
</Invoices>
The above is a D93A UN/EDIFACT
invoice document. In this example the Invoices
tag is the root tag and the Invoice
tag is an individual
message tag. Note that a few segment groups have been removed.
In the following use case, the requirement is to read an EDI file from a local directory, convert it from UN/EDIFACT format to XML format, and persist it to another local directory.
In this integration flow an UN/EDIFACT Invoice Extractor processing element is used to extract invoice messages from the current message payload and persist the extracted messages using a Payload Saver.