azure-logic-appsediedifact

EDIFACT DELFOR Decoding in Azure Logic Apps


I am moving from X12 into other formats with Logic Apps + Integration Account, without much EDI or LA experience.

Here is my DELFOR example:

UNB+UNOA:2+OURCODE:ZZ+THEIRCODE:01+180523:1005+157'
UNG+DELFOR+OURCODE+THEIRCODE+180523:1005+157+UN+D:96A'
UNH+15700001+DELFOR:D:96A:UN'
BGM+241+201805231005-1+5'
DTM+137:20180523:102'
DTM+323:2018052120180820:711'
NAD+MI+OURCODE::92'
NAD+SF+THEIRCODE::92'
NAD+SU+THEIRCODE::92'
UNS+D'
NAD+ST+OURCODE::92'
LIN+++TESTPARTA1:IN'
PIA+1+RECEIVERPARTNO:VP'
RFF+ON:PONUMBER55'
QTY+1:3080:EA'
SCC+4++W'
DTM+2:20180521:102'
QTY+1:0:EA'
SCC+4++W'
DTM+2:20180528:102'
QTY+1:0:EA'
SCC+4++W'
DTM+2:20180604:102'
QTY+1:880:EA'
SCC+4++W'
DTM+2:20180611:102'
QTY+1:2200:EA'
SCC+4++W'
DTM+2:20180618:102'
QTY+1:1760:EA'
SCC+4++W'
DTM+2:20180625:102'
QTY+1:1760:EA'
SCC+4++W'
DTM+2:20180702:102'
QTY+1:1760:EA'
SCC+4++W'
DTM+2:20180709:102'
QTY+1:1760:EA'
SCC+4++W'
DTM+2:20180716:102'
QTY+1:1320:EA'
SCC+4++W'
DTM+2:20180723:102'
QTY+1:1320:EA'
SCC+4++W'
DTM+2:20180730:102'
QTY+1:440:EA'
SCC+4++W'
DTM+2:20180806:102'
QTY+1:440:EA'
SCC+4++W'
DTM+2:20180813:102'
QTY+1:440:EA'
SCC+4++W'
DTM+2:20180820:102'
QTY+3:274560:C62'
SCC+2'
DTM+52:20180604:102'
QTY+3:275440:C62'
SCC+3'
DTM+52:20180611:102'
QTY+3:271480:C62'
DTM+50:20180522:102'
QTY+1:2640:C62'
DTM+50:20180522:102'
RFF+AAK:CG07656'
QTY+79:271480:C62'
DTM+52:20180522:102'
UNS+S'
UNT+69+15700001'
UNE+1+157'
UNZ+1+157'

I am using Liaison EDI Notepad to validate it generally. It reports no issues and I find it a very reliable tool. I am open to other validation suggestions.

Now, for doing a DECODE EDIFACT action in LA, which MS schema do I use? I have selected EFACT_D96A_DELFOR.xsd from MicrosoftEdiXSDTemplates.zip also available on GitHub. Is it the correct one for my sample? When I try the action, I have raw input:

{
"host": {
    "connection": {
        "name": "/subscriptions/..."
    }
},
"method": "post",
"path": "/decode",
"queries": {
    "componentSeparator": "58",
    "dataElementSeparator": "43",
    "decimalIndicator": "Comma",
    "releaseIndicator": "63",
    "repetitionSeparator": "42",
    "segmentTerminator": "39",
    "segmentTerminatorSuffix": "None"
},
"body": {
    "$content-type": "application/octet-stream",
    "$content": "VU5CK1VOT0E6MitPVVJDT0RFOlpaK1RIRUlSQ09ERTowMSsxODA1MjM6MTAwNSsxNTcnDQpVTkcrREVMRk9SK09VUkNPREUrVEhFSVJDT0RFKzE4MDUyMzoxMDA1KzE1NytVTitEOjk2QScNClVOSCsxNTcwMDAwMStERUxGT1I6RDo5NkE6VU4nDQpCR00rMjQxKzIwMTgwNTIzMTAwNS0xKzUnDQpEVE0rMTM3OjIwMTgwNTIzOjEwMicNCkRUTSszMjM6MjAxODA1MjEyMDE4MDgyMDo3MTEnDQpOQUQrTUkrT1VSQ09ERTo6OTInDQpOQUQrU0YrVEhFSVJDT0RFOjo5MicNCk5BRCtTVStUSEVJUkNPREU6OjkyJw0KVU5TK0QnDQpOQUQrU1QrT1VSQ09ERTo6OTInDQpMSU4rKytURVNUUEFSVEExOklOJw0KUElBKzErUkVDRUlWRVJQQVJUTk86VlAnDQpSRkYrT046UE9OVU1CRVI1NScNClFUWSsxOjMwODA6RUEnDQpTQ0MrNCsrVycNCkRUTSsyOjIwMTgwNTIxOjEwMicNClFUWSsxOjA6RUEnDQpTQ0MrNCsrVycNCkRUTSsyOjIwMTgwNTI4OjEwMicNClFUWSsxOjA6RUEnDQpTQ0MrNCsrVycNCkRUTSsyOjIwMTgwNj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w=="
}

}

