indice-co / indice-co/EDI.Net

856 Shipping Notice Example Model

Open
#197 0 comments 4 reactions 0 assignees View on GitHub
Samples
Dominant language
C#
Stars
490
Forks
173
PR merge metrics
No merged PRs in 30d

Description

I see there is no example for a 856 standard file.
So since I am very thankful for a free tool like this, here is a suggestions to process a 856 file which was initially based on the example for a 850 file.
I hope somebody find it helpful.

----------------------------------------------
```csharp
public class ShippingNotice_856
{
[EdiValue("X(10)", Path = "ISA/1", Description = "ISA02 - Authorization Information")]
public string AuthorizationInformation { get; set; }

[EdiValue("9(2)", Path = "ISA/2", Description = "ISA03 - Security Information Qualifier")]
public string Security_Information_Qualifier { get; set; }

[EdiValue("X(10)", Path = "ISA/3", Description = "ISA04 - Security Information")]
public string Security_Information { get; set; }

[EdiValue("9(2)", Path = "ISA/4", Description = "ISA05 - Interchange ID Qualifier")]
public string ID_Qualifier { get; set; }

[EdiValue("X(15)", Path = "ISA/5", Description = "ISA06 - Interchange Sender ID")]
public string Sender_ID { get; set; }

[EdiValue("9(2)", Path = "ISA/6", Description = "ISA07 - Interchange ID Qualifier")]
public string ID_Qualifier2 { get; set; }

[EdiValue("X(15)", Path = "ISA/7", Description = "ISA08 - Interchange Receiver ID")]
public string Receiver_ID { get; set; }

[EdiValue("9(6)", Path = "ISA/8", Format = "yyMMdd", Description = "I09 - Interchange Date")]
[EdiValue("9(4)", Path = "ISA/9", Format = "HHmm", Description = "I10 - Interchange Time")]
public DateTime Date { get; set; }

[EdiValue("X(1)", Path = "ISA/10", Description = "ISA11 - Interchange Control Standards ID")]
public string Control_Standards_ID { get; set; }

[EdiValue("9(5)", Path = "ISA/11", Description = "ISA12 - Interchange Control Version Num")]
public int ControlVersion { get; set; }

[EdiValue("9(9)", Path = "ISA/12", Description = "ISA13 - Interchange Control Number")]
public int ControlNumber { get; set; }

[EdiValue("9(1)", Path = "ISA/13", Description = "ISA14 - Acknowledgement Requested")]
public bool? AcknowledgementRequested { get; set; }

[EdiValue("X(1)", Path = "ISA/14", Description = "ISA15 - Usage Indicator")]
public string Usage_Indicator { get; set; }

[EdiValue("X(1)", Path = "ISA/15", Description = "ISA16 - Component Element Separator")]
public char? Component_Element_Separator { get; set; }

[EdiValue("9(1)", Path = "IEA/0", Description = "IEA01 - Num of Included Functional Grps")]
public int GroupsCount { get; set; }

[EdiValue("9(9)", Path = "IEA/1", Description = "IEA02 - Interchange Control Number")]
public int TrailerControlNumber { get; set; }

public FunctionalGroupEDI Group { get; set; }
}

[EdiGroup]
public class FunctionalGroupEDI
{
#region GS - Functional group data
[EdiValue("X(2)", Path = "GS/0", Description = "GS01 - Functional Identifier Code")]
public string FunctionalIdentifierCode { get; set; }
[EdiValue("X(15)", Path = "GS/1", Description = "GS02 - Application Sender's Code")]
public string ApplicationSenderCode { get; set; }
[EdiValue("X(15)", Path = "GS/2", Description = "GS03 - Application Receiver's Code")]
public string ApplicationReceiverCode { get; set; }
[EdiValue("9(8)", Path = "GS/3", Format = "yyyyMMdd", Description = "GS04 - Date")]
[EdiValue("9(4)", Path = "GS/4", Format = "HHmm", Description = "GS05 - Time")]
public DateTime Date { get; set; }
[EdiValue("9(9)", Path = "GS/5", Format = "HHmm", Description = "GS06 - Group Control Number")]
public int GroupControlNumber { get; set; }
[EdiValue("X(2)", Path = "GS/6", Format = "HHmm", Description = "GS07 Responsible Agency Code")]
public string AgencyCode { get; set; }
[EdiValue("X(2)", Path = "GS/7", Format = "HHmm", Description = "GS08 Version / Release / Industry Identifier Code")]
public string Version { get; set; }
#endregion

#region GE - Group End
[EdiValue("9(1)", Path = "GE/0", Description = "97 Number of Transaction Sets Included")]
public int TransactionsCount { get; set; }
[EdiValue("9(9)", Path = "GE/1", Description = "28 Group Control Number")]
public int GroupTrailerControlNumber { get; set; }
#endregion

public List ShipmentNotices { get; set; }

}

[EdiMessage]
public class ShipmentNoticeEDI
{
#region ST - Transaction Set Header
[EdiValue("X(3)", Path = "ST/0", Description = "ST01 - Transaction set ID code")]
public string TransactionSetCode { get; set; }

[EdiValue("X(9)", Path = "ST/1", Description = "ST02 - Transaction set control number")]
public string TransactionSetControlNumber { get; set; }
#endregion

#region SE - Segment End
[EdiValue(Path = "SE/0", Description = "SE01 - Number of included segments")]
public int SegmentsCount { get; set; }
[EdiValue("X(9)", Path = "SE/1", Description = "SE02 - Transaction set control number (same as ST02)")]
public string TrailerTransactionSetControlNumber { get; set; }
#endregion

[EdiValue("X(2)", Path = "BSN/0", Description = "BSN01 - Trans. Set Purpose Code")]
public string TransSetPurposeCode { get; set; }

[EdiValue("X(10)", Path = "BSN/1", Description = "BSN02 - Shipment Identification")]
public string ShipmentIdentification { get; set; }

[EdiValue("9(8)", Path = "BSN/2", Format = "yyyyMMdd", Description = "BSN03 - Purchase Date")]
[EdiValue("9(4)", Path = "BSN/3", Format = "HHmm", Description = "BSN04- Purchase Time")]
public DateTime PurchaseOrderDate { get; set; }

[EdiValue(Path = "CTT/0", Description = "CTT01 - Number of line itemsin HLs")]
public int LinesCount { get; set; }

public List Shipments { get; set; }

}

[EdiSegment, EdiSegmentGroup("HL", SequenceEnd = "CTT"), EdiCondition("S", Path = "HL/2")]
public class ShipmentEDI
{
[EdiCondition("011", Path = "DTM/0")]
public EDIDateTime ShippedDate { get; set; }

[EdiCondition("017", Path = "DTM/0")]
public EDIDateTime DeliveryDate { get; set; }

[EdiCondition("SF", Path = "N1/0")]
public Address From { get; set; }
[EdiCondition("ST", Path = "N1/0")]
public Address To { get; set; }

public List Orders { get; set; }

}

[EdiSegment, EdiSegmentGroup("HL", SequenceEnd = "CTT"), EdiCondition("O", Path = "HL/2")]
public class OrderEDI
{
[EdiValue("X(8)", Path = "PRF/0", Description = "PRF01 - Purchase Order Number")]
public string PurchaseOrderNumber { get; set; }

public List Items { get; set; }

}

[EdiSegment, EdiSegmentGroup("HL", SequenceEnd = "CTT"), EdiCondition("I", Path = "HL/2")]
public class OrderItemEDI
{
[EdiValue("X(11)", Path = "LIN/4", Description = "LIN05 - Product/Service ID NDC")]
public string NDC { get; set; }

[EdiValue("X(100)", Path = "PID/4", Description = "PID05 - Item Description")]
public string ItemDescription { get; set; }

[EdiValue("X(2)", Path = "SN1/2", Description = "SN102 - Units")]
public string Units { get; set; }

[EdiValue("9(3)", Path = "SN1/3", Description = "SN104 - Quantity Shipped")]
public int QuantityShipped { get; set; }

[EdiValue("9(3)", Path = "SN1/4", Description = "SN103 - Quantity Ordered")]
public int QuantityOrdered { get; set; }

}

[EdiSegment, EdiPath("DTM")]
public class EDIDateTime
{

[EdiValue(Path = "DTM/0", Description = "DTM01 - Date/Time Qualifier")]
public string DateTimeQualifier { get; set; }

[EdiValue("9(8)", Path = "DTM/1", Format = "yyyyMMdd", Description = "DTM02 - Date format =CCYYMMDD")]
public DateTime Date { get; set; }

}

[EdiSegment, EdiSegmentGroup("N1", SequenceEnd = "N1")]
public class Address
{
[EdiValue(Path = "N1/1", Description = "N101 - Address Name")]
public string Name { get; set; }

[EdiValue(Path = "N4/0", Description = "N101 - City")]
public string City { get; set; }

[EdiValue(Path = "N4/1", Description = "N102 - State")]
public string State { get; set; }

}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the proposed 856 model with the existing 850 example that the author used as its basis. Add the shipping-notice model and its related EDI classes where the repository keeps example models, then verify that the example represents the 856 structure correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.