In the context of Electronic Data Interchange (EDI), delimiters are vital elements of the transferred data stream. These delimiters are used to separate and identify different levels of information within an EDI message. Delimiters are specified in the message header and ensure a clear and coherent structure of the EDI message.
There are three main types of delimiters in an EDI message:
- Segment Terminator: This marks the end of a data segment and indicates the beginning of the next segment. It is usually represented by a special character such as CR (carriage return) or LF (line feed).
- Data Element Separator: This separates individual data elements within a segment. It is used to distinguish and extract the relevant information from a segment. The most commonly used separator is the asterisk character “*”.
- Component Element Separator (used only in EDIFACT): This is used within the EDIFACT format to separate multiple components of a data element. This separator is typically represented by the plus character “+”.
One example of using delimiters is in the transmission of an electronic invoice message between a supplier and a customer. The invoice message contains various segments such as customer information, ordered products, quantities, and prices. Delimiters are used to separate and identify each segment and data element within the message, ensuring accurate transmission and precise interpretation of the information.
Example script code:
# Sending the EDI message using EDIconnect or other EDI service
Best Practices for Using Delimiters in EDI:
- Follow the EDI specifications regarding the types and order of delimiters.
- Ensure that each segment and data element is properly separated by delimiters.
- Use delimiter characters that are not commonly found in actual data to avoid confusion and misinterpretation.
- Carefully verify the compatibility of delimiters with the receiving and processing system of your business partner.