and output includes an error makes me think I am not validating correctly (wrong XSD?):

errorMessage:

Error: 1 (Field level error) SegmentID: UNB Position in TS: 1 Data Element ID: UNB3.2 Position in Segment: 4 Position in Field: 2 Data Value: 01 12: Invalid value in data element

I take it this is referring to the 01 leading off 01+180523:1005+157 on the first segment (line) referring to datetime 5/23/2018 10:05. Actually the 01 refers to my Guest Identity. What is the issue being pointed out here?

This JPG  is the relevant IA Agreement.

I am looking for advice on troubleshooting this, including generally matching a given DELFOR or other EDIFACT to the correct MS XSD.

After I get through this, I plan VDA next. Anything about VDA that you recommend for me to keep in mind?

Thank you

Note 01 is not a problem to the Decode Action and is used in the TI Automotive specs on page 29 of link. However, I changed to ZZ and this did move onto another error. The output is

"badMessages": [
        {
            "UNB": {
                "UNB_Segment": "UNB+UNOA:2+OURCODE:ZZ+THEIRCODE:ZZ+180523:1005+157'\r\n################",
                "UNB2.1": "OURCODE",
                "UNB2.2": "ZZ",
                "UNB3.1": "THEIRCODE",
                "UNB3.2": "ZZ"
            },
            "UNG": {
                "UNG_Segment": "UNG+DELFOR+OURCODE+THEIRCODE+180523:1005+157+UN+D:96A'\r\n",
                "UNG1": "DELFOR",
                "UNG2.1": "OURCODE",
                "UNG3.1": "THEIRCODE",
                "UNG4.1": "180523",
                "UNG4.2": "1005",
                "UNG5": "157",
                "UNG6": "UN",
                "UNG7.1": "D",
                "UNG7.2": "96A"
            },
            "UNH": {
                "UNH1": "15700001",
                "UNH2.1": "DELFOR",
                "UNH2.2": "D",
                "UNH2.3": "96A",
                "UNH2.4": "UN"
            }, ...

The error with ZZ is

Error encountered during parsing. The Edifact transaction set with id '15700001' contained in functional group with id '157', in interchange with id '157', with sender id 'OURCODE', receiver id 'THEIRCODE' is being suspended with following errors:\r\n Error: 1 (Miscellaneous error)\r\n\t70: \r\n\r\n Error: 2 (Miscellaneous error)\r\n\t71: Transaction Set or Group Control Number Mismatch\r\n\r\n Error: 3 (Miscellaneous error)\r\n\t29: Invalid count specified at interchange, group, or message levels\r\n\r\n",

Note the UNT segment has the correct segment count and control number: UNT+69+15700001'

In the output the payload reports invalid schema, including the correctly parsed UNH segment:

<UnrecognizedSchema>
<UnrecognizedSegment>
    UNH+15700001+DELFOR:D:96A:UN
</UnrecognizedSegment>
<UnrecognizedSegment>
    BGM+241+201805231005-1+5
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+137:20180523:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+323:2018052120180820:711
</UnrecognizedSegment>
<UnrecognizedSegment>
    NAD+MI+OURCODE::92
</UnrecognizedSegment>
<UnrecognizedSegment>
    NAD+SF+THEIRCODE::92
</UnrecognizedSegment>
<UnrecognizedSegment>
    NAD+SU+THEIRCODE::92
</UnrecognizedSegment>
<UnrecognizedSegment>
    UNS+D
</UnrecognizedSegment>
<UnrecognizedSegment>
    NAD+ST+OURCODE::92
</UnrecognizedSegment>
<UnrecognizedSegment>
    LIN+++TESTPARTA1:IN
</UnrecognizedSegment>
<UnrecognizedSegment>
    PIA+1+RECEIVERPARTNO:VP
</UnrecognizedSegment>
<UnrecognizedSegment>
    RFF+ON:PONUMBER55
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:3080:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180521:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:0:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180528:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:0:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180604:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:880:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180611:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:2200:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180618:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:1760:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180625:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:1760:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180702:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:1760:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180709:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:1760:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180716:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:1320:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180723:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:1320:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180730:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:440:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180806:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:440:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180813:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:440:EA
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+4++W
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+2:20180820:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+3:274560:C62
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+2
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+52:20180604:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+3:275440:C62
</UnrecognizedSegment>
<UnrecognizedSegment>
    SCC+3
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+52:20180611:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+3:271480:C62
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+50:20180522:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+1:2640:C62
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+50:20180522:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    RFF+AAK:CG07656
</UnrecognizedSegment>
<UnrecognizedSegment>
    QTY+79:271480:C62
</UnrecognizedSegment>
<UnrecognizedSegment>
    DTM+52:20180522:102
</UnrecognizedSegment>
<UnrecognizedSegment>
    UNS+S
</UnrecognizedSegment>
<UnrecognizedSegment>
    UNT+42+15700001
</UnrecognizedSegment>


Solution

  • Thanks to everyone that commented.

    In the end, changing content was not an option as we are processing the EDI for various customers, not generating it. I entered a support request and MS changed things on its end and I tested it today validating that this is not longer an issue, at least in EastUS Azure region where I am running our code.