Oracle-1-0-B2B-Invoice-In
The data mapping and sample payload for the Oracle-1-0-B2B-Invoice-In message definition are outlined in this section.
Data Mapping
Figure 1
Figure 1 shows the structure of the inbound payload that's received for the Oracle-1-0-B2B-Invoice-In message:
Figure 2
Figure 2 shows the structure of the transformed payload that's passed onto the application:
This table shows the mapping of the inbound B2B invoice message to the application:
Source: B2BInvoiceMessage/B2BInvoice | Target: createB2BInvoiceAsync/InvoiceInterfaceHeader |
---|---|
Source Set to B2B XML INVOICE. |
|
../ProcessingConfiguration/PartnerKey1 | VendorId |
../ProcessingConfiguration/PartnerKey2 | VendorSiteId |
Supplier/Name | VendorName |
TaxTotalAmount or Tax[Amount != '']/Amount |
ControlAmount If expressTaxInControl is true() and there is a value for TaxTotalAmount, it is mapped. If the sum(Tax[Amount != '']/Amount) is not equal to zero, it is mapped. Otherwise, this is set to 0. |
Description | Description |
DocumentReferenceNumber | ExternalDocumentReference |
TotalAmount |
InvoiceAmount InvoiceTypeLookupCode is populated as follows: If InvoiceTypeLookupCode is STANDARD, then the TotalAmount is mapped. If InvoiceTypeLookupCode is CREDIT and TotalAmount is positive, then a negative of TotalAmount is mapped. Otherwise, TotalAmount is mapped. |
CurrencyCode |
InvoiceCurrencyCode DVM CURRENCY_CODE is associated with this field. |
InvoiceDate | InvoiceDate |
InvoiceNumber | InvoiceNumber |
TypeCode |
InvoiceTypeLookupCode Set this to CREDIT if the TotalAmount is a negative value or if TypeCode is CREDIT or 'Credit' or '381'. Set this to STANDARD if TypeCode is STANDARD or '380' or '388'. If the TypeCode is not blank, the DVM is used to populate this value. DVM INVOICE_TYPE_CODE is associated with this field. |
PaymentMethodCode |
PaymentMethodCode DVM PAYMENT_METHOD is associated with this field. |
OrderNumber |
PONumber OrderNumber is mapped when it contains a value and there is no order number on the lines. |
PaymentTermsName |
TermsName DVM PAYMENT_TERMS is associated with this field. |
Supplier/EMailAddress | VendorEmailAddress |
B2BProgramName Set to AP_INV_B2B_SOA |
|
Lines |
InvoiceInterfaceLine An InvoiceInterfaceLine[LineTypeLookupCode = 'ITEM'] is created for each line. |
LineExtensionAmount |
Amount If InvoiceTypeLookupCode is STANDARD, then LineExtensionAmount is mapped. If InvoiceTypeLookupCode is CREDIT and LineExtensionAmount is positive then concat('-', LineExtensionAmount) is mapped. If LineExtensionAmount is negative, then LineExtensionAmount is mapped. |
Description | Description |
ItemDescription | ItemDescription |
LineGroupNumber Instance of the line. |
|
LineTypeLookupCode Set to ITEM. |
|
OrderNumber |
PONumber OrderNumber is mapped. If it is blank, then the OrderNumber from B2BInvoiceMessage/B2BInvoice Header is mapped. |
OrderLineNumber | POLineNumber |
OrderScheduleLineNumber | POShipmentNumber |
Quantity |
InvoicedQuantity If InvoiceTypeLookupCode is STANDARD, then Quantity is mapped. If InvoiceTypeLookupCode is CREDIT and Quantity is positive, then a negative Quantity is mapped. If Quantity is negative, then Quantity is mapped. |
UnitOfMeasureCode |
UnitOfMeasLookupCode DVM UOM_CODE is associated with this field. |
UnitPriceAmount | UnitPrice |
SupplierItemNumber | VendorItemNumber |
Charge | InvoiceInterfaceLine |
Amount |
Amount If InvoiceTypeLookupCode is STANDARD, then Amount is mapped. If InvoiceTypeLookupCode is CREDIT and Amount is positive, then a negative Amount is mapped. If Amount is negative, it is mapped. |
Description | Description |
TypeCode |
LineTypeLookupCode DVM is applied if there is a value, but if TypeCode is blank, LineTypeLookupCode is set to MISCELLANEOUS. DVM CHARGE_REASON_CODE is associated with this field. |
Tax |
InvoiceInterfaceLine It is mapped if expressTaxInControl is false(). |
Amount |
Amount If InvoiceTypeLookupCode is STANDARD, then Amount is mapped. If InvoiceTypeLookupCode is CREDIT and Amount is positive, then a negative Amount is mapped. If Amount is negative, it is mapped. |
LineTypeLookupCode Set to TAX. |
|
Tax |
InvoiceInterfaceLine It is mapped if expressTaxInControl is false(). |
Amount |
Amount If InvoiceTypeLookupCode is STANDARD, then Amount is mapped. If InvoiceTypeLookupCode is CREDIT and Amount is positive, then a negative Amount is mapped. If Amount is negative, it is mapped. |
LineGroupNumber Set to the position() of Lines. |
|
LineTypeLookupCode Set to TAX. |
Sample Payload
Here's a sample payload of the message:
<n1:B2BInvoiceMessage
xmlns:n1="http://xmlns.oracle.com/apps/scm/cmk/b2b">
<n1:B2BInvoice>
<n1:InvoiceNumber>2810005248</n1:InvoiceNumber>
<n1:InvoiceDate>2020-09-07</n1:InvoiceDate>
<n1:TypeCode>CREDIT</n1:TypeCode> <!-- INVOICE_TYPE_CODE -->
<n1:Description>Header Description</n1:Description>
<n1:PaymentTermsName>30 days</n1:PaymentTermsName> <!--
PAYMENT_TERMS -->
<n1:PaymentMethodCode>PayCode</n1:PaymentMethodCode> <!--
PAYMENT_METHOD -->
<n1:CurrencyCode>EUR</n1:CurrencyCode> <!-- CURRENCY_CODE -->
<n1:TaxTotalAmount>420</n1:TaxTotalAmount>
<n1:TotalAmount>528</n1:TotalAmount>
<n1:DocumentReferenceNumber>999222</n1:DocumentReferenceNumber>
<n1:OrderNumber>1004571</n1:OrderNumber>
<n1:Supplier>
<n1:Name>Supplier Name</n1:Name>
<n1:EMailAddress>supplier@email.com</n1:EMailAddress>
</n1:Supplier>
<n1:Charge>
<n1:TypeCode>FREIGHT</n1:TypeCode> <!-- CHARGE_REASON_CODE -->
<n1:Description>Charge1 Description</n1:Description>
<n1:Amount>10.00</n1:Amount>
</n1:Charge>
<n1:Charge>
<n1:TypeCode>FREIGHT</n1:TypeCode> <!-- CHARGE_REASON_CODE -->
<n1:Description>Charge2 Description</n1:Description>
<n1:Amount>15.00</n1:Amount>
</n1:Charge>
<n1:Tax>
<n1:Amount>280</n1:Amount>
</n1:Tax>
<n1:Tax>
<n1:Amount>0</n1:Amount>
</n1:Tax>
<n1:Lines>
<n1:LineNumber>1</n1:LineNumber>
<n1:Description>Description-Line 1</n1:Description>
<n1:SupplierItemNumber>Supplier Item#</n1:SupplierItemNumber>
<n1:ItemDescription>Item Description</n1:ItemDescription>
<n1:Quantity>1</n1:Quantity>
<n1:UnitOfMeasureCode>EA</n1:UnitOfMeasureCode> <!-- UOM_CODE --
>
<n1:UnitPriceAmount>2000</n1:UnitPriceAmount>
<n1:LineExtensionAmount>1800</n1:LineExtensionAmount>
<n1:OrderNumber>1004570</n1:OrderNumber>
<n1:OrderLineNumber>1</n1:OrderLineNumber>
<n1:OrderScheduleLineNumber>1</n1:OrderScheduleLineNumber>
<n1:Tax>
<n1:Amount>240</n1:Amount>
</n1:Tax>
</n1:Lines>
</n1:B2BInvoice>
</n1:B2BInvoiceMessage>