Let' s analyze a specific requirement: create a coupon promotion and assign it without using CMC and web/dialog activity but just querying the DB.
This requirement could sounds a bit odd alone but if you think it in terms of promotions integration taking the data from an external 3rd party system it can start to make a bit of sense.
The CMC authoring promotion tables and the Promotion XML
To accomplish our task, first of all, we need to understand exactly the tables involved during the creation of a coupon promotion. Starting from Info Center documentation we can find the following diagram reviews the main promotions data and their interactions within the promotion use:
Basically, there are two main parts: the management center tables and the runtime tables.
The authoring promotions tables (PX_PROMOAUTH, PX_DESCRIPTION, ...) is a set of tables contains data useful to handle the created promotions in the management center console; in this way the business users can view, edit and delete the promotions as they prefer in a simple and fast way with the Promotion Tool.
However, the runtime engine of the store, uses just the promotion XML to evaluate if a promotion is applicable or not for an order. As you can already imagine, the promotion XML- contained in the field PX_PROMOTION.XMLPARAM- is the XML description of the promotion created in Management Center. So, the same information is stored in the MCM promotions tables and in PX_PROMOTION like an XML document.