Concept - IOM Aggregated Invoices

1 Introduction

Using the IOM it is possible to configure a customer to not generate an invoice for each order or dispatch, but to generate one invoice for all orders/ dispatches within a certain time frame (so-called aggregated invoices) for each customer.

This concept describes the basic ideas and the implementation of the feature aggregated invoices. The target audience are developers and consultants.

1.1 Glossary

TermDescription
B2BBusiness-to-Business
EJBEnterprise Java Beans
IOMThe abbreviation for Intershop Order Management
OMSThe abbreviation for Order Management System, the technical name of the IOM
OMTThe abbreviation for Order Management Tool, the graphical management tool of the IOM
ScheduleDODatabase table in IOM that contains the configurations for different custom jobs

2 Aggregated Invoices

In general IOM can be configured to generate an invoice at certain points in the order flow through the system. E.g., an invoice can be generated when the order arrives at IOM or per dispatch that is being made.

For other business scenarios, e.g., B2B, it may be required to generate invoices for all orders or dispatches within a certain time frame, so-called aggregated invoices.

2.1 Customer Settings

Customer settings can be configured to to provide aggregated invoices. Additionally an aggregation interval describing how often the customer gets the aggregated invoice, e.g., (daily, weekly or monthly). The configuration can be done in the OMT.

Once this setting is enabled the customer will receive only aggregated invoices for for all orders with the payment method on account. Any other payment method still will generate a single invoice per order/ dispatch even if aggregated invoices are configured for the customer.

Note

Aggregated Invoice only when order payment is on account

This is hard-coded in default InvoicingDecisionBean of IOM. A custom InvoicingDecisionBean can be implemented and configured to override this behavior.

Note

Aggregated Invoice requires enabled Jobs

The aggregation jobs of IOM are disabled by default. They have to be activated.

This means that if the setting is enabled for one of the shop's customers, the jobs to aggregate invoices also need to be activated since otherwise no invoices will be created for the customer at all.

2.2 Jobs

With IOM 2.2 a set of preconfigured jobs will be delivered, which are responsible to create aggregated invoices for dispatches where no invoice exists yet.

Technically one EJB is used for all job configurations (ScheduleDO), and the different configIds of the ScheduleDO determine what the job does.

The individual jobs do not filter the dispatches to be aggregated by comparing the time frame, but work on all dispatches for each customer that are not yet invoiced. Thus once the jobs are enabled, they aggregate all past dispatches regardless how old they are.

keyconfigIdcommentruns at
aggregate_invoices4dispatches_daily1Per customer with the daily setting, aggregates all dispatch positions that are not invoiced yet into one invoice.daily at 23:30
aggregate_invoices4dispatches_weekly2Per customer with the weekly setting, aggregates all dispatch positions that are not invoiced yet into one invoice.weekly at Friday 23:30
aggregate_invoices4dispatches_monthly3Per customer with the monthly setting, aggregates all dispatch positions that are not invoiced yet into one invoice.last day of each month at 23:30
aggregate_invoices4dispatches_weekly_cleanup4

Per customer with the weekly setting, aggregates all dispatch positions that are not invoiced yet into one invoice. This means that at the end of the month all dispatch positions are invoiced, regardless of the weekday.

last day of each month at 23:45
aggregate_invoices4dispatches_disabled_cleanup5

For all customers that have aggregate invoices disabled, creates one invoice per dispatch that has no invoice yet. This handles the case that the aggregate invoices switch was disabled for a customer, but he is missing the last aggregated invoice.

daily at 23:50

Note

Aggregation jobs are not active by default

Please note that the jobs for aggregating invoices are not active per default and need to be activated in the database.

Note

Do not use the current jobs for invoice aggregation on orders

One might think that the job to aggregate dispatches can also be used when the shop is configured to generate invoices per orders, but the problem will appear that the cleanup job (configId 5) will generate invoices for all dispatches for all customers that have aggregate invoices switched off (regardless of whether the order itself was already invoiced). So at least the cleanup job cannot be used in this scenario.


2.3 Further Information

2.3.1 Limitations

Note

The IOM currently does not include jobs for aggregating orders

If you have configured the business processes to generate invoices for non-aggregated orders, you need to write another job (bean) and configure this new job with several ScheduleDOs.

2.3.2 Expandability

In case you have configured the business processes to generate invoices for orders, you need to write another job (bean) and configure this new job with several ScheduleDOs.

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets