Audience: EDI developers, B2B integration teams, trading partner technical contacts
Every element has a minimum and maximum character length defined by the X12 specification. Trading partners can set stricter limits than the standard in their guidelines — for example, a field with an X12 maximum of 80 characters may be restricted to 50 by a specific partner.
Orderful validation ensure the min and max length requirements are respected.
What These Errors Mean
Field length errors occur when a value in your transaction is longer or shorter than the limit configured for your trading relationship. The most common causes are:
A data field in your source system or integration contains more characters than the partner's guideline allows
A value is arriving shorter than the required minimum — often because leading zeros, spaces, or other characters are being stripped in your integration before the data reaches Orderful
Orderful stores all field values as strings and does not modify them. If a value arrives in Orderful already stripped or truncated, the modification is happening in your integration before posting.
How to Diagnose
Field length errors produce a validation failure. The transaction is created in Orderful but its validation status is Invalid.
An email notification is sent when the transaction fails validation, but it does not list the individual errors. To see the specific fields and error details:
Log into Orderful
Open the failed transaction
Go to the Rules Editor tab
Review the validation errors listed — each error identifies the field path and the length violation
Error message formats
Maximum length exceeded:
Max length: 50. Actual length: 56
Minimum length not met:
Minimum length: 2. Actual length: 1
The error always shows the configured limit and the actual length of the value received. Use the field path shown alongside the error in the Rules Editor to locate the exact element.
Fix 1: Field Too Long
What is happening: A field value exceeds the maximum length allowed by the trading partner's guidelines.
Fix — correct at source: Update your integration or your SOR to limit the field to the allowed maximum before posting to Orderful.
Fix — truncation rule: Use a rule to only return a substring of characters.
Example: Truncate a name field to 80 characters:
SUBSTRING($transactionSets.*.PO1_loop.*.PID_loop.*.productItemDescription, 0, 80)
Option — suppress the segment: If the field is in a non-critical segment (such as PID for product descriptions) and your trading partner does not require it, you can delete it.
DELETE()
Option — split across repeating segments: For long descriptions that must be preserved in full, some transaction types allow multiple iterations of a segment. A rule can split the value across repeating segment iterations. You can use the "Add {} to Array" to add new repeating segments.
Exmaple: Split a description longer than 80 characters across two PID05 iterations:
SUBSTRING($transactionSets.*.PO1_loop.*.PID_loop.*.productItemDescription, 0, 80)
SUBSTRING($transactionSets.*.PO1_loop.*.PID_loop.*.productItemDescription, 81, 160)
Confirm with your trading partner that their system can process multiple segment iterations before implementing this approach.
Option — clean unwanted spaces: Use a rule to remove leading, trailing, or double spaces introduced by the source system.
Remove leading and trailing spaces:
TRIM($transactionSets.*.partyIdentification.*.name)
Replace double spaces with a single space:
REPLACE($transactionSets.*.itemDescription.*.description, " ", " ")
Fix 2: Field Too Short or Unexpected Formatting
What is happening: A field value does not meet the minimum length requirement. Common causes are leading zeros being dropped, leading or trailing spaces being trimmed, or double spaces being collapsed — all typically introduced in the integration layer before the data reaches Orderful.
Fix — correct at source (preferred): Update your integration to preserve the full value before posting to Orderful.
Fix — pad with leading zeros: Use a rule to restore leading zeros to meet the minimum length.
Pad a value to 4 characters with leading zeros:
PADSTART($transactionSets.*.currencyInformation.*.exchangeRate, 4, "0")
Fix — clean unwanted spaces: Use a rule to remove leading, trailing, or double spaces introduced by the source system.
Remove leading and trailing spaces:
TRIM($transactionSets.*.partyIdentification.*.name)
Replace double spaces with a single space:
REPLACE($transactionSets.*.itemDescription.*.description, " ", " ")
Fix 2: Field Too Short
What is happening: A field value does not meet the minimum length requirement. Common causes are leading or trailing zeros being dropped all typically introduced in the integration layer before the data reaches Orderful.
Fix — correct at source (preferred): Update your integration to preserve the full value before posting to Orderful.
Fix — pad with leading zeros: Use a rule to restore leading zeros to meet the minimum length.
Example: Pad a value to 4 characters with leading zeros:
IF(EQUALS(LENGTH($transactionSets.*.HL_loop.*.itemIdentification.*.assignedIdentification), 1), CONCATENATE("000", $transactionSets.*.HL_loop.*.itemIdentification.*.assignedIdentification), IF(EQUALS(LENGTH($transactionSets.*.HL_loop.*.itemIdentification.*.assignedIdentification), 2), CONCATENATE("00", $transactionSets.*.HL_loop.*.itemIdentification.*.assignedIdentification), IF(EQUALS(LENGTH($transactionSets.*.HL_loop.*.itemIdentification.*.assignedIdentification), 3), CONCATENATE("0", $transactionSets.*.HL_loop.*.itemIdentification.*.assignedIdentification), $transactionSets.*.HL_loop.*.itemIdentification.*.assignedIdentification)))What to Send Orderful Support
When contacting [email protected] about field length errors, include:
Transaction ID from the failed transaction in Orderful
Specific error message exactly as displayed in the Rules Editor
Field name and path shown in the Rules Editor
Preferred fix approach — truncation, suppression, padding, or segment splitting
For truncation: whether to trim from the left or right
For segment splitting: confirmation from your trading partner that they accept multiple iterations
What to Send Orderful Support
When contacting [email protected] about field length errors, include:
Transaction ID from the failed transaction in Orderful
Specific error message exactly as displayed in the Rules Editor
Field name and path shown in the Rules Editor
Preferred fix approach — truncation, suppression, padding, or segment splitting
For truncation: whether to trim from the left or right
For segment splitting: confirmation from your trading partner that they accept multiple iterations
Frequently Asked Questions
The email notification says my transaction has errors but does not list them — where do I look?
Log into Orderful, open the transaction, and go to the Rules Editor tab. The validation errors are listed there with the field path and the specific length violation.
Why do some transactions pass and others fail?
Length errors only occur when a specific field value exceeds the limit. Short values pass validation while longer ones fail. A truncation or padding rule applied to the field ensures consistent processing regardless of individual value lengths.
My trading partner says their system accepts longer values than the guideline — can Orderful's limit be updated?
Yes. Contact [email protected] with the field name and the limit your trading partner has confirmed they accept. Orderful Support can update the guideline for your relationship.
Orderful is showing a length error but the value looks correct in my source system — what happened?
Check whether your integration is modifying the value between your source system and Orderful. Common causes are numeric type conversions dropping leading zeros, string trimming removing required spaces, or encoding issues introducing extra characters.