Ir para o conteúdo

Arquivo de mapeamento XPath no Jitterbit EDI

Introdução

Um arquivo de mapeamento é um arquivo de referência para download que contém os XPaths para todos os códigos de elementos de segmento X12 EDI em um mapa e mostra como o backend EDI mapeia arquivos X12 EDI brutos para xCBL. Essas informações XPath podem ser usadas em seu Integration Studio ou transformações do Design Studio.

O arquivo é um arquivo de texto simples com um .csv extensão contendo campos separados por vírgula.

Use o arquivo de mapeamento

Para usar o arquivo de mapeamento em an Integration Studio ou projeto do Design Studio, siga estes passos:

  1. Baixe o arquivo de mapeamento para o workflow de um documento.
  2. Abra as Transações e localize o documento.
  3. Expanda a entrada para expor o painel Views.
  4. Clique no primeiro link Raw para abrir o conteúdo X12 EDI do documento.
  5. Clique no segundo link Raw para abrir o mesmo conteúdo convertido para o formato xCBL.
  6. No arquivo X12 EDI, localize o campo a ser transformado e observe o código do elemento EDI.
  7. No arquivo de mapeamento XPath, encontre o código do elemento EDI e o XPath correspondente. Use a versão xCBL para confirmar a correspondência do XPath e do valor mapeado.

Exemplo

Neste exemplo, campos equivalentes são destacados em amostras de um arquivo X12 EDI, o arquivo xCBL convertido, e um extrato do arquivo de mapeamento XPath.

Arquivo X12 EDI (Ordem de Compra, 850)

example_850.edi

ISA*00*          *00*          *12*7703844115CHQT *02*9050999992211  *200107*1214*U*00401*000000006*0*T*>
GS*PO*7703844115CHQT*9050999992211*20230924*12142024*6*X*004010
ST*850*0002
BEG*00*SA*99340993**20230924*60006342
REF*X9*881807
REF*IA*60006342
REF*CO*W138156910
REF*DP*25
DTM*010*20230924
TD5*****UPSN
N9*SD*8119
N1*BT*Jane Smith
N3*2 Woodbridge Ave
N4*Edison*NJ*08837
PER*BD**TE*555-555-5555
N1*ST*Jane Smith
N3*2 Woodbridge Ave
N4*Edison*NJ*08837
PER*BD**TE*555-555-5555
N1*SO*Jane Smith*93*8119
N1*PO*Home Depot*93*8119
PO1*06*2*EA*9.7*TE*SK*H2520*VN*H2520***UP*H2520***PI*H2520
PID*F*08***BOOK LISTING
DTM*038*20610467
TD5*****UPSN
CTT*1
SE*25*0002
GE*7*6
IEA*1*000000007

Arquivo xCBL

