Generic Vendor Download API | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Invoice Download XML Message (CWInvoiceOut) |
Purpose: Order Management System allows you to capture invoice information to download to another system, such as a retail store or financial system.
Invoice information flow: This flowchart explains how invoice information is downloaded from Order Management System.
In this chapter:
- Identifying Invoice Download Triggers
- When are Invoice Download Triggers Created?
- Invoice Outbound Trigger Activities
- Invoice Outbound Trigger Rules
- Invoice Outbound XML Inclusion
• Invoice Download XML Message (CWInvoiceOut)
- Invoice Download Message: Sample XML
The system creates invoice download triggers in the IL Outbound Trigger table when an invoice or credit invoice is created. The Invoice Outbound job in the Working with Integration Layer Processes (IJCT) menu option monitors the IL Outbound table for invoice download triggers to process and generates an Invoice Download XML Message (CWInvoiceOut) to send to the remote system.
Identifying Invoice Download Triggers
You can view all download triggers in the IL Outbound Trigger table at the Work with Outbound Interface Transactions Screen.
Each trigger in the IL Outbound Trigger table contains a:
• File code: indicating the type of information to download and which IL process job processes the trigger. For invoice download triggers, the File code is IHD.
• Key: indicating the specific record to download. For invoice download triggers, the Key identifies the specific company, order number, and invoice number associated with the invoice download trigger. For example, the Key 555000063970001713 indicates the invoice information is located in company 555 for order number 6397 and invoice number 1713.
• Capture type: indicating the type of activity performed against the record; see Invoice Outbound Trigger Activities.
- A = the invoice was created.
- C = the invoice was updated.
When are Invoice Download Triggers Created?
The Create Generic Invoice Download Trigger Records (I17) system control value controls whether the system creates invoice download triggers in the IL Outbound Trigger table.
• If this system control value is selected, certain actions in Order Management System triggers the system to create invoice download triggers in the IL Outbound Trigger table with a File code of IHD. The IL Outbound Trigger table acts as a “to do” list for the invoice information that requires download.
• If this system control value is unselected, the system does not create invoice download triggers in the IL Outbound Trigger table.
You can also create an invoice download trigger for each invoice in your company using the Generating Outbound Interface Triggers (GOIT) menu option. Run this process to initially send invoices to the remote system.
To generate an Invoice Download XML Message (CWInvoiceOut), the system:
1. Creates invoice download triggers, based on Order Management System activities that create an invoice. See Invoice Outbound Trigger Activities for a list of the activities that create invoice download triggers.
2. Evaluates the trigger rules for the Invoice Outbound job to determine if the invoice download trigger is created. Invoice Outbound Trigger Rules define the criteria the invoice must meet in order for the system to create an invoice download trigger.
3. When active, the job’s trigger monitor looks for unprocessed invoice download triggers to process at defined intervals, based on the Outbound delay time.
The Invoice Outbound trigger monitor:
• looks for invoice download triggers with the File code IHD and a status of ready (R).
• removes duplicate invoice download triggers. See Invoice Trigger Cleanup.
• determines which invoice to download, based on the Key for the invoice download trigger. The Key for invoice download triggers consists of company + order number + invoice number. For example, the Key 555000063970001713 indicates the invoice information is located in company 555 for order number 6397 and invoice number 1713.
• sends each invoice download trigger to the job’s message builder.
4. For each invoice download trigger, the message builder determines which elements to include in the invoice download message, based on XML inclusion rules; see Invoice Outbound XML Inclusion.
5. The Invoice Outbound message builder sends the generated invoice download messages to the queues defined for the Invoice Outbound job whose Enabled field is selected. See Outbound Interface Queues.
Invoice Outbound Trigger Activities
This table indicates:
• which Order Management System activities create an invoice download trigger.
• which table(s) the invoice download trigger references.
• the type of activity performed against the invoice:
- A = the invoice was created.
- C = the invoice was updated.
Note: Some activities may create duplicate triggers; however, the Invoice Trigger Cleanup will remove any duplicates before generating the Invoice Download XML Message (CWInvoiceOut).
You can review the invoice download triggers in the IL Outbound Trigger table at the Work with Outbound Interface Transactions Screen.
Change triggers: The system creates a change invoice download trigger only if the system adds an invoice line (an additional shipment is made against the invoice) and the Consolidated Invoice (B49) system control value is selected.
The system does not create a change invoice download trigger if:
• the Consolidated Invoice (B49) system control value is unselected, or
• the Consolidated Invoice (B49) system control value is selected and you or the system:
- settles or rejects the deposit for the debit invoice.
- for deferred or installment billing, performs any updates against the invoice at the Change Invoice Pay Method Screen.
- applies a credit balance against an order.
For more information: See Consolidated Invoices for examples of when the system creates invoice download triggers, based on the setting of the Consolidated Invoice (B49) system control value.
Note: The system creates an invoice download trigger for the activities listed below only if the invoice meets the criteria from the Invoice Outbound Trigger Rules.
Activity |
Menu Option |
Referenced Table |
Trigger Type |
Create a debit invoice during billing for a shipment against the order. Note: If the Consolidated Invoice (B49) system control value is selected, the system creates one invoice for the shipments against the order within the same billing cycle; if this system control value is unselected, the system creates a separate invoice for each shipment against the order. See Consolidated Invoices. |
Billing async, MCON |
Invoice Header Order Header |
A |
Create a credit invoice during billing for returns, cancellations, and overpayments. If the Consolidated Invoice (B49) system control value is selected, the system creates one credit invoice for the refunds against the order within the same billing cycle; if this system control value is unselected, the system creates a separate credit invoice for each refund against the order. See Consolidated Invoices. |
Billing async, WRTA OEOM |
Invoice Header Order Header |
A |
Generate invoice download triggers |
GOIT |
Invoice Header Order Header |
A |
Add a line to a debit invoice during billing for an additional shipment if the Consolidated Invoice (B49) system control value is selected. |
Billing async, MCON |
Invoice Header Order Header |
C |
Add a line to a credit invoice during billing for an additional return, cancellation, or overpayment against the order if the Consolidated Invoice (B49) system control value is selected. |
Billing async, WRTA OEOM |
Invoice Header Order Header |
C |
The Consolidated Invoice (B49) system control value defines whether you consolidate invoices.
• If this system control is selected, any open items that are shipped before you run the Sales Journal for the day will appear on the same invoice. The system will create an add invoice download trigger for the first shipment and then create a change invoice download trigger for each additional shipment within the same billing cycle.
• If this system control value is unselected, all open items will appear on separate invoices, regardless of when the Sales Journal is run. The system will create an add invoice download trigger for each shipment.
Consolidate invoice example 1: The Consolidated Invoice (B49) system control value is selected. You ship and bill order 6456 containing 3 order lines.
Order line |
Invoice |
Invoice Download Trigger |
line 1 shipped and billed at noon |
System creates invoice 1715 |
System creates invoice download trigger for Trigger type A: 555000064560001715 |
line 2 shipped and billed at 3PM |
System updates invoice 1715 |
System creates invoice download trigger for Trigger type C: 555000064560001715 |
line 3 shipped and billed at 5PM |
System updates invoice 1715 |
System creates invoice download trigger for Trigger type C: 555000064560001715 |
Note: The Invoice Trigger Cleanup will remove the duplicate change invoice download trigger, keeping the most recent change, before generating an Invoice Download XML Message (CWInvoiceOut). |
Consolidate invoice example 2: The Consolidated Invoice (B49) system control value is selected. You ship and bill order 6457 containing 3 order lines.
Order line |
Invoice |
Invoice Download Trigger |
line 1 shipped and billed at noon |
System creates invoice 1716 |
System creates invoice download trigger for Trigger type A: 555000064570001716 |
line 2 shipped and billed at 3PM |
System creates invoice 1717 |
System creates invoice download trigger for Trigger type A: 555000064570001717 |
line 3 shipped and billed at 5PM |
System creates invoice 1718 |
System creates invoice download trigger for Trigger type A: 555000064570001718 |
Invoice Outbound Trigger Rules
Invoice Outbound trigger rules define the criteria an invoice must meet in order for the system to create an invoice download trigger.
• If the invoice meets the Invoice Outbound trigger rule criteria, the system creates an invoice download trigger.
• If the invoice does not meet the Invoice Outbound trigger rule criteria, the system does not create an invoice download trigger.
You can define Invoice Outbound trigger rules for fields in the Invoice Header table and Order Header table that are included in the Invoice Download XML Message (CWInvoiceOut). If you define more than one criterion, the invoice must meet all of the criteria defined in order to generate a trigger.
Example: You define the following trigger rules for the Invoice Outbound job.
Invoice Outbound Trigger Rules |
||
Invoice Header table criteria |
Order Header table criteria |
Results |
The Company must equal 135 or 555. |
|
The system creates an invoice download trigger only if the invoice being created is in company 135 or 555. |
The Company must equal 135 or 555. The Invoice type field must equal ’I’ (invoice). |
|
The system generates an invoice download trigger only if the invoice being created is in company 135 or 555 and the type of invoice is I (invoice) and not C (credit invoice). |
The Invoice type field must equal ’I’ (invoice). |
The Order type is not ’E’ (e-commerce). |
The system generates an invoice download trigger only if the type of invoice being created is I (invoice) and not C (credit invoice) and the invoice is not associated with order type E (e-commerce). |
no criteria defined |
no criteria defined |
The system generates an invoice download trigger any time an invoice is created. |
You can define trigger rules for the Invoice Outbound job at the Outbound Interface Trigger Rules Screen; see Defining Outbound Interface Trigger Rules.
Note: When you create trigger rules, the system does not validate that your entry is a valid value for the field or is within the maximum field positions. Refer to your Field/Table Listing to review field attributes for the Invoice Header table and Order Header table.
Before processing the invoice download triggers, the Invoice Outbound job looks for duplicate unprocessed invoice download triggers.
Duplicate invoice download triggers exist if more than one trigger has the same:
• File code IHD
• Capture type (A (add) or C (change))
• Key (company + order number + invoice number)
If duplicate invoice download triggers exist, the system removes duplicates, leaving only the most recent invoice download trigger for that capture type.
Example: The following change invoice download triggers exist in the IL Outbound table.
File |
Type |
Status |
Key |
Results |
IHD |
C |
R |
555000063970001713 |
The system deletes 2 of these invoice download triggers, leaving only one change trigger to process. |
IHD |
C |
R |
555000063970001713 |
|
IHD |
C |
R |
555000063970001713 |
If both an add (Capture type A) and a change (Capture type C) invoice download trigger exists for the same Key, the system generates an Invoice Download XML Message (CWInvoiceOut) for both triggers.
Invoice Outbound XML Inclusion
For each invoice download trigger, the Invoice Outbound message builder determines which elements to include in the Invoice Download XML Message (CWInvoiceOut), based on XML inclusion rules.
You can define Invoice Outbound XML inclusion rules at the Outbound Interface XML Inclusion Screen.
XML inclusion defines which elements to include in the Invoice Download XML Message (CWInvoiceOut).
• If the element is included, that element and its parents are included in the generated invoice download message.
• If the element is excluded, that element and its children are excluded from the generated invoice download message.
This table indicates which elements in the invoice download message are included, based on which elements you flag to include or exclude.
Include element in XML message? |
Element |
||||
Selected = Include InvoiceHeader Unselected = Exclude InvoiceHeader and all of its children, OrderHeader, CustomerSoldTo, CustomerBillTo, InvoicePaymentMethod, and InvoiceShipTo; the system sends a message with only the Message element and its attributes |
InvoiceHeader |
||||
Selected = Include OrderHeader and its parent, InvoiceHeader Unselected = Exclude OrderHeader |
|
OrderHeader |
|||
Selected = Include CustomerSoldTo and its parent, InvoiceHeader Unselected = Exclude CustomerSoldTo |
|
CustomerSoldTo |
|||
Selected = Include CustomerBillTo and its parent, InvoiceHeader Unselected = Exclude CustomerBillTo |
|
CustomerBillTo |
|||
Selected = Include InvoicePaymentMethod and its parent, InvoiceHeader Unselected = Exclude InvoicePaymentMethod |
|
InvoicePaymentMethod |
|||
Selected = Include InvoiceShipTo and its parent, InvoiceHeader Unselected = Exclude InvoiceShipTo and its children, OrderShipTo, CustomerShipTo, and InvoiceDetail |
|
InvoiceShipTo |
|||
Selected = Include OrderShipTo and its parents, InvoiceShipTo and InvoiceHeader Unselected = Exclude OrderShipTo and its child OrderMessage |
|
|
OrderShipTo |
||
Selected = Include OrderMessage and its parents, OrderShipTo, InvoiceShipTo, and InvoiceHeader. Unselected = Exclude OrderMessage |
|
|
|
OrderMessage |
|
Selected = Include Certificate and its parents, OrderShipTo, InvoiceShipTo, and InvoiceHeader. Unselected = Exclude Certificate |
|
|
|
Certificate |
|
Selected = Include CustomerShipTo and its parents, InvoiceShipTo and InvoiceHeader Unselected = Exclude CustomerShipTo |
|
|
CustomerShipTo |
||
Selected = Include InvoiceDetail and its parents, InvoiceShipTo and InvoiceHeader Unselected = Exclude InvoiceDetail and its children, OrderDetail, UPC, InvoiceDetailPayMethod, InvoiceDetailCharge, and InvoiceDetailCost |
|
|
InvoiceDetail |
||
Selected = Include OrderDetail and its parents, InvoiceDetail, InvoiceShipTo, and InvoiceHeader Unselected = Exclude OrderDetail and its child, OrderLineMessage |
|
|
|
OrderDetail |
|
Selected = Include OrderLineMessage and its parents, OrderDetail, InvoiceDetail, InvoiceShipTo, and InvoiceHeader Unselected = Exclude OrderLineMessage |
|
|
|
|
OrderLineMessage |
Selected = Include UPC and its parents, InvoiceDetail, InvoiceShipTo, and InvoiceHeader Unselected = Exclude UPC |
|
|
|
UPC |
|
Selected = Include InvoiceDetailPayMethod and its parents, InvoiceDetail, InvoiceShipTo, and InvoiceHeader Unselected = Exclude InvoiceDetailPayMethod |
|
|
|
InvoiceDetailPayMethod |
|
Selected = Include InvoiceDetailCharge and its parents, InvoiceDetail, InvoiceShipTo, and InvoiceHeader Unselected = Exclude InvoiceDetailCharge |
|
|
|
InvoiceDetailCharge |
|
Selected = Include InvoiceDetailCost and its parents, InvoiceDetail, InvoiceShipTo, and InvoiceHeader Unselected = Exclude InvoiceDetailCost |
|
|
|
InvoiceDetailCost |
|
Selected = Include InvoiceBillingAddress and its parents, InvoiceShipTo and InvoiceHeader Unselected = Exclude InvoiceBillingAddress |
|
|
InvoiceBillingAddress |
||
Selected = Include InvoiceShippingAddress and its parents, InvoiceShipTo and InvoiceHeader Unselected = Exclude InvoiceShippingAddress |
|
|
InvoiceShippingAddress |
Before you can generate invoice download messages, you must perform the necessary Order Management System setup and processing.
Information requiring setup includes:
System Control Value |
Description |
Select this field to create invoice triggers in the IL Outbound Trigger table for certain actions in Order Management System. |
|
Enter the number of days to retain records in the IL Outbound Trigger table before purging them. Run the PURGIJT periodic function (program name ILR0026) to delete any records if: Last processed date is less than the current system date by the number of purge days and Status is X. You can also use the Purge option at the Work with Outbound Interface Transactions Screen to purge records. Example: Today is 2/07 and you have set this value to 1. Any record whose Last processed date is 2/06 or earlier is purged. |
Menu Option |
Description |
Allows you to create an IL outbound trigger record for each invoice in your company. Run this process to initially send invoices to the remote system. |
|
Allows you to review, delete, or resend IL outbound trigger records. |
|
When active, the Invoice Outbound job creates an Invoice Download XML Message (CWInvoiceOut) for each unprocessed invoice trigger in the IL Outbound Trigger table. You can also define: • trigger rules; see Invoice Outbound Trigger Rules. • XML inclusion rules; see Invoice Outbound XML Inclusion. • the queues where the invoice download message is sent; see Work with Integration Layer Process Queues Screen. |
Periodic Function |
Description |
Purge IJCT Download (program name ILR0026) |
Run this periodic function to purge processed IL outbound triggers, based on the setting of the Outbound Interface Trigger File Purge Days (I14) system control value: Last processed date is less than the current system date by the number of purge days and Status is X |
Generic Vendor Download API | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Invoice Download XML Message (CWInvoiceOut) |
ST01_05 OMSCS 18.1 April 2019 OTN