The SocrateCloud EDI administration is concentrated in the System Admin -> Data -> EDI menu. It is recommended the application administrator be the only one doing the EDI management, after he has thoroughly understood the EDI mechanisms.
A format defines the following:
the way that the data belonging to the source file are interpreted to obtain the input for the destination document or entity;
the way that the content of the file is formed for the output of the source document or entity.
You must define one format for each submitted entity or document type, including the agreed submission version.
In time, there can be multiple versions for each document type, so the format can differ from a version to another.
If the submitted document is of master-line type (e.g. order, invoice) then you must configure separate formats for the master and for the lines.
In the format definition used to interpret the document, when defining a line element, a document line format will be referred.
The EDI Format window is used to establish the specific format as according to the EDIFact standard for transmitting and interpreting the data.
Inbound checkbox - select if the format is used for importing, clear for exporting;
Table - the indication of the table used as source for the the data that must be transmitted;
Real_Table_ID - you must indicate the real table where the data will be written in;
View checkbox - the table is read only;
Sql WHERE - in the case of exporting, the WHERE clause is used to filter the documents that will be exported;
EDI Event Listener - you can enter a java class in the EDI Event Listener field (in the case of imports) where you can treat special processing cases, which are often specific to the imported document. The class is used to solve the problems of the IDs and codes resulted from the import that do not correspond to a mapping to entities in SocrateCloud, and of the events of the type "before save", "after save", "document completion", especially.
Composite Separator, Field Separator, Decimal Point, Segment Separator, Line Separator, Escape Character fields - the indication of all the special characteristics used to delimit the data and the decimal point; these are established exactly by the standard and the version of the used EDIFact;
In this tab you have to enter a record for each document line ("segment") as according to the EDIFact standard. Example: UNA, UNB, UNH, etc.
EDI name - EDI format standard used to interpret the line;
Variable Name - transmitted line name
Name - name for the EDI format record;
Position - the order it appears in, as indicated by the standard;
Mandatory checkbox - the indication of whether the existence of this line is mandatory or not; if it is and the line does not exist in the file to be processed, the system will stop the process and signal a format error;
Type - EDI line type:
Element - this indicates the fact that a singular structure, that does not have any sub-components, will be processed;
Segment - this indicates the fact that a processing of a structure with sub-components is due to take place. In this case, the corresponding format will be referred to!
Example: the lines of an order represent a segment which must have defined its own format, independent from the format of the actual order.
In this tab you have to enter a record for each element (field) found in the composition of the respective line. The number and format of the elements is indicated by the standard.
Position - the order the field appears in, as indicated by the standard;
Mandatory checkbox - the indication of whether the existence of this field is mandatory or not;
Type - element type:
Constant, Function - enter the corresponding value in the ConstValue field;
Field - you need to indicate the link to the database;
Column - the source for the the data that must be transmitted;
Lookup Column, Table - the link to the database where the data will be written in;
Date Format - date format used in the input format. The date format is usually detected, but sometimes need to be defined;
Variable Name - transmitted field name.
Composite - a composition of multiple sub-elements. In the EDI Format Composite Element tab enter one record for each sub-element in the structure of a composite-type element. Their structure is identical to the one in the definition of the structure of the element.
Variable:
Variable Name - transmitted element name;
Variable Value - you may enter a default value;
This tab is used to specify the default values for some fields in the document due to be created via the import.