example_850.xml
<Order>
  <OrderHeader>
    <OrderNumber>
      <BuyerOrderNumber>99340993</BuyerOrderNumber>
    </OrderNumber>
    <OrderIssueDate>2023-09-24T00:00:00</OrderIssueDate>
    <OrderReferences>
      <ContractReferences>
        <core:Contract>
          <core:ContractID>
            <core:Ident>60006342</core:Ident>
          </core:ContractID>
        </core:Contract>
      </ContractReferences>
      <OtherOrderReferences>
        <core:ReferenceCoded>
          <core:ReferenceTypeCoded>InternalControlNumber</core:ReferenceTypeCoded>
          <core:PrimaryReference>
            <core:RefNum>121521807</core:RefNum>
          </core:PrimaryReference>
        </core:ReferenceCoded>
        <core:ReferenceCoded>
          <core:ReferenceTypeCoded>InternalVendorNumber</core:ReferenceTypeCoded>
          <core:PrimaryReference>
            <core:RefNum>60006342</core:RefNum>
          </core:PrimaryReference>
        </core:ReferenceCoded>
        <core:ReferenceCoded>
          <core:ReferenceTypeCoded>CustomerOrderNumber</core:ReferenceTypeCoded>
          <core:PrimaryReference>
            <core:RefNum>W138156910</core:RefNum>
          </core:PrimaryReference>
        </core:ReferenceCoded>
        <core:ReferenceCoded>
          <core:ReferenceTypeCoded>DepartmentNumber</core:ReferenceTypeCoded>
          <core:PrimaryReference>
            <core:RefNum>25</core:RefNum>
          </core:PrimaryReference>
        </core:ReferenceCoded>
        <core:ReferenceCoded>
          <core:ReferenceTypeCoded>SubdayNumber</core:ReferenceTypeCoded>
          <core:PrimaryReference>
            <core:RefNum>8119</core:RefNum>
          </core:PrimaryReference>
        </core:ReferenceCoded>
      </OtherOrderReferences>
    </OrderReferences>
    <Purpose>
      <core:PurposeCoded>Other</core:PurposeCoded>
      <core:PurposeCodedOther>00</core:PurposeCodedOther>
    </Purpose>
    <OrderType>
      <core:OrderTypeCoded>Other</core:OrderTypeCoded>
      <core:OrderTypeCodedOther>SA</core:OrderTypeCodedOther>
    </OrderType>
    <OrderCurrency>
      <core:CurrencyCoded>Other</core:CurrencyCoded>
      <core:CurrencyCodedOther />
    </OrderCurrency>
    <OrderLanguage />
    <OrderDates>
      <ListOfDateCoded>
        <core:DateCoded>
          <core:DateQualifier>
            <core:DateQualifierCoded>RequestedShip</core:DateQualifierCoded>
          </core:DateQualifier>
          <core:Date>2023-09-11T00:00:00</core:Date>
        </core:DateCoded>
      </ListOfDateCoded>
      <RequestedShipByDate>2023-09-11T00:00:00</RequestedShipByDate>
    </OrderDates>
    <OrderParty>
      <BillToParty>
        <core:NameAddress>
          <core:Name1>Jane Smith</core:Name1>
          <core:Street>2 Woodbridge Ave</core:Street>
          <core:City>Edison</core:City>
          <core:Region>
            <core:RegionCoded>Other</core:RegionCoded>
            <core:RegionCodedOther>NJ</core:RegionCodedOther>
          </core:Region>
          <core:PostalCode>08837</core:PostalCode>
        </core:NameAddress>
        <core:PrimaryContact>
          <core:ContactFunction>
            <core:ContactFunctionCodedOther>BuyerNameOrDepartment</core:ContactFunctionCodedOther>
          </core:ContactFunction>
          <core:ListOfContactNumber>
            <core:ContactNumber>
              <core:ContactNumberTypeCoded>TelephoneNumber</core:ContactNumberTypeCoded>
              <core:ContactNumberValue>555-555-5555</core:ContactNumberValue>
            </core:ContactNumber>
          </core:ListOfContactNumber>
        </core:PrimaryContact>
      </BillToParty>

Arquivo de mapeamento XPath (extrato)

Esta tabela mostra parte de um arquivo de mapeamento de amostra baixado do workflow de um parceiro. Linhas não relevantes para este exemplo são omitidas.

ShortName LongName XPath DataType
BEG01 Transaction Set Purpose Code Order/OrderHeader/Purpose[core:PurposeCoded='Other']/core:PurposeCodedOther string
BEG02 Purchase Order Type Code Order/OrderHeader/ListOfNameValueSet/core:NameValueSet[core:SetName='HeaderReferences']/core:ListOfNameValuePair/core:NameValuePair[core:Name='POType']/core:Value string
BEG03 Purchase Order Number Order/OrderHeader/OrderNumber/BuyerOrderNumber string
BEG05 Order Issue Date Order/OrderHeader/OrderIssueDate Date
BEG06 Contract Number Order/OrderHeader/OrderReferences/ContractReferences/core:Contract/core:ContractID/core:Ident string
BT-N102 Bill To Party Name Order/OrderHeader/OrderParty/BillToParty/core:NameAddress/core:Name1 string
BT-N103 Bill To Party Identification Code Qualifier Order/OrderHeader/ListOfNameValueSet/core:NameValueSet[core:SetName='PartyReferences']/core:ListOfNameValuePair/core:NameValuePair[core:Name='BillToPartyPartyIdentificationCodeQualifier']/core:Value string
BT-N104 Bill To Party Identification Code Order/OrderHeader/OrderParty/BillToParty/core:PartyID/core:Ident string
BT-N301 Bill To Party Address Line 1 Order/OrderHeader/OrderParty/BillToParty/core:NameAddress/core:Street string
BT-N302 Bill To Party Address Line 2 Order/OrderHeader/OrderParty/BillToParty/core:NameAddress/core:StreetSupplement1 string
BT-N401 Bill To Party City Order/OrderHeader/OrderParty/BillToParty/core:NameAddress/core:City string
BT-N402 Bill To Party State or Province Code Order/OrderHeader/OrderParty/BillToParty/core:NameAddress/core:Region[core:RegionCoded='Other']/core:RegionCodedOther string
BT-N403 Bill To Party Postal Code Order/OrderHeader/OrderParty/BillToParty/core:NameAddress/core:PostalCode string

Vídeo

Tutorial de mapeamento Jitterbit EDI XPath