functional guide for the promotion calculation engine - sap · customer functional guide for the...

160
Promotion Calculation Engine Document Version: 1.0 2017-12-01 CUSTOMER Functional Guide for the Promotion Calculation Engine SAP Customer Activity Repository 3.0 FP2

Upload: vutruc

Post on 07-Apr-2018

252 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Promotion Calculation Engine Document Version: 1.0 – 2017-12-01

CUSTOMER

Functional Guide for the Promotion Calculation EngineSAP Customer Activity Repository 3.0 FP2

Page 2: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine2 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Typographic Conventions

Typographic Conventions

Type Style Description

Example Words or characters quoted from the screen. These include field names, screen titles, pushbuttonslabels, menu names, menu paths, and menu options.

Textual cross-references to other documents.

Example Emphasized words or expressions.

EXAMPLE Technical names of system objects. These include report names, program names, transaction codes,table names, and key concepts of a programming language when they are surrounded by body text,for example, SELECT and INCLUDE.

Example Output on the screen. This includes file and directory names and their paths, messages, names ofvariables and parameters, source text, and names of installation, upgrade and database tools.

Example Exact user entry. These are words or characters that you enter in the system exactly as they appear inthe documentation.

<Example> Variable user entry. Angle brackets indicate that you replace these words and characters withappropriate entries to make entries in the system.

EXAMPLE Keys on the keyboard, for example, F2 or ENTER .

Page 3: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERDocument History © 2016 SAP SE or an SAP affiliate company. All rights reserved. 3

Document History

Version Date Change

1.0 2017-12-01 Initial version

Page 4: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine4 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Content

1 Introduction ................................................................................................................... 7

2 References ..................................................................................................................... 8

3 Definitions ..................................................................................................................... 9

4 Business Process .......................................................................................................... 114.1 Data Flow ..................................................................................................................... 12

4.1.1 Promotion Master Data Access ....................................................................... 124.1.2 PCE-Request ................................................................................................... 134.1.3 PCE-Response................................................................................................. 14

4.2 Processed Steps ........................................................................................................... 154.2.1 Request Processing ........................................................................................ 164.2.2 Eligibility Loading............................................................................................ 174.2.3 Promotion Calculation .................................................................................... 184.2.4 Transaction Update ........................................................................................ 18

5 Request Processing – Impact on the Promotion Calculation ......................................... 205.1 Select a Calculation Mode ............................................................................................ 20

5.1.1 Set the line item mode ................................................................................... 205.1.2 Set the Basket Mode ...................................................................................... 21

5.2 Calculate the Benefit with Normalized Quantities ........................................................ 21

6 Eligibility Loading – Triggers ......................................................................................... 236.1 Use an Item as a Trigger ............................................................................................... 246.2 Use a Merchandise Category as a Trigger ..................................................................... 256.3 Use a Simple Product Group as a Trigger ...................................................................... 276.4 Use a Product Group as a Trigger ................................................................................. 306.5 Use Thresholds, Intervals, and Limits ............................................................................ 31

6.5.1 Use Thresholds and Limits for the Quantity .................................................... 346.5.2 Use Thresholds and Limits for the Amount ..................................................... 356.5.3 Use Thresholds, Intervals, and Limits for the Quantity .................................... 366.5.4 Use Thresholds, Intervals, and Limits for the Amount ..................................... 386.5.5 Use Threshold Types for Single Items ............................................................. 41

6.6 Use the Total of a Shopping Basket as a Trigger ............................................................ 426.7 Use a Customer Group as a Trigger .............................................................................. 436.8 Use a Coupon as a Trigger ............................................................................................ 43

6.8.1 Consume the Coupon Dependent on Other Price Derivation Rule Eligibilities . 456.8.2 Consume the Coupon ..................................................................................... 456.8.3 Do not Consume the Coupon.......................................................................... 45

Page 5: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 5

6.9 Combine Triggers ......................................................................................................... 466.9.1 Combine Triggers with a Logical AND.............................................................. 476.9.2 Combine Triggers with a Logical OR ................................................................ 48

7 Promotion Calculation – General Behavior ................................................................... 497.1 Handle Line Item- or Transaction-Related Promotion Price Derivation Rules ................ 497.2 Select a Promotion Price Derivation Rule in Case of a Collision ..................................... 51

7.2.1 Select a Promotion Price Derivation Rule in Case of More Applicable MonetaryDiscounts 527.2.2 Select a Promotion Price Derivation Rule in Case of More Applicable VirtualDiscounts 527.2.3 Select a Promotion Price Derivation Rule in Case of More Applicable LoyaltyPoints 537.2.4 Select a Promotion Price Derivation Rule in Case of More Applicable Benefits ofDifferent Type .......................................................................................................... 53

7.3 Validate a Promotion ................................................................................................... 547.3.1 Confirm a Promotion ...................................................................................... 557.3.2 Invalidate a Promotion ................................................................................... 56

7.4 Set the Calculation Base ............................................................................................... 577.4.1 Use the Regular Sales Price ............................................................................. 617.4.2 Use the Discount Sales Price after the Lastly Executed Price Derivation Rule .. 647.4.3 Use the Discount Sales Price after a Chosen Previously Executed PriceDerivation Rule ........................................................................................................ 667.4.4 Skip Particular Line Item-Related Promotion Price Derivation Rules ................ 69

7.5 Choose Items ............................................................................................................... 717.5.1 Choose Item Methods .................................................................................... 747.5.2 Fall Back to the Default Method ..................................................................... 76

7.6 Apply a Benefit to Fully-Priced Items Only .................................................................... 77

8 Promotion Calculation – Calculation Rules ................................................................... 808.1 Apply a Simple Discount ............................................................................................... 80

8.1.1 Apply a Discount as Amount ........................................................................... 818.1.2 Apply a Discount in Percent ............................................................................ 828.1.3 Set a New Price .............................................................................................. 82

8.2 Package an Offer .......................................................................................................... 838.3 Apply a Zero Discount .................................................................................................. 838.4 Grant Loyalty Points ..................................................................................................... 85

8.4.1 Grant an Amount of Loyalty Points ................................................................. 868.4.2 Grant Loyalty Points as a Percentage .............................................................. 86

8.5 Manually Apply a Benefit ............................................................................................. 878.5.1 Manually Trigger a Predefined Price Derivation Rule ...................................... 878.5.2 Manually Trigger and Set a Price Derivation Rule ............................................ 888.5.3 Apply a Manual Benefit Several Times ............................................................ 89

8.6 Mix and Match ............................................................................................................. 898.6.1 Combine Matching Items with a Logical OR .................................................... 90

Page 6: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine6 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

8.6.2 Combine Matching Items with a Logical AND .................................................. 918.6.3 Combine a Certain Threshold Quantity of Matching Items with a Logical OR .. 91

8.7 Trigger an Action of the Client ...................................................................................... 91

9 Transaction Update – Finalize Promotion Calculation ................................................... 939.1 Round the Benefit ........................................................................................................ 93

9.1.1 Round Benefits ............................................................................................... 949.1.2 Round Benefit Shares ..................................................................................... 959.1.3 Round the Monetary Equivalent of Loyalty Points .......................................... 97

9.2 Select the Method to Discount ..................................................................................... 979.2.1 Use the Discount to Reduce the Price ........................................................... 1009.2.2 Create a Gift Certificate ................................................................................ 1009.2.3 Reduce the Total Amount and counterbalance it with a Gift Certificate ........ 1019.2.4 Create a Coupon........................................................................................... 101

9.3 Prorate the Benefit .................................................................................................... 1029.3.1 Calculate Monetary Discount Shares ............................................................ 1029.3.2 Calculate Virtual Discount Shares ................................................................. 1039.3.3 Calculate Loyalty Point Shares ...................................................................... 104

10 Configuration ............................................................................................................. 10510.1 System Parameters of the PCE ................................................................................... 10510.2 Promotion Master Data Codes ................................................................................... 11310.3 Transaction Data Codes .............................................................................................. 11910.4 Objects and Attributes from the Master Data ............................................................. 12110.5 Objects and Attributes from the Transaction .............................................................. 137

Page 7: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 7

1 Introduction

This guide provides an overview of the functionality of the promotion calculation engine (PCE). The PCE canbe used to calculate effective sales prices, discounts, and loyalty points for a set of products or a shoppingbasket.

With omnichannel promotion pricing (OPP), SAP provides a promotion pricing service (PPS) for thecalculation of effective sales prices which can be used in different sales channels. The PCE is the calculationcore of this service. With GK/Retail OmniPOS, GK provides a point of sale (POS) solution that also bases onthe PCE for the calculation of sales prices.

This documentation describes the entire PCE functionality for both, the PCE functionality in an OPP scenarioand the functionality in a GK/Retail OmniPOS scenario. It contains examples for PCE use cases and theirprerequisites.

NotethatsomeusecasesarecurrentlynotsupportedwithOPP.FormoreinformationaboutoffertypessupportedwithOPP,seetheapplicationhelponSAPHelpPortalathttps://help.sap.com/viewer/p/CARABunderApplicationHelp>SAPCustomerActivityRepository><Version>>OmnichannelPromotionPricing>OfferTypeswithOmnichannelPromotionPricing.

Page 8: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine8 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

2 References

There is further documentation regarding the OPP and the PCE which is also available on SAP Help Portal:

· Client API for Omnichannel Promotion Pricing: defines the client interface of the PPS andaccordingly of the PCE, too.

· Development and Extension Guide for Omnichannel Promotion Pricing: explains the necessarysteps for extending the PPS.

· SDK Promotion Calculation Engine: defines the Software Development Kit (SDK) of the PCE.

Page 9: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 9

3 Definitions

The table below compares the terminology of the PCE and the OPP/PPS. The terminology is equivalent if thecolumn "OPP Terminology" is empty in a row. The PCE terminology is used within this documentation.

PCE Terminology OPP/PPSTerminology Description

Discount A discount is a reduction in the sales price. This reduction can take the form of a directprice reduction or vouchers.

Discount SalesPrice

Discount Price Price of a line item before the computation of the PCE is finished and after a precedingpromotion price derivation rule was applied to the line item.

Discount TotalAmount

The summed up discount sales prices in a transaction after a preceding promotion pricederivation rule was applied.

Effective SalesPrice Price of a line item after the application of all applicable promotion price derivation rules.

Effective SalesUnit Price

Effective SalesPrice Price of an item after the application of all applicable promotion price derivation rules.

Effective TotalAmount

The summed up effective sales prices in a transaction after all promotion price derivationrules were applied.

Frequent ShopperPoints

Like loyalty points. A bonus that a customer can earn when being subscribed to a loyaltyprogram. The loyalty points are added to the loyalty program account balance for salesand are subtracted from it for returns.

Item ArticleRepresentation of a product, an article, a good, or a service that is bought or returned bya customer. An item is the smallest unit or customer pack that can be orderedindependently and that cannot be split further into any smaller units.

Line Item Item An element of a transaction that contains information on goods or services delivered.

Loyalty PointsA bonus that a customer can earn when being subscribed to a loyalty program. The loyaltypoints are added to the loyalty program account balance for sales and are subtractedfrom it for returns.

Loyalty Program A membership-based customer incentive initiative.

PCE-Request Representation of a purchase before the PCE has processed anything.

PCE-Response Representation of a purchase after the PCE has processed it.

Price DerivationRule A rule that provides the benefit that a customer is granted if the eligibility is met.

Price DerivationRule Eligibility

Describes which preconditions the promotion price derivation rule has to fulfill in order toapply it.

Page 10: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine10 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

PCE Terminology OPP/PPSTerminology Description

PromotionOPP Promotion

A collection of promotion price derivation rules. A promotion represents an offer in aformat that complies with the format of the Association for Retail Technology Standards(ARTS).

Promotion MasterData

Pricing PromotionRepository Repository that contains the promotions.

Promotion MasterData API Data Access API The interface that provides the promotions to the PCE.

Promotion PriceDerivation Rule

A pair of one price derivation rule eligibility and one price derivation rule.

Regular SalesPrice The regular price for the line item before any discounts have been applied.

Regular Sales UnitPrice Regular Price The regular or lookup per-unit price for the item before any discounts have been applied.

Regular TotalAmount

The summed up discount sales prices in a transaction before transaction-relatedpromotion price derivation rules were applied.

Shopping Basket Shopping CartA physical or virtual container for the items a customer is going to buy. The customer canadd items to or remove items from it at any stage before he or she proceeds to check outand pays for the items.

Transaction PCE internal representation of a shopping basket and additional related informationabout the purchase.

Page 11: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 11

4 Business Process

This chapter provides you with an overview on how the PCE receives, processes, and hands backinformation.

The PCE uses a request/response mechanism for communication with the requesting clients:

Page 12: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine12 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

The PCE receives a request (hereafter referred to as PCE-request) from the client. This request can be issuedby a PPS client via the Client API or directly by a GK/Retail OmniPOS client (in the previous figure denoted by"Client"). The PCE-request contains the shopping basket with all required information about the purchase.

The PCE processes the request and applies monetary discounts and loyalty points to the given shoppingbasket. The calculation is based on the content of the shopping basket (items, regular sales unit prices,scanned coupons, assigned customer groups, and so on), the system configuration parameters, and thepromotion master data.

The promotion master data as well as the promotion master data API (depicted in the previous figure)depend on the scenario – i.e. OPP or GK/Retail OmniPOS scenario. The differences are described in thedocument SDK Promotion Calculation Engine in detail.

Finally, the PCE issues a response (hereafter referred to as PCE-response). The PCE-response contains thepurchase information with the added benefit and the effective sales prices.

The following chapters discuss the process in greater detail.

You find information on the following topics:

· Data Flow

· Processed Steps

4.1 Data Flow

The PCE needs information about the particular purchase and the promotion to calculate the benefit andapply it to the correct items. Within this section, an overview is given for accessing the promotion masterdata and the information regarding the purchase. Thus, it is answered where the necessary informationcomes from and how it is represented. Additionally, documents are noted for further reading on specifictopics.

4.1.1 Promotion Master Data Access

For the calculation of effective sales prices the PCE needs the information about regular sales unit prices andpromotion master data. The necessary information about the promotions needed by the PCE is saved in thepromotion master data (OPP scenario: pricing promotion repository).

In case of OPP the promotion master data can be located in CAR in case of central deployment or locally incase of local deployment; to read the promotion master data a promotion master data API is used (OPPscenario: data access API).

Page 13: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 13

The locally deployed sales channels are regularly updated via the outbound layer. Thereby the data isupdated with the help of the Idoc-format. The PCE accesses the promotion master data directly from thelocally stored promotion master data.

The centrally deployed sales channels do not have to regularly update the promotion master data sincethese can directly access the SAP Central Price and Promotion Repository.

The SDK Promotion Calculation Engine documentation provides further information about accessing thepromotion master data in the different scenarios – i.e. OPP or GK/Retail OmniPOS scenario.

4.1.2 PCE-Request

The PCE-request is received by the PCE and contains all necessary information about the purchase that isneeded. It includes - among others - the date and time of the purchase, information on which items are inthe shopping basket, and whether the customer has a coupon.

ExemplaryPCE-Request

ThefollowingfigureillustratesanexemplaryPCE-request.

ThisPCE-requestwascreatedon16February2016(see(1)inprecedingfigure)andincludesonesale(see(2)inprecedingfigure),aso-calledmanualtrigger(see(3)inprecedingfigure),andtwocoupons(see(4)inprecedingfigure)intheshoppingbasket.Amanualtriggerisanactiontypicallymadebythecashier.Forfurtherinformation,seeManuallyApplyaBenefit.Thecontentofashoppingbasketiscalledlineitems.

Page 14: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine14 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

4.1.3 PCE-Response

The PCE-response is generated by the PCE. The PCE-response contains all previously received informationneeded for the PPS-based price calculation. Additionally, it contains the modification of the regular sales unitprices. Information about the promotion price derivation rules that caused the modifications are part of thePCE-response, too. This results in the traceability of the changes made by the PCE. The added information isseparated according to the two different main types of benefits, i.e. discounts and loyalty points.

ExemplaryPCE-Response

ThefollowingfigureillustratesanexemplaryPCE-responseafterthreepromotionpricederivationruleswereappliedtotheexemplaryPCE-requestmentionedpreviously.

ThestructureofthePCE-responseissimilartothePCE-requestexceptthatthreeadditionallineitems(see(1)inprecedingfigure)areaddedtoit.ThisisduetotheappliedpromotionpricederivationrulesthatgrantedadiscountforthewholePCE-request.Inaddition,thepricemodificationofthesale(see(2)inprecedingandsucceedingfigures)islistedaccordingtotheappliedpromotionpricederivationrules.Thisisshowninthefollowingfigurewherebythepricemodificationislistedintheretailpricemodifier(see(3)insucceedingfigure).

Page 15: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 15

Theretailpricemodifier(see(3)inprecedingfigure)includes-amongstothers-theso-calledsharesofthediscount(thediscountamountthatresultsfromatransaction-relatedpromotionpricederivationrule),thediscountinpercent,thepreviousprice,thenewprice,andwhichpromotionpricederivationruleisappliedtothisparticularlineitem.

4.2 Processed Steps

The PCE processes the PCE-request and the promotion master data always in the same way. This sectionincludes a description of the execution steps. You learn how the received information is used and whatmodifications are made. Additionally, you find hints for further reading.

The following figure gives an overview of the processed steps:

Page 16: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine16 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

4.2.1 Request Processing

In the first processing step, the received PCE-request is prepared for the calculation of the discounts andloyalty points.

HOW IT WORKS

The PCE receives the request via the client API within the PPS. The PCE-request can be issued by a PPS clientor directly by the GK/Retail OmniPOS client (in the figure denoted by "Client"). It includes all required

Page 17: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 17

information about the purchase. A detailed description about the elements and the format of the PCE-request can be found in the document Client API for Omnichannel Promotion Pricing.

The PCE parses the PCE-request into an internal format, the transaction. The transaction represents thegradually modified PCE-request throughout the entire process.

Like the PCE-request, the transaction includes all necessary information about the purchase. One of the mostimportant elements of a transaction is the line item. A line item represents an item of a shopping basket.The line items are later on used for triggering promotion price derivation rules.

After parsing the PCE-request, the PCE checks which calculation mode is active for the currently processedtransaction. The calculation mode can be either the line item mode or the basket mode. When the line itemmode is used, the transaction is split into parts that only contain one line item. When the basket mode isused, the transaction is handled entirely. In both cases, the transaction is prepared for the normalizedcalculation of line items.

THERE IS MORE

A detailed description of the impact on the promotion calculation by the request processing can be found inchapter Request Processing – Impact on the Promotion Calculation.

4.2.2 Eligibility Loading

The output of this step is a set of active price derivation rule eligibilities – that is, preconditions which arefulfilled by the currently processed transaction.

HOW IT WORKS

After the transaction is prepared, the price derivation rule eligibility is loaded via the promotion masterdata API. The price derivation rule eligibility describes the preconditions a transaction has to fulfill to applythe corresponding price derivation rule. It is one part of a promotion price derivation rule. The other part isthe price derivation rule. You find a more detailed description of promotion price derivation rules in thenext step.

There are several types of price derivation rule eligibilities which are activated by the appropriate triggers ofthe transaction. If all price derivation rule eligibilities are loaded, it is checked which of them are fulfilled.The fulfilled price derivation rule eligibilities are activated. For active price derivation rule eligibilities, it is(recursively) checked whether a parent price derivation rule eligibility exists and, if so, whether this parentprice derivation rule eligibility can be activated as well.

THERE IS MORE

For further information about the different price derivation rule eligibility types, have a look at chapterEligibility Loading – Triggers .

Page 18: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine18 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

4.2.3 Promotion Calculation

In this step, the calculation of the discounts and loyalty points is performed. The output is the computeddiscounts and loyalty points for the currently processed transaction.

HOW IT WORKS

Based on the activated price derivation rule eligibilities and the content of the currently processedtransaction, the benefits can be computed.

For this purpose, the promotion price derivation rules for the activated price derivation rule eligibilities areloaded via the promotion master data API. Afterwards, the PCE checks the validity of the promotion pricederivation rules. The promotion price derivation rules are ordered according to a sequence number.

The PCE is capable to handle collisions, that is, cases when the sequence and resolution of two or morepromotion price derivation rules is equivalent. The execution of the price derivation rules is handledseparately on line item level and transaction level. The transaction-related promotion price derivation rulesare calculated subsequently. They are always based on the line item-related promotion price derivationrules. There are various price derivation rules.

In summary, the following steps are executed within the step promotion calculation:

1. Load promotion price derivation rules for activated price derivation rule eligibilities.2. Validate the promotion.

3. Execute the price derivation rules of the validated promotionsa. for line item-related promotion price derivation rules,

b. for transaction-related promotion price derivation rules.

THERE IS MORE

For further information about the preliminary functions of the promotion calculation, refer to chapterPromotion Calculation – General Behavior. The different kinds of price derivation rules are described inchapter Promotion Calculation – Calculation Rules.

4.2.4 Transaction Update

In this step, the computed discounts, loyalty points, and information for the client are added to thecorresponding transaction elements. In addition, the PCE-response is created and transferred to the clientAPI.

HOW IT WORKS

Page 19: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 19

The computed discounts and loyalty points of the previously executed steps are needed to update thecurrently processed transaction – that is, the promotion calculation. In addition, the update also containsinformation of the applied promotion price derivation rules or the promotion master data, respectively.

If a benefit exists and several line items are affected, it is prorated to all related items in thetransaction. Modifiers are prepared and added to the affected line items. Finally, the transaction is parsedinto the PCE-response.

The PCE-response contains all information about the modification. For example, it contains the identifiers forthe applied promotion price derivation rules and the calculated benefit. There are four modifiers: the retailprice modifier or the price modification line item that include a monetary discount, and the frequentshopper points modifier or the loyalty reward line item that include loyalty points.

The transaction can also include the printout of a coupon, a gift certificate, and information for an actionthat the client performs afterwards.

A detailed description about the elements and the format of the PCE-response can be found in thedocument Client API for Omnichannel Promotion Pricing.

THERE IS MORE

For further information about behaviors that have an impact on the update of a transaction, refer to chapterTransaction Update – Finalize Promotion Calculation.

Page 20: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine20 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

5 Request Processing – Impact on the PromotionCalculation

The first execution step is the request processing. The received PCE-request is prepared for the calculation ofthe discounts, loyalty points, and effective sales prices. For this purpose, the PCE-request is mapped to aninternal format, the transaction. After parsing the PCE-request, the PCE checks which calculation mode isactive for the currently processed transaction. The transaction is also prepared for the normalizedcalculation of line items during the execution.

In this chapter, the following topics are discussed:

· Select a Calculation Mode

· Calculate the Benefit with Normalized Quantities

5.1 Select a Calculation Mode

The PCE supports two different calculation modes: the basket and the line item mode. Thereby, the PCEeither considers the whole shopping basket or calculates the benefit independently for each line item.

HOW IT WORKS

When the PCE is called, the transaction includes the parameter calculationMode. This parameter can havethe following values:

· BASKET: The PCE calculates the benefits for the entire shopping basket.

· LINE_ITEM: The PCE calculates the benefits per line item independently.

According to this parameter, the PCE evaluates the promotion price derivation rules and applies theresulting benefits. Thereby, the default value is BASKET.

5.1.1 Set the line item mode

The value of the parameter calculationMode is LINE_ITEM. The PCE computes the benefits for each line itemin the transaction independently from each other. This means that promotion price derivation rules thataffect multiple line items, for example, by containing eligibilities with several items, cannot be triggered. Thetransaction-related promotion price derivation rules are also not executed.

Page 21: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 21

Some promotion price derivation rules are also not applied since these are not intended to work in this lineitem mode. Therefore a calculation mode flag is used. This flag is checked during the validation of the loadedpromotions. The filtering of the promotion price derivation rules is thereby done in the promotion masterdata API.

If the transaction does contain coupons, the PCE returns an error. The cause is that a coupon might beapplicable only once but fits for multiple line items in the transaction. Thus, it would be considered for eachof these line items but when using the basket mode, it might be consumed only once – depending on howthe coupon eligibility is maintained. In addition, the transaction must not contain an external benefit.

5.1.2 Set the Basket Mode

The value of the parameter calculationMode is BASKET. The PCE computes the benefits for the entireshopping basket including promotion price derivation rules that require/affect multiple line items as well astransaction-related promotion price derivation rules. In addition, no specific restrictions apply.

THERE IS MORE

Additional information about the parameter can be also found in chapter Configuration.

5.2 Calculate the Benefit with Normalized Quantities

The PCE calculates all benefits with normalized quantities. This results in the consistency of computeddiscounts and loyalty points. Thus, the calculation is independent of the registering of items – separatelyversus summarized.

HOW IT WORKS

Each line item with a quantity n is split into n separate line items with quantity one. The line items with thequantity one are herein called normalized line items. After the splitting of line items, the PCE calculates thebenefits. When the calculation is finished, the results are then aggregated to the real line item structureinside the transaction.

Example:CalculatetheBenefitwithNormalizedQuantities

Letusassumethatthereexistsanitemchairthathasaregularsalesunitpriceof89.95€.Furthermore,thereexiststhefollowingpromotionpricederivationrule:Buyseveralchairswitharegularsalespricegreaterorequalto100.00€andgetadiscountof3%.Themaximumregularsalespriceisthereby500.00€forwhichadiscountof3%isapplied.

Page 22: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine22 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Additionallyassumethatacustomerbuyssixchairsinonepurchase.Thesearesummarizedtoonelineiteminthetransaction.Theregularsalespriceisthen539.70€.

ThePCEcalculatesthediscountof15.01€withnormalizedlineitems.Sincethemaximumregularsalespriceisexceeded,thePCEusesthe500.00€ascalculationbaseforthe3%discount.

Line Item Calculation Base 3% Discount of Calculation Base Regular Sales Price Effective Sales Price

Chair with quantity 6 500.00€ 15.01€ 539.70€ 524.69€

Thediscountwouldbe15.00€ifthePCEwouldnotusethenormalizedcalculationoflineitems,since3%of500.00€isexactly15.00€.Ifthesamelineitemisregisteredsixtimesseparately,therequestcontainssixchairswithquantity1.Thereby,thePCEusesthefractionofthesalespriceofalineitemascalculationbasethatiseligibleforthepromotion.Inthecurrentexamplethismeansthefollowing:

Line Item Calculation Base 3% Discount of Calculation Base Regular Sales Price Effective Sales Price

Chair with quantity 1 89.95€ 2.70€ 89.95€ 87.25€

Chair with quantity 1 89.95€ 2.70€ 89.95€ 87.25€

Chair with quantity 1 89.95€ 2.70€ 89.95€ 87.25€

Chair with quantity 1 89.95€ 2.70€ 89.95€ 87.25€

Chair with quantity 1 89.95€ 2.70€ 89.95€ 87.25€

Chair with quantity 1 50.25€ 1.51€ 89.95€ 88.44€

Sum Chair with quantity 6 500.00€ 15.01€ 539.70€ 524.69€

Thediscount1.51€ofthesixthchairisaresultoftheroundingandcausesthe0.01€differencetotheexactdiscountof3%of500.00€.

ThisexampleisrelatedtothethresholdtypeAMTandthesimplediscountwiththepricemodificationmethodDISCOUNT_PERCENT.RefertochapterUseThresholds,Intervals,andLimitsandApplyaSimpleDiscountformoreinformation.

THERE IS MORE

The documentation SDK Promotion Calculation Engine describes the normalized calculation in greater detail.In addition, the discount amounts are rounded on the normalized item level as well. This can lead todifferent values for rounding than it may be expected for a line item.

Page 23: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 23

6 Eligibility Loading – Triggers

The price derivation rule eligibility is very important for the selection of a benefit. One price derivation ruleeligibility contains the precondition a transaction has to fulfill so that the corresponding price derivation ruleis executed by the PCE. Thereby, the price derivation rule eligibility contains at least one so-called trigger. Ifthe trigger is part of the currently processed transaction, the price derivation rule eligibility is activated. Thiscomparison of the promotion master data – that is, the price derivation rule eligibility – with the currenttransaction is done within the step eligibility loading.

All price derivation rule eligibilities are maintained as trees in the promotion master data. This means thatone price derivation rule eligibility can be the parent of several child price derivation rule eligibilities. Thenodes of this tree contain the combination type of these price derivation rule eligibilities. The possibletriggers and combination types are explained in the subsequent sections. It depends on the combinationtype, whether a parent eligibility is activated or not after the child eligibility was activated. A simple pricederivation rule eligibility is maintained as a tree with one node in the promotion master data.

A special kind of promotion price derivation rule is the manual promotion price derivation rule. It includes amanual price derivation rule eligibility and a manual price derivation rule. For a better understanding, bothparts are described in chapter Manually Apply a Benefit that is not part of this chapter.

In this chapter, the following topics are discussed:

· Use an Item as a Trigger

· Use a Merchandise Category as a Trigger

· Use a Simple Product Group as a Trigger

· Use a Product Group as a Trigger

· Use Thresholds, Intervals, and Limits

· Use the Total of a Shopping Basket as a Trigger

· Use a Customer Group as a Trigger

· Use a Coupon as a Trigger

· Combine Triggers

Page 24: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine24 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

6.1 Use an Item as a Trigger

The price derivation rule eligibility (PromotionConditionEligibilitySO) can contain a combination of differenttriggers. One of these triggers is the item. If a particular item is part of the transaction, the PCE applies thepromotion price derivation rule stating the particular item in its price derivation rule eligibility. This pricederivation rule eligibility is herein called item eligibility (ItemPromotionConditionEligibilitySO).

HOW IT WORKS

An item in the transaction is – among others – described by two attributes: the unique item identifier(ItemPromotionConditionEligibilitySO.itemID) and the unit of measure(ItemPromotionConditionEligibilitySO.unitOfMeasureCode).

This information is compared with the data of the active item eligibilities loaded via the promotion masterdata API. It is always called with both the item identifier and the unit of measure specified in the transactionfor the given item when retrieving its price derivation rule eligibilities.

To apply a particular benefit to an item, the item eligibility has to be part of the promotion price derivationrule. The item identifier has to be stated in the item eligibility and the unit of measure can be stated inaddition.

Example:UseanItemasaTrigger

Letusassumethatthereisanitem"Arabicacoffee".Theitemcanbesoldaspackaged500gorasanindividuallyscaledportion.Inbothcases,theArabicacoffeehasthesameidentifier:"42".

However,theunitofmeasureisdifferent.Thepackaged500garesoldbythepiecewhichresultsintheunitofmeasurecode"PCE".Incontrast,theindividualscaledportionoftheArabicacoffeeissoldbythekilogramwhichresultsintheunitofmeasurecode"KG".

LetusassumethatacustomershallgetabenefitforbuyingArabicacoffee.Forthispurpose,apromotionpricederivationrulehastobepartofthemasterdatathatcontainsanitemeligibility:

1. Firstpossibility:Theitemeligibilityincludesonlytheitemidentifier"42".2. Secondpossibility:Theitemeligibilityincludestheitemidentifier"42"andtheunitof

measurecode"PCE".3. Thirdpossibility:Theitemeligibilityincludestheitemidentifier"42"andtheunitof

measurecode"KG".

Letusassumethatthereisapromotionpricederivationrulethatcontainsanitemeligibilityfortheitem"Arabicacoffee".Inaddition,weassumethatacustomerbuysa500gpackageofArabicacoffeeasagiftforafriendandaportionofArabicacoffeeforhimself.

Thus,thetransactioncontainstwolineitems:

· Thefirstline(the500gpackage)withitemidentifier"42"andunitofmeasurecode"PCE".

· Thesecondlineitem(theportion)withitemidentifier"42"andunitofmeasurecode"KG".

Page 25: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 25

Theresultwouldbeasfollowsaccordingtothedifferentpossibilitiestodefineanitemeligibilityfortheitem:

1. Firstpossibility:Theitemeligibilityincludesonlytheitemidentifier"42".o Bothitemstriggerthepromotionpricederivationrule.o Thecustomergetsabenefitforbothitems.

2. Secondpossibility:Theitemeligibilityincludestheitemidentifier"42"andtheunitofmeasurecode"PCE".o Onlythe500gpackageofArabicacoffeetriggersthepromotionpricederivationrule.o Thecustomergetsabenefitforthe500gpackageofArabicacoffeehebuysforhis

friend.3. Thirdpossibility:Theitemeligibilityincludestheitemidentifier"42"andtheunitof

measurecode"KG".o OnlytheportionofArabicacoffeetriggersthepromotionpricederivationrule.o ThecustomergetsabenefitfortheportionofArabicacoffeehebuysforhimself.

THERE IS MORE

The item as a trigger can be enhanced with values for a threshold, an interval, and/or a limit for the amountand/or the quantity of the corresponding item. See Use Thresholds, Intervals, and Limits for moreinformation.

Further information about the objects and attributes can be found in chapter Configuration.

6.2 Use a Merchandise Category as a Trigger

A possible trigger type is the merchandise category. A merchandise category is a collection of items thathave certain similar properties. If a particular item is part of a merchandise category and of the transaction,the PCE applies the promotion price derivation rule stating this particular merchandise category in its pricederivation rule eligibility. This price derivation rule eligibility is herein called merchandise category eligibility(MHGPromotionConditionEligibilitySO).

The merchandise categories can be linked with merchandise category hierarchy nodes in the context of OPP.This means that an item that belongs to a merchandise category belongs also to the linked merchandisecategory node. The PCE does not differentiate between merchandise categories and merchandise categoryhierarchy nodes since these are all handled in the same way.

HOW IT WORKS

A merchandise category is defined by two attributes in the transaction: the merchandise category identifier(SaleReturnLineItemMerchandiseHierarchyGroup.Key.MerchandiseHierarchyGroupID) and the merchandise

Page 26: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine26 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

category qualifier(SaleReturnLineItemMerchandiseHierarchyGroup.Key.MerchandiseHierarchyGroupIDQualifier).

The merchandise category identifier is unique in the context of the same merchandise category qualifier. Themerchandise category qualifier is used to differ between merchandise categories that belong to differenthierarchies but have the same identifier. This hierarchy includes merchandise category hierarchy nodes andmerchandise categories which do not have any children.

The relation between the items and their merchandise category is transmitted as a part of the transaction. Itis also compared with the data of the active price derivation rule eligibilities that are loaded via thepromotion master data API.

Example:UseaMerchandiseCategoryasaTrigger

Letusassumethatthereisamerchandisecategorywiththeidentifier"chair"andamerchandisecategorywiththeidentifier"furniture".Themerchandisecategory"chair"isasubcategoryofthemerchandisecategory"furniture".Thismeansthatanitem"officechair"thatbelongstothemerchandisecategory"chair"automaticallybelongstothemerchandisecategory"furniture",too.Onthecontrary,anitem"desk"thatbelongstothemerchandisecategory"furniture"doesnotbelongtothemerchandisecategory"chair".

Inaddition,theitem"officechair"belongstoamerchandisecategorywiththequalifier"SEAS"forseasonalaswell.Thus,itbelongstotwomerchandisecategoryhierarchies.

To apply a benefit that is triggered by a merchandise category, the merchandise category eligibility has to bepart of the promotion price derivation rule. The merchandise category identifier can be stated in the pricederivation rule eligibility as well as the merchandise category qualifier.

Example(cont.)

Letusassumethatacustomershallgetabenefitforbuyinganofficechairand/oradesk.Forthispurpose,apromotionpricederivationrulecontainingamerchandisecategoryeligibilityhastobepartofthepromotionmasterdata.

1. Firstpossibility:Themerchandisecategoryeligibilityincludesthemerchandisecategoryidentifier"furniture".

2. Secondpossibility:Themerchandisecategoryeligibilityincludesthemerchandisecategoryidentifier"chair".

3. Thirdpossibility:Themerchandisecategoryeligibilityincludesthemerchandisecategoryidentifier"furniture"andthemerchandisecategoryqualifier"SEAS".

Page 27: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 27

A merchandise category eligibility is fulfilled if the item belongs to the indicated merchandise category in thetransaction. All assignments of items to merchandise categories and merchandise category hierarchy nodesare part of the transaction data in the context of OPP.

Example(cont.)

Letusassumethatacustomerbuysakitchenchairandadeskforthefamily.Thus,thetransactioncontainstwolineitems:

1. Firstlineitem:kitchenchair,merchandisecategory"chair"2. Secondlineitem:desk,merchandisecategory"furniture",merchandisequalifier"SEAS"

IntheOPPcontext,thePPSiscalledandthusthePCE.Theresultwouldbeasfollowsaccordingtothedifferentpossibilitiestodefineamerchandisecategoryeligibility:

1. Firstpossibility:Themerchandisecategoryeligibilityincludesthemerchandisecategoryidentifier"furniture".o Bothitemstriggerthepromotionpricederivationrule.o Thecustomergetsabenefitforbothitems.

2. Secondpossibility:Themerchandisecategoryeligibilityincludesthemerchandisecategoryidentifier"chair".o Onlythekitchenchairtriggersthepromotionpricederivationrule.o Thecustomergetsabenefitforthekitchenchair.

3. Thirdpossibility:Themerchandisecategoryeligibilityincludesthemerchandisecategoryidentifier"furniture"andthemerchandisecategoryqualifier"SEAS".o Onlythedesktriggersthepromotionpricederivationrule.o Thecustomergetsabenefitforthedesk.

THERE IS MORE

The merchandise category as a trigger can be enhanced with values for a threshold, an interval, or a limit forthe amount or the quantity. See Use Thresholds, Intervals, and Limits for more details.

For further information about the attributes, see chapter Configuration.

6.3 Use a Simple Product Group as a Trigger

A simple product group is a collection of items and merchandise categories with certain similar properties. Ifan item or merchandise category is part of a simple product group and of the transaction, the PCE appliesthe corresponding promotion price derivation rule.

Page 28: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine28 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

The items and the merchandise categories are stated in several price derivation rule eligibilities. These pricederivation rule eligibilities are herein called simple product group eligibility(CombinationPromotionConditionEligibilitySO.combinationCode = ITEM_OR).

HOW IT WORKS

To handle simple product groups as a trigger, several price derivation rule eligibilities are hierarchicallyorganized like shown in the following figure:

All child item and/or merchandise category eligibilities contain a link to their parent price derivation ruleeligibility that includes the elements of the simple product group. All other kinds of price derivation ruleeligibilities cannot be a part of the simple product group eligibility. Thus, the parent eligibility is a special kindof combination eligibility. The combination code(CombinationPromotionConditionEligibilitySO.combinationCode) ITEM_OR indicates that this price derivationrule eligibility is forming a simple product group eligibility. Additionally, all item and merchandise categoryeligibilities have a special threshold type (ThresholdType) to indicate that they belong to a simple productgroup eligibility. The threshold type is COMB. This means that the parent eligibility includes a threshold typefor the simple product group eligibility.

The transaction includes the items with their identifier, unit of measure, and the relation to theirmerchandise categories. If these items belong to a simple product group that shall get a benefit, the PCEactivates the simple product group eligibility. This means that each item triggers an item eligibility and isthus activated. If this item eligibility has the threshold type COMB, it is a child eligibility that belongs to asimple product group eligibility. The PCE automatically checks whether the corresponding parent eligibility isfulfilled as well.

Page 29: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 29

The same happens for an item that belongs to a merchandise category triggering a merchandise categoryeligibility with the threshold type COMB. The parent eligibility is activated if its thresholds, intervals, andlimits are fulfilled by the transaction. This means that the PCE treats the simple product group like an item ora merchandise category – despite the fact that a simple product group eligibility is made of several itemand/or merchandise category eligibilities. The threshold, the interval, and the limit quantities or amounts aremaintained at the parent price derivation rule eligibility. The quantities or amounts of the items ormerchandise categories are summarized. These sums are checked against the values in the parent pricederivation rule eligibility.

Example:UseaSimpleProductGroupasaTrigger

Letusassumethatasimpleproductgroup"officeequipment"includesallitemsthatbelongtothemerchandisecategory"stationary"andtheitem"officechair."Inaddition,thereisapromotionpricederivationrulewiththefollowingsimpleproductgroupeligibility:Acustomerwhobuysthreeitemsofthesimpleproductgroup"officeequipment"getsabenefit.

Ifacustomerbuysthreeofficechairs,hetriggersthepromotionpricederivationrulewiththepreviouslymentionedsimpleproductgroupeligibility.Ifacustomerbuystwoitemsofthemerchandisecategory"stationary"andone"officechair",theitemsofthetransactiontriggerthepricederivationruleeligibilityaswell.ThelattercaseisthemaindifferencecomparedtothecombinationeligibilitywiththecombinationcodeOR.

THERE IS MORE

Since the simple product group eligibility is a special kind of combination eligibility, it is subject to the sameterms like the other kinds of combination eligibilities (see chapter Combine Triggers for details).

This also results in the restriction that simple product groups can only get simple discounts and includearticles or merchandise categories.

The parent eligibility of a simple product group eligibility can contain a threshold type and is thus capable toconsume quantities or amounts. The impacts of the different threshold types are described in chapter UseThresholds, Intervals, and Limits.

A simple product group may contain items and merchandise categories. For information on the mainattributes of items or merchandise categories, see chapters Use an Item as a Trigger or Use a MerchandiseCategory as a Trigger, respectively.

Page 30: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine30 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

6.4 Use a Product Group as a Trigger

The product group is a possible trigger type for a price derivation rule eligibility. If an item of a product groupis part of a transaction, the PCE executes the corresponding price derivation rule. The price derivation ruleeligibility is herein called product group eligibility (MerchandiseSetPromotionConditionEligibilitySO).

HOW IT WORKS

The product group is defined by the attribute product group identifier(MerchandiseSetPromotionConditionEligibilitySO.merchandiseSetID). The product group identifier refers toall elements of the product group that are part of it at the creation time of the promotion price derivationrule and not at the execution time. The product group is composed of items and merchandise categories likethe simple product group. It is possible to add an item to a merchandise category after the creation time ofthe promotion. In this case, the item is even at the execution time part of the product group. If the item isdirectly added to the product group, this is not the case. The main functional difference compared to asimple product group is that certain merchandise categories or items can be excluded from the productgroup. In addition, the product group eligibility is not realized via several combined price derivation ruleeligibilities as simple product groups.

The system configuration flag merchandiseSetsEnabled activates the usage of the product groups (true) or itdeactivates it (false). merchandiseSetsEnabled is true by default.

To apply a benefit triggered by a product group, the product group eligibility has to be part of the promotionprice derivation rule. The product group eligibility contains the product group identifier. If a promotion pricederivation rule is created with a product group eligibility and the product group is changed afterwards, thepromotion price derivation rule is still granted for all elements of the product group that were part of it atthe creation time of the promotion price derivation rule.

A product group eligibility is fulfilled if an item in a transaction is part of it or if it is assigned to amerchandise category that is part of the product group. The PCE does not need the detailed structure of aproduct group. The promotion master data API provides the product group. This means that after the PCEprocessed the request, the price derivation rule eligibilities are loaded via the promotion master data API. IfmerchandiseSetsEnabled is true, the PCE also loads the product group eligibilities for the line items in thereceived transaction.

The following figure illustrates, which value of the flag is resulting in which of the previously describedscenarios.

Page 31: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 31

THERE IS MORE

The product group works also with a mix and match calculation rule since it is realized as an independentdata object in the context of a promotion and not via a combination of eligibilities like the simple productgroup.

Information on the attributes of items or merchandise categories can be found in chapters Use an Item as aTrigger or Use a Merchandise Category as a Trigger, respectively.

The product group as a trigger can be enhanced with values for a threshold, an interval, and/or a limit forthe amount and/or the quantity of the corresponding item. Have a look at Use Thresholds, Intervals, andLimits for details.

For further information about the flag merchandiseSetsEnabled, see chapter Configuration.

6.5 Use Thresholds, Intervals, and Limits

Some triggers of a price derivation rule eligibility can be described among others by quantities(SaleReturnLineItem.quantity times SaleReturnLineItem.units) and amounts according to the calculationbase. It is possible to configure eligibilities in a way that predefined quantities and/or amounts – hereincalled threshold types (ThresholdType) – will trigger the particular price derivation rule eligibility – hereinthreshold eligibility (ThresholdPromotionConditionEligibility).

HOW IT WORKS

The amount of an item can be the regular sales price of the item (SaleReturnLineItem.regularUnitPrice timesquantity) minus a previously applied discount.

The threshold types are selectable for the following price derivation rule eligibilities:

Page 32: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine32 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

· Item eligibility

· Merchandise category eligibility

· Simple product group eligibility

· Product group eligibility

· Combination eligibility

A threshold type is described by a threshold, an interval, and/or a limit for quantities or amounts. Thethreshold describes the minimal quantity or amount a trigger type must have to get a benefit – herein calledquantity threshold (ThresholdPromotionConditionEligibility.thresholdQuantity) or amount threshold(ThresholdPromotionConditionEligibility.thresholdAmount). The limit is the maximal quantity or amount atrigger gets a benefit for – herein called quantity limit (ThresholdPromotionConditionEligibility.limitQuantity)or amount limit (ThresholdPromotionConditionEligibility.limitAmount). Thus, the limit always has to be equalto or greater than the threshold of a price derivation rule eligibility. The interval defines ranges of quantitiesand/or amounts within the threshold and the limit – herein called quantity interval(ThresholdPromotionConditionEligibility.intervalQuantity) or amount interval(ThresholdPromotionConditionEligibility.intervalAmount). The benefit is equivalent for every quantity and/oramount within the same range or interval, respectively.

The following figure depicts the correlation between the threshold, the interval, and the limit.

The threshold indicates the minimum quantity and/or amount of a certain trigger that has to be part of thetransaction to activate a threshold eligibility. The limit indicates the maximum quantity and/or amount of atrigger that can get a benefit. The interval subdivides the range between the threshold and the limit. Theinterval itself is a range value. The applied benefit is equivalent for any quantity or amount of a trigger withinan interval, respectively. This means that quantities and/or amounts that are less than the threshold do not

Page 33: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 33

activate the threshold eligibility – area 1 in the figure. In this case, no benefit is applied to the transaction. Ifa transaction include quantities and/or amounts that are greater than or equal to the threshold – area 2 and3 in the figure – the threshold eligibility is activated. This results in a benefit that is applied to thetransaction. However, if the quantities and/or amounts exceed the limit – area 3 in the figure – the pricederivation rule is executed and the benefit is computed only for the limit. Thus, a maximal possible benefit isconfigurable. For details, see the remarks in section THERE IS MORE.

Example:UseThresholds,Intervals,andLimits

Letusassumethattherearetwoitems:the"KitchenChair"for79.95€andthe"OfficeChair"for99.95€.Bothitemsarepartofthemerchandisecategory"chair".

Foreverykindofthresholdtype,athresholdisdefined.Itcanbe,forinstance,athresholdonthequantity–forexample2kitchenchairs,3officechairs,or4itemsofmerchandisecategory“chair”.Thethresholdcanbeontheamount,too.Kitchenchairsamountingto150.00€,officechairsamountingto200.00€,oritemsofchairsamountingto350.00€areexamplesforanamountthreshold.

Thelimitisalsopartofeverythresholdtype.Itfollowsthesameprincipleasthethreshold.Sincethelimithastobegreaterthanthethreshold,itisnotpossibletohavealimitof300.00€forchairsifthethresholdis350.00€.

Theintervaldescribesarangewithinthethresholdandthelimit.Forathresholdof150.00€andalimitof600.00€,theintervalcanbe,forexample,5.00€,250.00€,or400.00€butnot500€.

To consume quantities and/or amounts of an item or a merchandise category, the price derivation ruleeligibilities have to contain the threshold type. This attribute defines how the PCE is interpreting the valuesfor the threshold, the interval, and/or the limit. It can be set in the promotion master data with the followingvalues:

· QUT: The threshold and the limit are set for the quantity.

· AMT: The threshold and the limit are set for the amount.

· QUTI: The threshold, the interval, and the limit are set for the quantity.

· AMTI: The threshold, the interval, and the limit are set for the amount.

· COMB: see chapter Use a Simple Product Group as a Trigger

The different attribute values and their meaning are roughly illustrated in the following decision tree:

Page 34: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine34 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

6.5.1 Use Thresholds and Limits for the Quantity

To use thresholds and limits for the quantity, the threshold type has to be QUT. This threshold type is onlytriggered by quantities of items that are part of the possible triggers. Possible triggers are: items,merchandise categories, simple product groups, and product groups.

A quantity threshold and a quantity limit are set in the price derivation rule eligibility. To activate the pricederivation rule eligibility, the transaction has to include the trigger with the correct quantities.

Page 35: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 35

Example(cont.)

LetusassumethereisapromotionpricederivationrulethatcontainsaneligibilitywiththethresholdtypeQUT.Inaddition,weassumethatthecustomerbuysonekitchenchairandtwoofficechairsforthefamily.Thus,thetransactioncontainstwolineitems:

1. Firstlineitem:itemidentifier"kitchenchair",regularprice79.95€,quantity"1.0",merchandisecategory"chair"

2. Secondlineitem:itemidentifier"officechair",regularprice99.95€,quantity"2.0",merchandisecategory"chair"

Theresultwouldbeasfollows:

· Firstpossibility:Themerchandisecategoryeligibilityincludesthequantitythresholdonchairsthatis"2",andaquantitylimitof"8"(ThresholdType=QUT).

o Bothlineitemstriggerthemerchandisecategoryeligibility.

o Thequantitythresholdof2isreachedsincethreeitemsofthemerchandisecategoryarepartofthetransaction.

o Thequantitylimitisnotreached.

o Thecustomergetsthebenefitaccordingtothecorrespondingpricederivationruleforallthreeitems.

6.5.2 Use Thresholds and Limits for the Amount

To use thresholds and limits for the amount, the threshold type has to be AMT. This threshold type is onlytriggered by amounts of items that are part of the possible triggers. Possible triggers are: items, merchandisecategories, simple product groups, and product groups.

An amount threshold and an amount limit are set in the price derivation rule eligibility. The transaction iscompared with the price derivation rule eligibility. To activate the price derivation rule eligibility, thetransaction has to include the trigger with the correct amounts. For this purpose, the corresponding amountof the calculation base of the promotion price derivation rule (possibly reduced by the already grantedmonetary discount) is checked against these limits instead of the original amount.

Example(cont.)

Page 36: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine36 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

LetusassumethereisapromotionpricederivationrulethatcontainsaneligibilitywiththethresholdtypeAMT.Inaddition,weassumethatthecustomerbuysonekitchenchairandtwoofficechairsforthefamily.Thus,thetransactioncontainstwolineitems:

1. Firstlineitem:itemidentifier"kitchenchair",regularprice79.95€,quantity"1.0",merchandisecategory"chair",amount79.95€

2. Secondlineitem:itemidentifier"officechair",regularprice99.95€,quantity"2.0",merchandisecategory"chair",amount199.90€

Theresultwouldbeasfollows:

· Secondpossibility:Themerchandisecategoryeligibilityincludestheamountthresholdonchairsthatis"150.00€",andanamountlimitof"500.00€"(ThresholdType=AMT).

o Bothlineitemstriggerthemerchandisecategoryeligibility.

o Theamountthresholdof150.00€isreachedsincethreeitemsofthemerchandisecategoryarepartofthetransactionandhavetogetheranamountof279.85€.

o Theamountlimitisnotreached.

o Thecustomergetsthebenefitaccordingtothecorrespondingpricederivationruleforallthreeitems.

6.5.3 Use Thresholds, Intervals, and Limits for the Quantity

To use thresholds, intervals, and limits for the quantity, the threshold type has to be QUTI. This thresholdtype is only triggered by quantities of items that are part of the possible triggers. Possible triggers are: items,merchandise categories, simple product groups, and product groups. A quantity threshold, a quantityinterval, and a quantity limit are set in the price derivation rule eligibility. The transaction is compared withthe price derivation rule eligibility. To activate the price derivation rule eligibility, the transaction has toinclude the trigger with the correct quantities.

Example(cont.)

LetusassumethereisapromotionpricederivationrulethatcontainsaneligibilitywiththethresholdtypeQUTI.Inaddition,weassumethatthecustomerbuysonekitchenchairandtwoofficechairsforthefamily.Thus,thetransactioncontainstwolineitems:

1. Firstlineitem:itemidentifier"kitchenchair",regularprice79.95€,quantity"1.0",merchandisecategory"chair"

Page 37: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 37

2. Secondlineitem:itemidentifier"officechair",regularprice99.95€,quantity"2.0",merchandisecategory"chair"

Theresultwouldbeasfollowsaccording:

· Thirdpossibility:Themerchandisecategoryeligibilityincludesthequantitythresholdonchairsthatis"2",aquantitylimitof"8",andadditionallyaquantityintervalof"2"(ThresholdType=QUTI).

o Bothlineitemstriggerthemerchandisecategoryeligibility.

o Thequantitythresholdof2isreachedsincethreeitemsofthemerchandisecategoryarepartofthetransaction.

o Thequantitylimitisnotreached.

o Thequantityintervalis2,thusthecustomergetsthebenefitfortwoquantitiesofthetwolineitems.

o ThePCEchoosesthelineitemsthatgetthebenefit(seeChooseItems):

§ Ifthesmallestachievablebenefitshallbeobtained,thecustomergetsabenefitforthekitchenchairandforoneofficechair.

§ Ifthehighestachievablebenefitshallbeobtained,thecustomergetsabenefitforthetwoofficechairs.

Thecustomergetsnoadditionalbenefitforthethirdchaireventhoughthequantitylimitisnotreached.Thereasonisthattheintervalis"2".Thus,thecustomerwouldgetanadditionalbenefitforfourchairs,forsixchairs,andforeightchairs(thethresholdplusamultipleoftheinterval).Ifthecustomerbuysthree,five,orsevenchairs,thebenefitwouldbethesameasfortwo,four,orsixchairs.Ifthecustomerbuysmorethaneightchairs,thebenefitwillnotincreaseanyfurther.Thismeansthatthecustomerwouldgetabenefitasifhehadboughteightchairs.

Inthefollowing,theresultforasimplediscountof2%iscalculated.nisthenumberofkitchenchairsthecustomerbuys.Thecustomerdoesnotbuyanyofficechair.

1.n<2:Thediscountisnotappliedforonekitchenchair(totaldiscount=0.00€).

2.2<=n<=8:Thediscountisappliedtotwo,four,six,oreightkitchenchairs.Seethesolutiontable:

n Applied discount

2 2 pieces * 2% * 79.95€ = 3.20€ (total discount; each chair gets a discount of 1.60€)

3 2 pieces * 2% * 79.95€ = 3.20€ (total discount; two chairs get a discount of 1.60€ each, while the first chair gets none)

4 4 pieces * 2% * 79.95€ = 6.40€ (total discount; each chair gets a discount of 1.60€)

Page 38: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine38 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

54 pieces * 2% * 79.95€ = 6.40€ (total discount; four chairs get a discount of 1.60€ each, while the first chair gets none)

6 6 pieces * 2% * 79.95€ = 9.60€ (total discount; each chair gets a discount of 1.60€)

76 pieces * 2% * 79.95€ = 9.60€ (total discount; six chairs get a discount of 1.60€ each, while the first chair gets none)

8 8 pieces * 2% * 79.95€ = 12.80€ (total discount; each chair gets a discount of 1.60€)

3.n>8:Thediscountisappliedtoeightkitchenchairswhichresultsinatotaldiscountof12.80€(eightchairsgetadiscountof1.60€eachwhileanyotherchairgetsnone).

6.5.4 Use Thresholds, Intervals, and Limits for the Amount

To use thresholds, intervals, and limits for the amount, the threshold type has to be AMTI. This thresholdtype is only triggered by amounts of items that are part of the possible triggers. Possible triggers are: items,merchandise categories, simple product groups, and product groups. An amount threshold, an amountinterval, and an amount limit are set in the price derivation rule eligibility. The transaction is compared withthe price derivation rule eligibility. To activate the price derivation rule eligibility, the transaction has toinclude the trigger with the correct amounts. The corresponding amount of the calculation base of thepromotion price derivation rule (possibly reduced by the already granted monetary discount) is checkedagainst these limits instead of the original amount.

Example(cont.)

LetusassumethereisapromotionpricederivationrulethatcontainsaneligibilitywiththethresholdtypeAMTI.Inaddition,weassumethatthecustomerbuysonekitchenchairandtwoofficechairsforthefamily.Thus,thetransactioncontainstwolineitems:

1. Firstlineitem:itemidentifier"kitchenchair",regularprice79.95€,quantity"1.0",merchandisecategory"chair",amount79.95€

2. Secondlineitem:itemidentifier"officechair",regularprice99.95€,quantity"2.0",merchandisecategory"chair",amount199.90€

Theresultwouldbeasfollowsaccordingtothefourthpossibility:

· FourthPossibility:Themerchandisecategoryeligibilityincludestheamountthresholdonchairsthatis"150.00€",anamountlimitof"500.00€",andadditionallyanamountintervalof"200.00€"(ThresholdType=AMTI).

o Bothlineitemstriggerthemerchandisecategoryeligibility.

Page 39: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 39

o Theamountthresholdof150.00€isreachedsincethreeitemsofthemerchandisecategoryarepartofthetransactionandhaveanamountof279.85€together.

o Theamountlimitisnotreached.

o Theamountintervalis200.00€,thusthecustomergetsthebenefitfor150.00€(threshold"150.00€"lessthanregulartotalamountof279.85€islessthanthresholdplusinterval350€,thusthethresholdisonlyconsideredforthecomputation).

o ThePCEchoosesthelineitemsthatgetthebenefit(seeChooseItems):

§ Sincethebenefitisequivalentinanycase,thecustomergetsabenefitfor1.501officechairs.Thequantity1.501timestheregularpriceofoneofficechairresultsintheamountthreshold.

Thecustomergetsnoadditionalbenefitforthethirdchaireventhoughtheamountlimitisnotreached.Thereasonisthattheintervalis"200.00€".Thus,thecustomerwouldgetanadditionalbenefitforanamountof350.00€andfor500.00€(thethreshold"150.00€"plusamultipleoftheinterval–2times"200.00"is550.00€–exceedsthelimit,sothatthelimitof"500.00€"isusedinstead).Ifthecustomerbuyschairsamountingto400.00€,thebenefitwouldbethesameasfor350.00€.Ifthecustomerbuyschairsamountingtomorethan500.00€,thebenefitwillnotincreaseanyfurther.Thismeansthatthecustomerwouldgetabenefitasifhehadboughtchairsamountingto500.00€.

Inthefollowing,theresultforasimplediscountof4%iscalculated.nisthenumberofofficechairsandY€istheamountofofficechairsthecustomerbuys.Thecustomerdoesnotbuyanykitchenchair.

1.Y€<150€:Thediscountisnotappliedforoneofficechairsincethethresholdisnotreached(totaldiscount=0.00€).

2.150€<=Y€<=500€:Thediscountisappliedfor2,3,4and5officechairs.SeetheSolutiontable:

n Y€ Applied discount

2 199.90€

150€ are considered.

Line Item Quantity Considered Amount Corresponding Quantity Resulting Discount Amount

1 1 150€ - 99.95€ = 50.05€ 50.05€ / 99.95€ = 0.501 50.05€ * 4% = 2€

2 1 99.95€ 1 99.95€ * 4% = 4€

Total 150€ 1.501 6€

Page 40: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine40 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

3 299.85€

150€ are considered.

Line Item Quantity Considered Amount Corresponding Quantity Resulting Discount Amount

1 1 0 0 0€

2 1 150€ - 99.95€ = 50.05€ 50.05€ / 99.95€ = 0.501 50.05€ * 4% = 2€

3 1 99.95€ 1 99.95€ * 4% = 4€

Total 150€ 1.501 6€

4 399.80€

150€ + 200€ = 350€ are considered.

Line Item Quantity Considered Amount Corresponding Quantity Resulting Discount Amount

1 1 350€ - 3 * 99.95€ = 50.15€ 50.15€ / 99.95€ = 0.502 50.15€ * 4% = 2.01€

2 1 99.95€ 1 99.95€ * 4% = 4€

3 1 99.95€ 1 99.95€ * 4% = 4€

4 1 99.95€ 1 99.95€ * 4% = 4€

Total 350€ 3.502 14.01€

5 499.75€

150€ + 200€ = 350€ are considered.

Line Item Quantity Considered Amount Corresponding Quantity Resulting Discount Amount

1 1 0€ 0 0€

2 1 350€ - 3 * 99.95€ = 50.15€ 50.15€ / 99.95€ = 0.502 50.15€ * 4% = 2.01€

3 1 99.95€ 1 99.95€ * 4% = 4€

4 1 99.95€ 1 99.95€ * 4% = 4€

5 1 99.95€ 1 99.95€ * 4% = 4€

Total 350€ 3.502 14.01€

3.Y€>500€:thediscountisappliedto3.502piecesofofficechairswhichresultsinatotaldiscountof14.01€.

Page 41: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 41

6.5.5 Use Threshold Types for Single Items

If the threshold for single item flag (MHGPromotionConditionEligibilitySO.thresholdForSingleItemFlag) is setto false in a merchandise category, the quantity and/or the amount of all eligible items in the transaction aresummarized and checked against the quantities/amounts indicated in the price derivation rule eligibility.Otherwise, the quantity and/or amount is summarized individually for each item that triggers thecorresponding price derivation rule eligibility. The result is checked against the quantities and/or amountsstated in this threshold eligibility.

THERE IS MORE

The normalized calculation of every transaction is to be considered during the usage of thresholds, intervals,and limits. Since the normalized calculation rounds the benefit for each normalized line item individually(line item with quantity 1), the rounding difference is added for each additional quantity the promotion pricederivation rule is applied to. This behavior results in a greater rounding difference the more quantities of lineitems get a benefit. In relation with thresholds, intervals, and limits this means that the greater the valuesare chosen the greater the rounding differences are – especially for quantity thresholds, quantity intervals,and quantity limits. For more information, refer to chapter Calculate the Benefit with Normalized Quantities.

The amount of an item for triggering a threshold type is typically the regular sales price of the line item timesthe quantity and minus the already applied monetary discounts. This base for the calculation can be changedwith the attribute calculation base sequence (PromotionConditionRuleSO.calculationBaseSequence) and isfurther explained in chapter Set the Calculation Base. As a result, the amount can be:

· the regular sales price times the quantity

· the regular sales price times the quantity minus a part of the already applied monetary discounts

· the regular sales price times the quantity minus all already applied monetary discounts

There are certain combination eligibilities where the threshold for single item flag is restricted. This meansthat for some combinations of merchandise category eligibilities the flag has to be equivalent for alleligibilities that are part of the combination. Refer to chapter Combine Triggers for details.

There exists also an additional threshold type for simple product groups – that is COMB. The details aredescribed in chapter Use a Simple Product Group as a Trigger.

The threshold type and the threshold for single item flag define which quantities and/or amounts aretriggering the price derivation rule eligibility. Further information about the attributes can be found inchapter Configuration.

Page 42: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine42 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

6.6 Use the Total of a Shopping Basket as a Trigger

The regular/discount total amount of a shopping basket can be used to trigger a promotion price derivationrule. For this purpose, the price derivation rule eligibility contains a special threshold for the total amount ofthe shopping basket. This type of price derivation rule eligibility is herein called shopping basket eligibility(MarketBasketAmountEligibilitySO).

HOW IT WORKS

The shopping basket threshold (MarketBasketAmountEligibilitySO.marketBasketThresholdAmount) for theregular/discount total amount of a shopping basket is the minimal total amount a transaction has to containto trigger a promotion price derivation rule. This value is part of a price derivation rule eligibility of thepromotion master data. It can contain an arbitrary positive amount.

The PCE checks the regular/discount total amount of the shopping basket of the transaction. For thispurpose, the amounts of all items are summed up and then compared with the shopping basket threshold. Ifthe total amount is greater than or equal to it, the corresponding price derivation rule is applied. Thereby,the PCE calculates the discount total amount of the shopping basket based on the present information.

Example:UsetheTotalofaShoppingCartasaTrigger

Letusassumethatthereisanitem"IntegratedCircuit"foraregularpriceof1.99€perpiece.

Wefurtherassumethatthereisapromotionpricederivationrulewithashoppingbasketeligibilitythatcontainstheshoppingbasketthresholdof5000.00€.

Ifacustomerbuys3000integratedcircuitsfortheproductionof3000boards,thetransactionhasaregulartotalamountof5970.00€.Theshoppingbasketthresholdislessthantheregulartotalamountofthetransactionandthusthecorrespondingpricederivationruleisappliedtoit.

Ifacustomerbuysonly2000integratedcircuits,theregulartotalamountwouldbe3980.00€.Theshoppingbasketthresholdisgreaterthantheregulartotalamountofthetransactionandthusthecorrespondingpricederivationruleisnotapplied.

THERE IS MORE

The shopping basket eligibility cannot be combined with line item-related promotion price derivation rules(PromotionConditionRuleSO.transactionControlBreakCode = "PO") if no additional kind of price derivationrule eligibility is combined with it. If no additional price derivation rule eligibility exists, the shopping basketpromotion price derivation rule is not applied.

For more information about the shopping basket threshold, see chapter Configuration.

Page 43: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 43

6.7 Use a Customer Group as a Trigger

The price derivation rule eligibility can be comprised of several trigger types. One of these trigger types is thecustomer group. If a transaction contains a customer group (RetailTransactionCustomerGroupAssignment),the PCE applies the promotion price derivation rule stating the particular customer group. This pricederivation rule eligibility is herein called customer group eligibility(CustomerGroupPromotionConditionEligibilitySO).

HOW IT WORKS

A customer group is defined by its customer group identifier(CustomerGroupPromotionConditionEligibilitySO.customerGroupID).

To apply a benefit triggered by a customer group, the customer group eligibility has to be part of thepromotion price derivation rule. One customer group eligibility contains one customer group identifier.

A customer group eligibility is activated if the customer group identifier in the price derivation rule eligibilityis part of the transaction. For this purpose, the customer group identifier is compared with the data of theloaded price derivation rule eligibilities. If the customer group eligibility is active, the corresponding pricederivation rule is executed in order to apply the benefit.

THERE IS MORE

More customer group eligibilities can be combined with each other to build a group of several customergroups. Refer to chapter Combine Triggers for details.

Notethatthecustomerandtheemployeegroupasdistincttriggertypeareoutofscope.Thesecanbetreatedascustomergroups.

6.8 Use a Coupon as a Trigger

The type of a price derivation rule eligibility can be coupon. If a transaction contains a coupon, the PCEapplies the promotion price derivation rule stating the particular coupon. This price derivation rule eligibilityis herein called coupon eligibility (CouponPromotionConditionEligibilitySO).

HOW IT WORKS

A coupon is defined by its coupon identifier (CouponPromotionConditionEligibilitySO.couponNumber). Inaddition, it has a consumption type (CouponPromotionConditionEligibilitySO.consumptionTypeCode).

Based on the consumption type, the coupon of the transaction(RetailTransactionCouponSummary.Key.couponNumber) is consumed or not. The attribute can be set in thepromotion master data with the following values:

Page 44: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine44 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

· CONSUME/"00"/null: The consumption of coupons depends on other price derivation ruleeligibilities within the promotion price derivation rule.

· CONSUME_PER_ITEM/"01": The coupon is consumed.

· NOT_CONSUMED/"02": The coupon is not consumed.

The different values and their meaning are roughly illustrated in the following decision tree:

The PCE consumes the coupons that are part of the transaction according to the consumption type. Thereby,the following outcomes are possible:

1. Consume the coupon dependent on other price derivation rule eligibilities.2. Consume the coupon.3. Do not consume the coupon.

Page 45: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 45

In addition, the PCE counts the quantity of coupons that were used/consumed during the calculation of thebenefit. It is stored in the applied count (RetailTransactionCouponSummary.appliedCount) in thetransaction. The applied count cannot be greater than the quantity of the coupons in the transaction.

6.8.1 Consume the Coupon Dependent on Other Price Derivation RuleEligibilities

The consumption type is CONSUME. This means that the consumption depends on the other price derivationrule eligibilities included in the promotion price derivation rule. This results in an applied count that isincreased by one each time the promotion price derivation rule is applied. If a threshold type is part ofanother price derivation rule eligibility of the same promotion price derivation rule, the applied count isincreased dependent on the corresponding threshold type:

· quantity/amount threshold and quantity/amount limit are set (threshold type is QUT/AMT): Acoupon is consumed once, thus the applied count is one.

· quantity/amount threshold, quantity/amount interval, and quantity/amount limit are set (thresholdtype is QUTI/AMTI): A coupon is consumed once for each fulfilled interval, thus the applied count isthe number of fulfilled intervals.

This is true if the transaction triggers a coupon eligibility and an item, merchandise category, simple productgroup, product group and/or combination eligibility.

6.8.2 Consume the Coupon

The consumption type is CONSUME_PER_ITEM. The coupon is thus consumed for each eligible item (lineitem with quantity 1) in the transaction. Thereby, the applied count is the equal to the quantity of theeligible line items.

6.8.3 Do not Consume the Coupon

The consumption type is NOT_CONSUMED. The coupon is consumed per transaction. It does not depend onhow many promotion price derivation rules are triggered by the same coupon. This means, if one coupon ispart of a transaction and triggers two promotion price derivation rules, the applied count is one.

THERE IS MORE

It is also possible to grant a coupon as benefit. This should not be mixed up with the use case described inthis chapter. For more details, see chapter Select the Method to Discount.

Page 46: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine46 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

More information about the consumption type can be found in chapter Configuration.

6.9 Combine Triggers

Price derivation rule eligibilities can be combined with each other by different operators. Thereby, a parentprice derivation rule eligibility – short parent eligibility – can have several child price derivation ruleeligibilities – short child eligibilities (CombinationPromotionConditionEligibilitySO.childEligibilityList). Thisgroup of price derivation rule eligibilities is herein called combination eligibility(CombinationPromotionConditionEligibilitySO) – child and parent eligibilities.

HOW IT WORKS

A combination eligibility is composed of one parent and one child eligibility at least. The child eligibility refersto the parent eligibility and contains one of the following trigger types or their combination:

· Item

· Merchandise category

· Product group

· Shopping basket

· Customer group

· Coupon

· Manual trigger

An addition, a threshold type can be part of the child eligibility. In this case, this threshold type is ignored bythe PCE. The only exception of this practice is the simple product group.

The combination code (CombinationPromotionConditionEligibilitySO.combinationCode) indicates how theprice derivation rule eligibilities are combined with each other. The attribute can be set in the promotionmaster data of the parent eligibility with the following values:

· AND: combination via a logical AND operator

· OR: combination via a logical OR operator

· ITEM_OR: see Use a Simple Product Group as a Trigger.

If the combination code is not part of the parent eligibility, the PCE behaves as if the combination code isAND.

The different attribute values and their meaning are roughly illustrated in the following decision tree:

Page 47: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 47

When activating a combination eligibility, the following outcomes are possible:

1. Combine triggers with a logical AND2. Combine triggers with a logical OR

6.9.1 Combine Triggers with a Logical AND

The transaction has to include all triggers of child eligibilities of a parent eligibility with a logical ANDoperator as combination code. If only one trigger type is not part of the transaction, the PCE does notactivate the parent eligibility. Thus, no further calculations are executed.

A combination eligibility with a logical AND operator is not allowed if it includes several child merchandisecategory eligibilities (MHGPromotionConditionEligibilitySO) with the threshold for single item flag

Page 48: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine48 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

(MHGPromotionConditionEligibilitySO.thresholdForSingleItemFlag) set to true. The corresponding promotionprice derivation rule cannot be applied.

6.9.2 Combine Triggers with a Logical OR

The transaction has to include at least one trigger of a child eligibility of a parent eligibility with a logical ORoperator as combination code. If no trigger type is part of the transaction, the PCE does not activate theparent eligibility. Thus, no further calculations are executed.

A price derivation rule eligibility which includes a logical OR operator is internally disassembled into severalprice derivation rule eligibilities without a logical OR operator.

THERE IS MORE

A special case of combination eligibility is the simple product group eligibility that is described in chapterUse a Simple Product Group as a Trigger.

A combination eligibility including several merchandise category eligibilities with different values forthreshold for single item flag is not allowed. The corresponding promotion price derivation rule cannot beapplied.

The combination code is part of the price derivation rule eligibility. Further information can be found inchapter Configuration.

Page 49: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 49

7 Promotion Calculation – General Behavior

The step promotion calculation computes the discounts and loyalty points for a certain transaction. This isthe core functionality of the PCE. In this step, the promotion price derivation rules are loaded and validatedand the price derivation rules are executed. Thereby, the promotion price derivation rules are only loadedand validated if the corresponding price derivation rule eligibility is activated.

There are several limiting factors for the calculation. Some of these factors can be influenced by certainconfiguration parameters and others are given by the process itself. In the following chapters, these limitingfactors and thus the general behavior of the PCE during the promotion calculation are explained.

In this chapter, the following topics are discussed:

· Handle Line Item- or Transaction-Related Promotion Price Derivation Rules

· Select a Promotion Price Derivation Rule in Case of a Collision

· Validate a Promotion

· Set the Calculation Base

· Choose Items

· Apply a Benefit to Fully-Priced Items Only

7.1 Handle Line Item- or Transaction-Related Promotion Price DerivationRules

The execution of the price derivation rules is handled separately on line item level and transaction level. Thetransaction-related promotion price derivation rules are calculated after the line item-related ones. Thetransaction-related promotion price derivation rules thus always base on the line item-related promotionprice derivation rules.

HOW IT WORKS

A transaction-related promotion price derivation rule calculates a benefit that is based on theregular/discount total amount of a transaction. A line-item-related promotion price derivation rulecalculates a benefit that bases on the regular/discount sales price of eligible line items.

The attribute transaction control (PromotionConditionRuleSO.transactionControlBreakCode) specifieswhether the promotion price derivation rule refers to

· One or several line items (transaction control is PO/PC) or

Page 50: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine50 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

· The whole transaction (transaction control is SU/SP)

If the transaction control is null or unknown, SU (= transaction-related) is used by default.

The different attribute values and their meaning are roughly illustrated in the following decision tree.

As line item-related and transaction-related promotion price derivation rules are independent of each other,they do not compete for triggers. This means that a trigger which was consumed by a line item-relatedpromotion price derivation rule is not available for another line item-related one with the same sequence(PromotionConditionSO.sequence). However, the trigger is still available for transaction-related promotionprice derivation rules. The same line item (or part of the line item – subset) may work as a trigger for severalpromotion price derivation rules with different sequence without consuming the corresponding trigger inthe transaction.

Line item-related promotion price derivation rules with the transaction control either equal to PO or to PCare calculated after the PCE received the transaction and before transaction-related promotion pricederivation rules. Transaction-related promotion price derivation rules with the transaction control eitherequal to SP or to SU are calculated after the PCE received the transaction.

THERE IS MORE

In the following chapters, the functionalities refer to line item-related promotion price derivation rules only:

· Choose Items

· Package an Offer

Page 51: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 51

In the following chapters, the functionalities refer to transaction-related promotion price derivation rulesonly:

· Use the Total of a Shopping Basket as a Trigger

· Prorate the Benefit

Further information about the attribute transaction control can be found in chapter Configuration.

7.2 Select a Promotion Price Derivation Rule in Case of a Collision

During the computation of the benefits for a certain transaction, some promotion price derivation rules cancollide with each other. In this case, the PCE performs a best price calculation.

HOW IT WORKS

It is defined which promotion price derivation rules are applied in which order based on the sequence(PromotionConditionSO.sequence) and the resolution (PromotionConditionSO.resolution):

· The sequence defines the order in which the promotion price derivation rules are applied (lowestfirst).

· In case of promotion price derivation rules with the same sequence, the one with the highestresolution is applied only.

This ordering of promotion price derivation rules is done separately for line item-related and transaction-related ones since the calculation is done subsequently. As a result, no collisions are possible between a lineitem-related and a transaction-related promotion price derivation rule.

There is no distinction made between promotion price derivation rules that apply a discount and those thatapply loyalty points.

A collision occurs when two or more promotion price derivation rules have the same sequence and the sameresolution. Thereby, both promotions are valid and triggered by the transaction.

If a collision occurs, that is when the sequence and the resolution are the same, the PCE performs a bestprice calculation. This best price calculation depends on the benefit type of the colliding promotion pricederivation rules. The PCE applies the promotion price derivation rule which results in the highest benefit.Thus, the following outcomes are possible:

1. Selection of a promotion price derivation rule in case of more applicable monetary discounts2. Selection of a promotion price derivation rule in case of more applicable virtual discounts3. Selection of a promotion price derivation rule in case of more applicable loyalty points4. Selection of a promotion price derivation rule in case of more applicable benefits of different type

Page 52: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine52 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

In addition, the computed effective sales price is compared with the regular sales price which results fromapplying the highest benefit. If the regular sales price is smaller than the effective sales price – that is, a priceincrease – the promotion price derivation rule is not applied due to the best price principle.

Notethatthebestpricecalculationisonlyexecutedforlineitem-relatedpromotionpricederivationrulesorfortransaction-relatedonesseparately.

7.2.1 Select a Promotion Price Derivation Rule in Case of More ApplicableMonetary Discounts

If all the promotion price derivation rules would apply a monetary discount, the following attributes havethe following values:

· Bonus points flag (PromotionConditionRuleSO.bonusPointsFlag) would be false.

· Discount method (PromotionConditionRuleSO.discountMethodCode) would be either null, "00", or"03".

For computing the monetary discount, the following discounts are considered:

· Discount on line item level (RetailPriceModifier.amount)

· Discount on transaction level (PriceModificationLineItem.amount)

The promotion price derivation rule is selected that has the greatest discount.

7.2.2 Select a Promotion Price Derivation Rule in Case of More ApplicableVirtual Discounts

If all the promotion price derivation rules would apply a virtual discount, the following attributes have thefollowing values:

· Bonus points flag would be false.

· Discount method would be neither null, "00", nor "03".

For computing the monetary discount, the following virtual discounts are considered:

· Virtual discount on line item level (RetailPriceModifier.extraAmount)

· Virtual discount on transaction level (PriceModificationLineItem.extraAmount)

Page 53: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 53

The promotion price derivation rule is selected that has the greatest virtual discount.

7.2.3 Select a Promotion Price Derivation Rule in Case of More ApplicableLoyalty Points

If all the promotion price derivation rules would apply loyalty points, the following attribute has thefollowing value:

· Bonus points flag would be true.

For computing the loyalty points, the following loyalty points are considered:

· Loyalty points on line item level(FrequentShopperPointsModifier.frequentShopperPointsEarnedAmount)

· Loyalty points in transaction level (LoyaltyRewardLineItem.frequentShopperPointsEarnedAmount)

The promotion price derivation rule is selected that has the greatest value of loyalty points.

7.2.4 Select a Promotion Price Derivation Rule in Case of More ApplicableBenefits of Different Type

If the colliding promotion price derivation rules would apply different benefit types, the possible discountsand loyalty points are still compared with each other. For this purpose, the loyalty points are transformedinto a value that is comparable with discounts. The system parameter pointsRating is the value of themultiplier for the loyalty points. This means that the loyalty points of the corresponding modifier ismultiplied with the value of pointsRating. The result is then compared with the virtual discount/discount ofthe other modifiers. The PCE applies the promotion price derivation rule that has the greatest referencevalue at the end. pointsRating is by default 0.01.

In case of equal reference values for different benefit types, the promotion price derivation rule is selectedaccording to the following prioritization:

1. Monetary discount2. Virtual discount3. Loyalty points

THERE IS MORE

It is possible to limit the execution time of the best price calculation. The system parametercalculationTimeLimit defines the time limit in milliseconds for this calculation. The default value is 1000.

Further information about the attributes and parameters can be found in chapter Configuration.

Page 54: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine54 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

7.3 Validate a Promotion

Before the calculation of a benefit and after the price derivation rule eligibilities are activated, the PCEvalidates the promotion. If the promotion is valid, the corresponding price derivation rule can be executed,otherwise not.

HOW IT WORKS

The validity of a promotion depends on several factors which are listed below:

· a validity period on promotion level

· a validity period on price derivation rule eligibility level

· an allowed calculation mode

The following attributes in the promotion master data are utilized during the validation of the promotion:

· Start time on promotion level (PromotionSO.effectiveDateTime) and end time on promotion level(PromotionSO.expirationDateTime)

· Start time on price derivation rule eligibility level(PromotionConditionEligibilitySO.effectiveDateTime) and end time on price derivation rule eligibilitylevel (PromotionConditionEligiblitySO.expirationDateTime)

The start time is always the start point and the end time the end point of a validity period. The validityperiod is validated either on promotion level or on price derivation rule eligibility level. This is decided withthe system parameter timeValidationMethod. This parameter can have the following two values:

· PROMOTION: validation is done on the promotion level

· ELIGIBILITY: validation is done on the price derivation rule eligibility level

The timeValidationMethod is PROMOTION by default.

The following figure gives an overview about the important attributes for the validation of a promotion. It isillustrated, which value of which attribute is resulting in which of the previously described scenarios. Thegray boxes depict the part of this behavior that is not supported by the OPP or PPS, respectively.

Page 55: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 55

The PCE loads all promotions according to the activated price derivation rule eligibilities. These promotionsare validated before the PCE executes the included price derivation rules. Thereby, the following outcomesare possible:

1. Confirm a promotion2. Invalidate a promotion

7.3.1 Confirm a Promotion

To state that a promotion is valid, the validity period is compared with the time stamp of the transaction(RetailTransaction.promotionTimestamp).

If the timeValidationMethod is equal to PROMOTION, the start time on promotion level has to be smallerthan or equal to the time stamp of the transaction. The end time on promotion level has to be greater thanor equal to the time stamp of the transaction. Thus, the validity period encloses the time stamp of thetransaction.

Page 56: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine56 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

If the system parameter timeValidationMethod is ELIGIBILITY, the start time and the end time are used thatare stated in the price derivation rule eligibilities. Thereby, the time stamp of the transaction has to liebetween these two values. If the start time on price derivation rule eligibility level and the end time on pricederivation rule eligibility level are both null, the promotion is confirmed regardless of the time stamp of thetransaction. The validity period of the promotion is not evaluated if the parameter timeValidationMethod isequal to ELIGIBILITY.

The following applies additionally:

· If the price derivation rule eligibility that is not to be considered is a parent eligibility of acombination eligibility, all child eligibilities are also not taken into account.

· If the eligibility is a parent eligibility of a combination eligibility with the combination code(CombinationPromotionConditionEligibilitySO.combinationCode) equal to AND and this pricederivation rule eligibility is confirmed, all child eligibilities must also be valid. Otherwise, thiscombination eligibility is not taken into account.

Notethatapricederivationruleeligibilitywithaninvalidvalidityperioddoesnotresultinaninvalidpromotion.Ifatleastonevalidpricederivationruleeligibilityexistswithinapromotion,thepromotionisvalidforexactlythispricederivationruleeligibility.

7.3.2 Invalidate a Promotion

To state that a promotion is invalid, the validity period is compared with the time stamp of the transaction.

If the timeValidationMethod is equal to PROMOTION, the start time on promotion level has to be greaterthan the time stamp of the transaction. The end time on promotion level has to be smaller than the timestamp of the transaction.

If the parameter timeValidationMethod is ELIGIBILITY, the start time and the end time are used that arestated in the price derivation rule eligibilities. Thereby, the time stamp of the transaction does not liebetween these two values. A special case is when more than one price derivation rule eligibility or more thanone combination eligibility exist. To state that the whole promotion is invalid, all contained price derivationrule eligibilities must have an start time on price derivation rule eligibility level and end time on pricederivation rule eligibility level which are not null and do not enclose the time stamp of the transaction. Asdescribed previously, the promotion is confirmed otherwise but only the valid price derivation ruleeligibilities are considered.

THERE IS MORE

Page 57: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 57

Chapter Select a Calculation Mode describes in detail how the calculation modes are used and processed bythe PCE.

Further information about the parameter and attributes can be found in chapter Configuration.

7.4 Set the Calculation Base

It is possible to define which previously applied promotion price derivation rules shall be accounted in theongoing promotion calculation process and which shall not. This is done by setting the calculation base foreach price derivation rule separately in the promotion master data. This means that the calculated benefit isapplied to the line item or transaction, respectively, but not each benefit calculated before is taken intoaccount in the ongoing calculation process.

HOW IT WORKS

The calculation base (RetailPriceModifier.calculationBaseAmount,PriceModificationLineItem.calculationBaseAmount,FrequentShopperPointsModifier.computationBaseAmount, orLoyaltyRewardLineItem.computationBaseAmount) is computed for each appliance of a benefit. It is the pricebasis used for computing the benefit. It also helps to retrace the computations of the PCE.

The main attribute is the calculation base sequence (PromotionConditionRuleSO.calculationBaseSequence)for controlling the calculation base. The calculation base sequence determines which of the previouslycomputed discount sales prices are considered for obtaining the calculation base. It is used as follows:

There are nopreviously executedprice derivation rulesor

the calculation basesequence is equal to -1

Calculation base is the regular sales price (line item-related promotion price derivation rule) or theregular total amount (transaction-related promotion price derivation rule).

Calculation basesequence is null orless than/equal to -2

All previously executed price derivation rules influence the calculation base.

Otherwise

(Calculation basesequence is greaterthan/equal to zero)

In case of a line item-related promotion price derivation rule, the calculation base of the current pricederivation rule is equal to the discount sales price of a previously executed promotion price derivationrule that has the highest sequence (PromotionConditionSO.sequence) which is less than or equal to thecalculation base sequence.

In case of a transaction-related promotion price derivation rule, the calculation base of the current pricederivation rule is equal to the discount total amount of the transaction-related promotion pricederivation rule that has the highest sequence which is less than or equal to the calculation basesequence.

Page 58: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine58 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

The consider predecessors flag (PromotionConditionRuleSO.considerPreviousPromotionConditionFlag) andthe no effect on successors flag (PromotionConditionRuleSO.noEffectOnSubsequentPromotionConditionFlag)also influence the calculation base but only for line item-related promotion price derivation rules. Theconsider predecessors flag controls whether the concept behind the attribute no effect on successors flag(false) or the calculation base sequence concept (true) is to be considered. The attribute no effect onsuccessors flag determines whether a promotion price derivation rule influences the calculation base ofsubsequent promotion price derivation rules (false) or not (true).

All these values are part of the promotion master data and obtained by the PCE through the promotionmaster data API.

The different attribute values and their meaning are roughly illustrated in the following decision tree for lineitem-related promotion price derivation rules.

The different attribute values and their meaning are roughly illustrated in the following decision tree fortransaction-related promotion price derivation rules.

Page 59: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 59

Example:SettheCalculationBase

Letusassumethattherearethefollowingitemsinthemasterdata:

Item (Merchandise Category) Regular Sales Unit Price

Desktop PC (electronic) 444.44€

Laptop (electronic) 555.55€

Shirt (clothing) 15.95€

Weassumethatthefollowingpromotionpricederivationrulesexistonlineitemlevelinthepromotionmasterdata:

1.Firstpromotion:Itemsofthemerchandisecategoryelectronicgetadiscountof2%.

· Thresholdtype:QUTI

Page 60: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine60 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

· Quantitythreshold:2

· Quantityinterval:2

· Quantitylimit:8

· sequence:600

· considerPreviousPromotionConditionFlagtrue

2.Secondpromotion:Itemsofthemerchandisecategoryelectronicgetadiscountof25%.

· ThresholdType:QUTI

· Quantitythreshold:3

· Quantityinterval:3

· Quantitylimit:8

· sequence:601

· considerPreviousPromotionConditionFlagtrue

3.Thirdpromotion:Itemsofthemerchandisecategoryelectronicgetadiscountof50%.

· ThresholdType:QUTI

· Quantitythreshold:2

· Quantityinterval:2

· Quantitylimit:8

· sequence:602

· considerPreviousPromotionConditionFlagtrue

Wealsoassumethatthefollowingpromotionpricederivationrulesexistontransactionlevelinthepromotionmasterdata:

4.Fourthpromotion:Buyabasketforaminimumamountof100€andget10€discountwithcoupon#1.

· sequence407891

5.Fifthpromotion:Manuallytriggereddiscountisallowedwhenthevalueofthebasketisgreaterthan100€.Thepriceofthebasketismanuallysetto100.00€then.

· sequence407893

6.Sixthpromotion:Withcoupon#2,getadiscountof20%forthebasket.

· sequence407895

Page 61: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 61

The PCE calculates the benefit according to the three attributes:

· Consider predecessors flag

· No effect on successors flag

· Calculation base sequence

Thereby, the following outcomes are possible:

1. Use the regular sales price2. Use the discount sales price after the lastly executed price derivation rule3. Use the discount sales price after a chosen previously executed price derivation rule4. Skip particular line item-related promotion price derivation rules

7.4.1 Use the Regular Sales Price

7.4.1.1 The Regular Sales Price in Case of Line Item-Related PromotionPrice Derivation Rules

The consider predecessors flag has to be true. The calculation base sequence needs either to be -1 or null. Ifthis is the case, the PCE uses the regular sales price of the line items as calculation base for the currentcomputation of the benefit. If there is no previously computed and applied benefit, the PCE uses the regularsales price as the calculation base, too.

Example(cont.)

Letusassumethatacustomerbuysthefollowingitemswiththefollowingregularsalesprice:

Item (Merchandise Category) Quantity Regular Sales Price

Desktop PC (electronic) 2 888.88€

Laptop (electronic) 1 555.55€

Theapplicationofthepreviouslymentionedlineitem-relatedpromotionpricederivationrulesresultsinthefollowingvaluesifthecheapestitemsarechosenfirst.Thecolumn"Calculation

Page 62: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine62 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Base"showsthevaluesofthecalculationbaseifthecalculationbasesequenceofallthreepromotionpricederivationrulesis-1.

Sequence Promotion PriceDerivation Rule Calculation Base Monetary Discount Previous Price New Price

600 Discount 2% for each2 quantities

1. line item:888.88

2. line item:null

1. line item:17.78€

2. line item:null

1. line item:888.88€

2. line item:555.55€

1. line item:871.10€

2. line item:555.55€

601 Discount 25% foreach 3 quantities

1. line item:888.88

2. line item:555.55

1. line item:222.22€

2. line item:138.89€

1. line item:871.10€

2. line item:555.55€

1. line item:648.88€

2. line item:416.66€

602 Discount 50% foreach 2 quantities

1. line item:888.88

2. line item:null

1. line item:444.44€

2. line item:null

1. line item:648.88€

2. line item:416.66€

1. line item:204.44€

2. line item:416.66€

Themonetarydiscountisobtainedaccordingtothecalculationbaseandthecalculationbasesequence.Theapplicationofthefirstpromotionpricederivationrulegrants2%discountoftheregularsalesprice888.88€forthefirstlineitem.Themonetarydiscountofthesecondpromotionpricederivationruleis25%of888.88€forthefirstlineitemandof555.55€forthesecondlineitem.ThePCEcalculatesforthelastlyexecutedpricederivationrule50%of888.88€forthefirstlineitem.

7.4.1.2 The Regular Total Amount in Case of Transaction-RelatedPromotion Price Derivation Rules

The calculation of transaction-related promotion price derivation rules is executed after the computation ofthe line item-related ones. This means that for any transaction-related promotion price derivation rule alldiscount sales prices of the line items are used if such a promotion price derivation rule already was applied.

If the calculation base sequence is -1, the calculation base is the regular sales price of the line items for thecomputation of the benefit.

Page 63: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 63

Example(cont.)

Letusassumethatacustomerbuysthefollowingitemswiththefollowingregularsalesprice:

Item (Merchandise Category) Quantity Regular Sales Price

Shirt (clothing) 10 159.50€

Thentheapplicationofthepreviouslymentionedtransaction-relatedpromotionpricederivationrulesresultsinthefollowingvalues.Thecolumn"CalculationBase"showsthevaluesofthecalculationbaseifthecalculationbasesequenceofallthreepromotionpricederivationrulesis-1.

Sequence Promotion Price Derivation Rule Calculation Base MonetaryDiscount Previous Price New Price

407891Buy a basket for a minimumamount of 100€ and get 10€discount with coupon #1.

1. line item:159.50

1. line item:10.00€

1. line item:159.50€

1. line item:149.50€

407893

Manually triggered discount isallowed when the value of thebasket is greater than 100€. Theprice of the basket is manuallyset to 100.00€ then.

1. line item:159.50

1. line item:59.50€

1. line item:149.50€

1. line item:90.00€

407895 With coupon #2, get a discount of20% for the basket.

1. line item:159.50

1. line item:31.90€

1. line item:90.00€

1. line item:58.10€

Themonetarydiscountisobtainedaccordingtothecalculationbaseandthecalculationbasesequence.Theapplicationofthefirstpromotionpricederivationrulegrants10.00€discountifthebasketamountisgreaterthan100€.Sincethecalculationbaseisgreaterthanthisthreshold,thepricederivationruleisexecuted.Ifalineitem-relatedpromotionpricederivationrulesetstheregularsalespriceofthetenshirtsto99.95€,thefirstandthesecondtransaction-relatedpromotionpricederivationrulesarenotapplicable.

Thisisduetothecalculationoftransaction-relatedpromotionpricederivationrulesonthebasisofthelineitem-relatedones.Themonetarydiscountofthesecondpromotionpricederivationruleis59.50€sincethisisthedifferencebetweenthecalculationbaseof159.50€andthenewdiscounttotalamountof100.00€.ThePCEcalculatesforthelastlyexecutedpricederivationrule20%of159.50€.

Page 64: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine64 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

7.4.2 Use the Discount Sales Price after the Lastly Executed Price DerivationRule

7.4.2.1 The Discount Sales Price after the Lastly Executed PriceDerivation Rule on Line Item Level

The consider predecessors flag has to be true. The calculation base sequence has to be either null or lessthan or equal to -2. If this is the case, the PCE uses the discount sales price of the line items after the lastlyexecuted price derivation rule as calculation base for the current computation of the benefit. If no previouslycomputed and applied benefit exists, the PCE uses the regular sales price as the calculation base.

Example(cont.)

Letusassumethatacustomerbuysthefollowingitemswiththefollowingregularsalesprice:

Item (Merchandise Category) Quantity Regular Sales Price

Desktop PC (electronic) 2 888.88€

Laptop (electronic) 1 555.55€

Theapplicationofthepreviouslymentionedpromotionpricederivationrulesresultsinthefollowingvaluesifthecheapestitemsarechosenfirst.Thecolumn"CalculationBase"showsthevalueofthecalculationbaseifthecalculationbasesequenceofallthreepromotionpricederivationrulesis-2.

Sequence Promotion PriceDerivation Rule Calculation Base Monetary Discount Previous Price New Price

600 Discount 2% for each2 quantities

1. line item:888.88

2. line item:null

1. line item:17.78€

2. line item:null

1. line item:888.88€

2. line item:555.55€

1. line item:871.10€

2. line item:555.55€

601 Discount 25% foreach 3 quantities

1. line item:871.10

2. line item:555.55

1. line item:217.78€

2. line item:138.89€

1. line item:871.10€

2. line item:555.55€

1. line item:653.32€

2. line item:416.66€

Page 65: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 65

602 Discount 50% foreach 2 quantities

1. line item:653.32

2. line item:null

1. line item:326.66€

2. line item:null

1. line item:653.32€

2. line item:416.66€

1. line item:326.66€

2. line item:416.66€

Themonetarydiscountisobtainedaccordingtothecalculationbaseandthecalculationbasesequence.Theapplicationofthefirstpromotionpricederivationrulegrants2%discountofthelastlyobtaineddiscountsalesprice871.10€forthefirstlineitem.Themonetarydiscountofthesecondpromotionpricederivationruleis25%of871.10€forthefirstlineitemandof555.55€forthesecondlineitem.ThePCEcalculatesforthelastlyexecutedpricederivationrule50%of653.32€forthefirstlineitem.

7.4.2.2 The Discount Total Amount after the Lastly Executed PriceDerivation Rule on Transaction Level

If the calculation base sequence is less than or equal to -2, the calculation base is the discount total amountafter the lastly applied transaction-related promotion price derivation rule. The PCE calculates the benefit onthe basis of the calculation base.

Example(cont.)

Letusassumethatacustomerbuysthefollowingitemswiththefollowingregularsalesprice:

Item (Merchandise Category) Quantity Regular Sales Price

Shirt (clothing) 10 159.50€

Theapplicationofthepreviouslymentionedtransaction-relatedpromotionpricederivationrulesresultsinthefollowingvalues.Thecolumn"CalculationBase"showsthevaluesofthecalculationbaseifthecalculationbasesequenceofallthreepromotionpricederivationrulesis-2.

Sequence Promotion Price Derivation Rule Calculation Base MonetaryDiscount Previous Price New Price

407891Buy a basket for a minimumamount of 100€ and get 10€discount with coupon #1.

1. line item:159.50

1. line item:10.00€

1. line item:159.50€

1. line item:149.50€

Page 66: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine66 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

407893

Manually triggered discount isallowed when the value of thebasket is greater than 100€. Theprice of the basket is manuallyset to 100.00€ then.

1. line item:149.50

1. line item:49.50€

1. line item:149.50€

1. line item:100.00€

407895 With coupon #2, get a discount of20% for the basket.

1. line item:100.00

1. line item:20.00€

1. line item:100.00€

1. line item:80.00€

Themonetarydiscountisobtainedaccordingtothecalculationbaseandthecalculationbasesequence.Theapplicationofthefirstpromotionpricederivationrulegrants10.00€discountifthebasketamountisgreaterthan100€.Sincethecalculationbaseisgreaterthanthisthreshold,thepricederivationruleisexecuted.Themonetarydiscountofthesecondpromotionpricederivationruleis49.50€sincethisisthedifferencebetweenthecalculationbaseof149.50€andthenewdiscounttotalamountof100.00€.ThePCEcalculatesforthelastlyexecutedpricederivationrule20%of100.00€.

7.4.3 Use the Discount Sales Price after a Chosen Previously Executed PriceDerivation Rule

7.4.3.1 The Discount Sales Price after a Chosen Previously ExecutedPrice Derivation Rule on Line Item Level

The consider predecessors flag has to be true. The calculation base sequence has to be greater than or equalto zero. If this is the case, the PCE uses the discount sales price of the line items after a chosen executedprice derivation rule as calculation base for the current computation of the benefit.

Thereby, the sequence of a promotion price derivation rule is important. The sequence of previouslyexecuted price derivation rules has to be less than or equal to the calculation base sequence. From allpromotion price derivation rules that have a sequence that is smaller than or equal to the calculation basesequence, the discount sales price is chosen from the promotion price derivation rule with the highestsequence. This discount sales price is then used as the calculation base for the current computation of thebenefit. If there is no previously computed and applied benefit, the PCE uses the regular sales price as thecalculation base.

Example(cont.)

Page 67: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 67

Letusassumethatacustomerbuysthefollowingitemswiththefollowingregularsalesprices:

Item (Merchandise Category) Quantity Regular Sales Price

Desktop PC (electronic) 2 888.88€

Laptop (electronic) 1 555.55€

Theapplicationofthepreviouslymentionedpromotionpricederivationrulesresultsinthefollowingvaluesifthecheapestitemsarechosenfirst.Thecolumn"CalculationBase"showsthevalueofthecalculationbaseifthecalculationbasesequenceofallthreepromotionpricederivationrulesis600.

Sequence Promotion PriceDerivation Rule Calculation Base Monetary Discount Previous Price New Price

600 Discount 2% for each2 quantities

1. line item:888.88

2. line item:null

1. line item:17.78€

2. line item:null

1. line item:888.88€

2. line item:555.55€

1. line item:871.10€

2. line item:555.55€

601 Discount 25% foreach 3 quantities

1. line item:871.10

2. line item:555.55

1. line item:217.78€

2. line item:138.89€

1. line item:871.10€

2. line item:555.55€

1. line item:653.32€

2. line item:416.66€

602 Discount 50% foreach 2 quantities

1. line item:871.10

2. line item:null

1. line item:435.56€

2. line item:null

1. line item:653.32€

2. line item:416.66€

1. line item:217.76€

2. line item:416.66€

Themonetarydiscountisobtainedaccordingtothecalculationbaseandthecalculationbasesequence.Theapplicationofthefirstpromotionpricederivationrulegrants2%discountoftheregularsalesprice888.88€forthefirstlineitem.Themonetarydiscountofthesecondpromotionpricederivationruleis25%of871.10€forthefirstlineitemandof555.55€forthesecondlineitem.ThePCEcalculatesforthelastlyexecutedpricederivationrule50%of871.10€forthefirstlineitem.

Page 68: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine68 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

7.4.3.2 The Discount Total Amount after a Chosen Previously ExecutedPrice Derivation Rule on Transaction Level

If the calculation base sequence is greater than or equal to zero, the calculation base is the discount totalamount after a chosen previously applied transaction-related promotion price derivation rule. The PCEcalculates the benefit on the basis of the calculation base. Thereby, the sequence of a transaction-relatedpromotion price derivation rule is important. The sequence of previously applied transaction-relatedpromotion price derivation rules has to be less than or equal to the calculation base sequence. From alltransaction-related promotion price derivation rules that have a sequence that is smaller than or equal tothe calculation base sequence, the discount total amount is chosen from the transaction-related promotionprice derivation rule with the highest sequence.

Example(cont.)

Letusassumethatacustomerbuysthefollowingitemswiththefollowingregularsalesprice:

Item (Merchandise Category) Quantity Regular Sales Price

Shirt (clothing) 10 159.50€

Theapplicationofthepreviouslymentionedtransaction-relatedpromotionpricederivationrulesresultsinthefollowingvalues.Thecolumn"CalculationBase"showsthevaluesofthecalculationbaseifthecalculationbasesequenceofallthreepromotionpricederivationrulesis407893.

Sequence Promotion Price Derivation Rule Calculation Base MonetaryDiscount Previous Price New Price

407891Buy a basket for a minimumamount of 100€ and get 10€discount with coupon #1.

1. line item:159.50

1. line item:10.00€

1. line item:159.50€

1. line item:149.50€

407893

Manually triggered discount isallowed when the value of thebasket is greater than 100€. Theprice of the basket is manuallyset to 100.00€ then.

1. line item:149.50

1. line item:49.50€

1. line item:149.50€

1. line item:100.00€

407895 With coupon #2, get a discount of20% for the basket.

1. line item:149.50

1. line item:29.90€

1. line item:100.00€

1. line item:70.10€

Themonetarydiscountisobtainedaccordingtothecalculationbaseandthecalculationbasesequence.Theapplicationofthefirstpromotionpricederivationrulegrants10.00€discountifthebasketamountisgreaterthan100€.Sincethecalculationbaseisgreaterthanthisthreshold,thepricederivationruleisexecuted.Themonetarydiscountofthesecondpromotionprice

Page 69: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 69

derivationruleis49.50€sincethisisthedifferencebetweenthecalculationbaseof149.50€andthenewdiscounttotalamountof100.00€.ThePCEcalculatesforthelastlyexecutedpricederivationrule20%of149.50€.

7.4.4 Skip Particular Line Item-Related Promotion Price Derivation Rules

The skipping of particular promotion price derivation rules is only possible for line item-related ones. Theconsider predecessors flag has to be false. The no effect on successors flag can either be false or true. Itdepends on the no effect on successors flag of each executed price derivation rule how PCE computes thecalculation base.

A promotion price derivation rule influences the calculation base of subsequent promotion price derivationrules if the no effect on successors flag is false and not if the flag is true. Thereby, the consider predecessorsflag is evaluated from the currently processed promotion price derivation rule. If the flag is false, the noeffect on successors flag is evaluated of all previously executed price derivation rules.

Example(cont.)

Letusassumethatthepreviouslymentionedpromotionpricederivationrulesexistonlineitemlevelinthepromotionmasterdata.Butthistime,theseareasfollows:

1.Firstpromotion:Itemsofthemerchandisecategoryelectronicgetadiscountof2%.

· sequence:600

· considerPreviousPromotionConditionFlagfalse

· noEffectOnSubsequentPromotionConditionFlagfalse

2.Secondpromotion:Itemsofthemerchandisecategoryelectronicgetadiscountof25%.

· sequence:601

· considerPreviousPromotionConditionFlagfalse

· noEffectOnSubsequentPromotionConditionFlagtrue

3.Thirdpromotion:Itemsofthemerchandisecategoryelectronicgetadiscountof50%.

· sequence:602

· considerPreviousPromotionConditionFlagfalse

Page 70: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine70 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

· noEffectOnSubsequentPromotionConditionFlagfalse

Weassumethatacustomerbuysthefollowingitemswiththefollowingregularsalesprices:

Item (Merchandise Category) Quantity Regular Sales Price

Desktop PC (electronic) 2 888.88€

Laptop (electronic) 1 555.55€

Theapplicationofthepreviouslymentionedpromotionpricederivationrulesresultsinthefollowingvaluesifthecheapestitemsarechosenfirst.Thecolumn"CalculationBase"showsthevalueofthecalculationbase.

Sequence Promotion PriceDerivation Rule Calculation Base Monetary Discount Previous Price New Price

600 Discount 2% for each2 quantities

1. line item:888.88

2. line item:null

1. line item:17.78€

2. line item:null

1. line item:888.88€

2. line item:555.55€

1. line item:871.10€

2. line item:555.55€

601 Discount 25% foreach 3 quantities

1. line item:871.10

2. line item:555.55

1. line item:217.78€

2. line item:138.89€

1. line item:871.10€

2. line item:555.55€

1. line item:653.32€

2. line item:416.66€

602 Discount 50% foreach 2 quantities

1. line item:871.10

2. line item:null

1. line item:435.56€

2. line item:null

1. line item:653.32€

2. line item:416.66€

1. line item:217.76€

2. line item:416.66€

Themonetarydiscountisobtainedaccordingtothecalculationbaseandthenoeffectonsuccessorsflag.Theapplicationofthefirstpromotionpricederivationrulegrants2%discountoftheregularsalesprice888.88€forthefirstlineitem.Themonetarydiscountofthesecondpromotionpricederivationruleis25%of871.10€forthefirstlineitemandof555.55€forthesecondlineitem.Thisisduetothefactthatthefirstpromotionpricederivationruleshallinfluencethesubsequentones.ThePCEcalculatesforthelastlyexecutedpricederivationrule50%of871.10€forthefirstlineitem.Thisisduetothefactthatthesecondpromotionpricederivationruleshallnotinfluencethesubsequentones.

THERE IS MORE

Only monetary discounts are considered in the calculation base. This means, for example, if a promotionprice derivation rule contains the print out of a coupon and applies a virtual discount of 0.50€, the

Page 71: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 71

calculation base is not affected—regardless of the configuration possibilities. This is the case for line item-and transaction-related promotion price derivation rules. Further explanations regarding the monetary andvirtual discounts are given in chapter Select the Method to Discount.

The approval of a promotion price derivation rule cannot be influenced by the setting of the calculation baseif it only is valid for fully-priced items. Otherwise, the functionality of "fully-priced items only" could becircumvented.

Further information about the attributes can be found in chapter Configuration.

7.5 Choose Items

The choose item method (PromotionConditionRuleSO.chooseItemMethod) provides the possibility toconfigure which items get the benefit and which do not. As the case may be, the result of the promotioncalculation is the smallest or the highest achievable benefit for the customer.

HOW IT WORKS

A transaction may contain more than one line item eligible for a promotion so that the PCE has to choosewhich line item gets the benefit and which does not.

Example:ChooseItems

Letusassumethatthereisanitem"breadmaker"andtheitem"breadmix"withthepossibleflavorsrye,spelt,andwheat.Thesehavethefollowingprices:

· Breadmaker:59.00€

· Breadmix"rye":1.80€

· Breadmix"spelt":2.30€

· Breadmix"wheat":1.50€

Wealsoassumethatthefollowingpromotionpricederivationruleexistsinthepromotionmasterdata:Forbuyingabreadmaker,thecustomergetsfortwobreadmixesadiscountof50%.Thispromotionpricederivationruleisapplicabletoallflavorsofabreadmix.

Thisexampleisaso-calledMixandMatch.Butthisisnottheonlypricederivationrulewherethischoiceofitemsisused.

Based on the choose item method, the eligible line items of a particular transaction are chosen. For thispurpose, it can be set in the promotion master data with the following values:

Page 72: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine72 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

· LOWEST_FIRST or LOWEST_FIRST_INT: The PCE computes the smallest achievable benefit for thecurrently processed promotion price derivation rule.

· HIGHEST_FIRST or HIGHEST_FIRST_INT: The PCE computes the highest achievable benefit for thecurrently processed promotion price derivation rule.

It is also possible that the choose item method is not configured and thus empty (null) or "00". In this case,the PCE behaves according to the system configuration: The system configuration includes the parameteritemChooseMethod. It can have the same values as the choose item method.

The following figure gives an overview about the behavior. It is illustrated, which value is resulting in whichof the previously described scenarios.

Note that the handling of equal regular prices is independent from the choose item method.

Page 73: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 73

The following section describes the process of choosing items in greater detail.

Page 74: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine74 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

7.5.1 Choose Item Methods

Example(cont.)

Letusassumethatacustomerbuysabreadmakerfor59.00€.Additionally,thecustomerbuysoneormoreofthefollowingbreadmixes:

1. Firstpossibility:onebreadmix"rye",onebreadmix"spelt",andonebreadmix"wheat"2. Secondpossibility:threebreadmixes"spelt"

The PCE calculates the benefit according to the value of the choose item method and itemChooseMethod.Thereby, the following four outcomes are possible:

1. Choose items resulting in the smallest achievable benefit.2. Choose items resulting in the highest achievable benefit.3. Choose items in case of equal prices.4. Fall back to the fault method.

7.5.1.1 Choose Items Resulting in the Smallest Achievable Benefit

The line items, which are eligible for the price derivation rule eligibility, are sorted in ascending order. Thefirst eligible line item (or line items, depending on the promotion price derivation rule) in the orderedtransaction gets the benefit. The order of the line items in the transaction itself is not changed.

Example(cont.)

LetusassumethatthechooseitemmethodiseitherequaltoLOWEST_FIRSTortoLOWEST_FIRST_INT.ThePCEcalculatesthefollowingmonetarydiscountsforthepreviouslymentionedpossibilities:

· Firstpossibility:Onebreadmix"rye",onebreadmix"spelt",onebreadmix"wheat",andabreadmaker

o Theorderedtransactionlooksasfollows:

i. Breadmix"wheat":1.50€

ii. Breadmix"rye":1.80€

iii. Breadmix"spelt":2.30€

Page 75: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 75

iv. Breadmaker:59.00€

o Thecustomergetsa50%discountononebreadmix"wheat"andonebreadmix"rye"each.Thetotaldiscountamountsto1.65€.

7.5.1.2 Choose Items Resulting in the Highest Achievable Benefit

The line items, which are eligible for the price derivation rule eligibility, are sorted in descending order. Thefirst eligible line item (or line items, depending on the promotion price derivation rule) in the orderedtransaction gets the benefit. The order of the line items in the transaction itself is not changed.

Example(cont.)

LetusassumethatthechooseitemmethodiseitherequaltoHIGHEST_FIRSTortoHIGHEST_FIRST_INT.ThePCEcalculatesthefollowingmonetarydiscountsforthepreviouslymentionedpossibilities:

· Firstpossibility:onebreadmix"rye",onebreadmix"spelt",onebreadmix"wheat",andabreadmaker

o Theorderedtransactionlooksasfollows:

i. Breadmaker:59.00€

ii. Breadmix"spelt":2.30€

iii. Breadmix"rye":1.80€

iv. Breadmix"wheat":1.50€

o Thecustomergetsa50%discountononebreadmix"spelt"andonebreadmix"rye"each.Thetotaldiscountamountsto2.05€.

Page 76: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine76 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

7.5.1.3 Choose Items in Case of Equal Prices

In the case of equal prices, the line items are sorted in descending order according to their sequence in thetransaction. This means that the last line items get the discount. The order of the line items in thetransaction itself is not changed.

Example(cont.)

Letusassumethatthechooseitemmethodiseitherequalto"00",LOWEST_FIRST,HIGHEST_FIRST,LOWEST_FIRST_INT,ortoHIGHEST_FIRST_INT.ThePCEcalculatesthefollowingmonetarydiscountsforthepreviouslymentionedpossibilitiessincethebreadmixeshaveallthesameregularprice:

· Secondpossibility:threebreadmixes"spelt"andabreadmaker

o Theorderedtransactionlooksasfollows:

i. Breadmaker:59.00€

ii. Breadmix"spelt":2.30€

iii. Breadmix"spelt":2.30€

iv. Breadmix"spelt":2.30€

o Thecustomergetsa50%discountontwobreadmixes"spelt"each.Thetotaldiscountamountsto2.30€.

o Thebreadmixesatpositionc.andd.get1.15€eachasadiscount.

7.5.2 Fall Back to the Default Method

If the choose item method is not set in the price derivation rule or has the value "00", the PCE falls back tothe default method: It checks the itemChooseMethod in the system configuration. Depending on the value ofthe parameter, the smallest or the highest achievable benefit is calculated.

THERE IS MORE

The selection of items for the application of a promotion price derivation rule is not to be mixed up with thebest price calculation in case of the collision of several promotion price derivation rules. In the latter case, apromotion price derivation rule is selected and not the item on which the promotion price derivation ruleshall be applied.

Page 77: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 77

Further information about the choose item method and itemChooseMethod can be found in chapterConfiguration.

7.6 Apply a Benefit to Fully-Priced Items Only

A fully-priced item is an eligible item in the transaction that is not discounted by any previously appliedpromotion price derivation rule.

HOW IT WORKS

Based on the no previous monetary discount flag(PromotionConditionRuleSO.noPreviousMonetaryDiscountAllowedFlag) and the item in the transaction, thepromotion price derivation rule is applied to the item or not. For this purpose, the no previous monetarydiscount flag can be set in the promotion master data with the following values:

· True: The promotion price derivation rule is only applied if no other monetary discounts weregranted to the eligible line items before.

· False: The promotion price derivation rule is applied to the eligible line items.

It is possible that the no previous monetary discount flag is not configured. In this case, the PCE behaves as ifthe flag were false.

The no previous monetary discount flag influences the application of the so maintained promotion pricederivation rule and does not prevent any subsequent promotion price derivation rules. If a transactionincludes an eligible item, the PCE behaves according to the no previous monetary discount flag. This wouldresult in the following outcomes:

· If the flag is true:

o The PCE checks whether a monetary discount was granted for the eligible line item in advance. Ifa monetary discount was granted previously, the price derivation rule is not applied. Otherwise,the PCE executes the price derivation rule.

· If the flag is false:

o The PCE executes the corresponding price derivation rule.

The subsequent figure gives an overview about the behavior.

Page 78: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine78 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Example:ApplyaBenefittoFully-PricedItemsOnly

Letusassumethatthereexisttwopromotionpricederivationruleswithanitemeligibilityfor"Arabicacoffee"each.Theitem"Arabicacoffee"ispartofthemasterdataandcosts7.00€per500gpackage.

Onepromotionpricederivationrulegrants3.00€discountfortwopackagesofArabicacoffeeandisnotrestrictedtofully-priceditems,whereastheothergrants10%discountandisrestrictedtofully-priceditems.Thismeansthefollowingpromotionpricederivationrulesexistinthepromotionmasterdata:

1. Firstpromotionpricederivationrule:TheitemeligibilityincludesArabicacoffeewithaquantitythresholdof2andaquantitylimitof2,grants3.00€monetarydiscount,andthenopreviousmonetarydiscountflagisfalse.

2. Secondpromotionpricederivationrule:TheitemeligibilityincludesArabicacoffee,grants10%monetarydiscount,andthenopreviousmonetarydiscountflagistrue

WeassumethatacustomerbuysfivepackagesArabicacoffee.Thenthecustomergetsthefollowingbenefitsforatransactionwithonelineitemandthequantity5:

· 5xArabicaCoffeewitharegularprice:

o Thecustomergetsabenefitof3.00€fromthefirstpromotionpricederivationrulefortwopackagesofArabicacoffee.

o Thecustomergetsanadditional10%discountforthe3otherpackagesofArabicacoffee.

o Thisresultsinaneffectivepriceof:29.90€.

Page 79: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 79

Ifthenopreviousmonetarydiscountflagofthesecondpromotionpricederivationruleisfalse,thecustomergets10%discountforall5packagesofArabicacoffeeandnotonlyforthree.Thisresultsinaneffectivepriceof28.80€.

THERE IS MORE

The promotion price derivation rules for the fully-priced items do not consider the calculation basesequence (PromotionConditionRuleSO.calculationBaseSequence), the no effect on successors flag(PromotionConditionRuleSO.noEffectOnSubsequentPromotionConditionFlag), and the consider predecessorsflag (PromotionConditionRuleSO.considerPreviousPromotionConditionFlag). This means that the calculationbase cannot be changed for these promotion price derivation rules.

In addition, a zero discount is not changing the price total of the corresponding line item and thus, the itemwith a zero discount is still fully-priced. This results in the outcome that a promotion price derivation rule isstill applicable to a line item with a zero discount that has a no previous monetary discount flag which is setto true.

Further information about the no previous monetary discount flag can be found in chapter Configuration.

Page 80: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine80 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

8 Promotion Calculation – Calculation Rules

The step promotion calculation computes the discounts and loyalty points for a certain transaction. This isthe core functionality of the PCE. Within this step, the promotion price derivation rules are loaded andvalidated and the price derivation rules are executed. Thereby, only the promotion price derivation rules areloaded and validated if the corresponding price derivation rule eligibility is activated.

There are several kinds of benefits that can be calculated during this step. The PCE chooses the kind ofbenefit according to the information stored in the price derivation rule. In addition, it performs thecalculation of the benefit dependent on the price derivation rule. This means it depends on the pricederivation rule and thus the kind of benefit which calculation steps are performed by the PCE and which arenot. These kinds of price derivation rules are described in the following chapters.

In this chapter, the following topics are discussed:

· Apply a Simple Discount

· Package an Offer

· Apply a Zero Discount

· Grant Loyalty Points

· Manually Apply a Benefit

· Mix and Match

· Trigger an Action of the Client

8.1 Apply a Simple Discount

The PCE can compute simple discounts like a discount amount, a discount in percent, or a new price.

HOW IT WORKS

The bonus points flag (PromotionConditionRuleSO.bonusPointsFlag) controls whether a discount or loyaltypoints are granted as a benefit:

· Bonus points flag is false results in a discount.

· Bonus points flag is true results in loyalty points.

To apply a simple discount, the bonus points flag has to be false in the corresponding price derivation rule.

Page 81: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 81

Based on the price modification method (RebatePromotionConditionRuleSO.priceModificationMethodCode),the PCE computes the different simple discounts. The price modification method can be set in the promotionmaster data with the following values. Each value represents a simple discount and defines its calculation:

· DISCOUNT_SINGLE/"RS": reduction of the sales unit price by an amount

· DISCOUNT_PERCENT/"RP": reduction of the sales unit price by a percentage

· FIXED_PRICE/"PS": setting the discount sales unit price of the regular sales unit price

· DISCOUNT_TOTAL/"RT": reduction of the summed up regular sales prices by an amount

· FIX_PRICE_TOTAL/"PT": setting the discount sales price of the summed up regular sales prices

· SET_PRICE_TOTAL/"ST": see Package an Offer

· DISCOUNT_PERCENT_TOTAL/"TP": reduction of the summed up regular sales prices by a percentage

· DISCOUNT_PERCENT_TOTAL2/"T2": reduction of the summed up regular sales prices by apercentage with different rounding

· DISCOUNT_INTERVAL_TOTAL/"PI": new total price per interval

When computing the discount amounts of the current transaction, the following outcomes are possible:

1. Apply a discount as amount2. Apply a discount in percent3. Set a new price

8.1.1 Apply a Discount as Amount

It is possible to reduce the regular sales unit price of an item and the summed up regular sales prices ofseveral line items by an amount, respectively.

The price modification method must be DISCOUNT_SINGLE in order to reduce the regular sales unit price ofan item. The calculation base is the regular sales unit price if this regular sales unit price is not reduced by apreviously executed price derivation rule. The price derivation rule states the amount by which the regularsales unit price shall be reduced. If several quantities of a line item or several line items are eligible, the PCEapplies the discount amount for each quantity and line item (normalized line item which means a line itemwith the quantity one). This results in the multiplication of the discount.

If the price modification method is DISCOUNT_TOTAL, the summed up sales prices of several eligible lineitems are reduced by an amount. The calculation base is the sum over all regular sales prices of eligible lineitems in the transaction. The calculation base is then reduced by the amount that is denoted in thecorresponding price derivation rule. If different line items are eligible for the promotion price derivation rule,the overall discount is prorated to the line items.

Page 82: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine82 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

8.1.2 Apply a Discount in Percent

It is possible to apply a discount in percent.

The price modification method must be DISCOUNT_PERCENT in order to reduce the regular sales unit priceof an item by a percentage. The calculation base is the regular sales unit price if it is not reduced by apreviously executed price derivation rule. The price derivation rule states the percentage by which thecalculation base shall be reduced. This percentage is computed for each normalized eligible line item'scalculation base and thus the PCE computes the discount amount for each one. This results in the addition ofthe discount amounts if several quantities or line items are eligible.

If the price modification method is DISCOUNT_PERCENT_TOTAL or DISCOUNT_PERCENT_TOTAL2, thesummed up regular sales prices of several eligible line items are reduced by a percentage. The calculationbase is the sum over all regular sales prices of eligible line items in the transaction. The calculation base isthen reduced by the percentage denoted in the price derivation rule. The percentage is the correspondingdiscount amount over all eligible line items. The overall discount amount is prorated to the line items.

8.1.3 Set a New Price

It is possible to set the discount sales price of an item and the summed up discount sales prices of severalline items, respectively. The PCE afterwards calculates the granted discount amounts.

The price modification method must be FIXED_PRICE in order to set the discount sales unit price of an item.The calculation base is the regular sales unit price if this regular sales unit price is not reduced by apreviously executed price derivation rule. The price derivation rule states the new discount sales unit priceof an item. The PCE calculates the difference between the calculation base and the new discount sales unitprice as discount amount. If several quantities of a line item or several line items are eligible, the PCE appliesthe previously obtained discount amount for each normalized item. This results in the multiplication of thediscount.

If the price modification method is FIX_PRICE_TOTAL, the summed up regular sales prices of several eligibleline items are set to a new discount sales price. The calculation base is the sum over all regular sales prices ofeligible line items in the transaction. The PCE calculates the difference between the calculation base and thenew discount sales price for the set of items. This difference is the discount amount. If different line itemsare eligible for the promotion price derivation rule, the discount amount is prorated to the line items.

THERE IS MORE

The computation of the discount and the setting of new prices depend on the calculation base. Chapter Setthe Calculation Base describes how to adjust the calculation base for the price derivation rule execution.

The discount total amount in total cannot be greater than the regular total amount of the transaction. Thisalso applies to the discount shares, meaning that the discount share for each line item cannot exceed theregular sales price of that line item. Refer to chapter Prorate the Benefit for more details.

Page 83: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 83

Notethatforthepricederivationruletype"MixandMatch"onlydiscountsareallowed.Thus,theflagbonuspointsflagisnotanalyzedforthispricederivationruletype.

8.2 Package an Offer

The packaged offer is a type of promotion price derivation rule. It sets the discount price for a set of items.

HOW IT WORKS

The price modification method (RebatePromotionConditionRuleSO.priceModificationMethodCode) is set toSET_PRICE_TOTAL in the price derivation rule. It is used to indicate that the PCE shall apply a packaged offer.The calculation of the benefit is done as if price modification method is FIX_PRICE_TOTAL.

Example

Letusassumethereisapackagedofferinthepromotionmasterdata.Itstatesthatwhenbuyingacoffeemakerandtwocoffeepads,yougetthemtogetherfor59.00€.Inaddition,theregularsalesunitpriceofthecoffeemakeris79.00€andofthecoffeepaditis5.00€.

Ifacustomerbuysexactlyonecoffeemakerandtwocoffeepads,theregulartotalamountis89.00€.ThePCEappliesthepackagedofferwhichresultsinadiscountof30.00€intotal.Thatdiscountisproratedtotheinvolvedlineitemsaccordingtotheirregularsalespricesandinvolvedquantities.Thus,thediscountshareofthetwocoffeepadsis3.38€andthediscountshareofthecoffeemakeris26.62€(thedifferenceto30.00€)ifthecheapestitemsarechosenfirst.

THERE IS MORE

The discount price in total cannot be greater than the regular total amount of the transaction. This alsoapplies to the discount shares, meaning that the discount share for each line item cannot exceed the regularsales price of that line item. Refer to chapter Prorate the Benefit for more details.

You can look up the handling of FIX_PRICE_TOTAL in chapter Apply a Simple Discount.

8.3 Apply a Zero Discount

It is possible to allow or deny the application of a promotion price derivation rule resulting in a monetarydiscount of zero. Thereby, the discount can be zero because the price derivation rule includes a monetary

Page 84: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine84 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

discount of zero. A promotion price derivation rule which typically includes a non-zero discount can alsoresult in a discount of zero for particular transactions.

HOW IT WORKS

A monetary discount is typically calculated by the PCE. It reduces the total of a line item or a transaction.

Based on the value of the system flag allowZeroRebate, the PCE applies a zero discount or not. IfallowZeroRebate is false, the PCE generally does not apply monetary discounts of zero. If the system flagallowZeroRebate is true, the PCE does apply a monetary discount of zero. This results in the attachment of aretail price modifier (RetailPriceModifier) or a price modification line item (PriceModificationLineItem) witha monetary discount of zero to the transaction.

The following figure gives an overview about the behavior according to the parameter:

The PCE is invoked by the input of a transaction. The transaction contains line items triggering a promotionprice derivation rule that shall reduce the regular/discount total amount. The PCE calculates the discount. Ifthe monetary discount is non-zero, the transaction is updated in any case afterwards. If the monetarydiscount is zero, the system flag allowZeroRebate has to be true so that the transaction is updated.Otherwise, the transaction will not be updated.

Example:ApplyaZeroDiscount

Letusassumethatthereisanitem"Arabicacoffee"whichcosts9.99€fora500gpackage.

Wefurtherassumethatapromotionpricederivationruleispartofthepromotionmasterdata.Thispromotionpricederivationrulesetsthetotalto19.98€,ifthetransactionincludestwoormoreandlessthanfourArabicacoffees.

AssumethatonecustomerbuystwoquantitiesofArabicacoffeeandanothercustomerthreequantitiesofArabicacoffee.Thefirstcustomerwiththetwoquantitiesgetsabenefitof0.0€whichisazerodiscount.Inthiscase,itdependsonthesystemflagallowZeroRebatehowthePCEbehaves:Iftheflagistrue,thetransactionisupdated,otherwisenot.Thesecondcustomerwiththethreequantitiesgetsabenefitof9.99€.

Page 85: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 85

THERE IS MORE

There are additional possibilities that do not result in the reduction of the total of a line item or a transactionat all. These possibilities are described in chapter Select the Method to Discount. It contains furtherinformation, for example, about the printing of coupons.

Further information about the flag allowZeroRebate can be found in chapter Configuration.

8.4 Grant Loyalty Points

The PCE can compute loyalty points based on the current transaction.

HOW IT WORKS

To grant loyalty points, the bonus points flag (PromotionConditionRuleSO.bonusPointsFlag) has to be true inthe corresponding price derivation rule.

The PCE computes the loyalty points based on the price modification method(RebatePromotionConditionRuleSO.priceModificationMethodCode). The price modification method can beset in the promotion master data with the following values. Each value represents a different way ofcalculating loyalty points:

· DISCOUNT_SINGLE/"RS": Set the amount of loyalty points per normalized item.

· DISCOUNT_PERCENT/"RP": Calculate the discount in percent per normalized item and convert it intoloyalty points.

· DISCOUNT_TOTAL/"RT": Set the amount of loyalty points.

· DISCOUNT_PERCENT_TOTAL/"TP": Calculate the discount in percent and convert it into loyaltypoints.

· DISCOUNT_PERCENT_TOTAL2/"T2": Calculate the discount in percent and convert it into loyaltypoints with different rounding.

When computing the loyalty points, the following outcomes are possible:

1. Grant an amount of loyalty points2. Grant loyalty points as a percentage

Page 86: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine86 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

8.4.1 Grant an Amount of Loyalty Points

An amount of loyalty points can be granted as reward for the purchase. The amount of loyalty points isdenoted in the corresponding price derivation rule.

The price modification method must be DISCOUNT_TOTAL in order to grant an amount of loyalty points foreach eligible normalized line item. If several quantities of a line item or several line items are eligible, thePCE grants the amount of loyalty points for each quantity and line item that is eligible (normalized line itemwhich means a line item with the quantity one). This results in the multiplication of the amount of loyaltypoints.

If different line items are eligible for the promotion price derivation rule, the amount of loyalty points isprorated to these line items.

8.4.2 Grant Loyalty Points as a Percentage

It is possible to grant loyalty points as a percentage of the sales price.

The price modification method must be DISCOUNT_SINGLE in order to grant loyalty points as a percentage ofa normalized line item. First of all, the discount amount for the percentage is calculated. Subsequently, thediscount amount is converted into loyalty points. The calculation base is the regular sales unit price if it is notreduced by a previously executed price derivation rule. The price derivation rule states the percentage of thecalculation base that is considered for the conversion into loyalty points. This percentage is computed foreach normalized eligible line item's calculation base and thus the PCE computes the discount amount foreach one. To get the corresponding amount of loyalty points, the computed discount amount is multipliedwith the value of the system parameter pointsFactor. The computed points are granted for each eligiblenormalized item separately. This results in the addition of the loyalty points if several quantities and lineitems are eligible.

If the price modification method is DISCOUNT_PERCENT_TOTAL or DISCOUNT_PERCENT_TOTAL2, the loyaltypoints are computed as a percentage of the summed up sales prices of several eligible line items. Like in caseof DISCOUNT_PERCENT, the discount amount for the percentage is calculated and afterwards this amount isconverted into loyalty points. The calculation base is the sum over all regular sales prices of eligible lineitems in the transaction if it is not reduced by a previously executed price derivation rule. The percentage isthe corresponding discount amount over all eligible line items. The overall discount amount is multipliedwith the value of the system parameter pointsFactor. These computed loyalty points are the sum that isgranted for all eligible line items. This means that the computed amount of loyalty points is prorated to theeligible line items.

THERE IS MORE

The computation of the loyalty points is based on the calculation base. Chapter Set the Calculation Basedescribes how to adjust the calculation base for the price derivation rule execution.

Page 87: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 87

Notethatthepricemodificationsdescribedinthischapterarenotapplicableforthepricederivationruletype"MixandMatch".

8.5 Manually Apply a Benefit

An employee of the retail company grants a special/manual discount to manually apply a benefit. Thisdiscount can either be granted for one or more items or for the entire purchase. Thereby, the informationabout the discount is given by the request (manual price derivation rule) or by the promotion master data(predefined price derivation rule).

HOW IT WORKS

The PCE gets a so called manual trigger (ManualPromotionTrigger) in the PCE-request. This manual triggerhas to correspond to a price derivation rule eligibility in the promotion master data – herein manualeligibility (ManualPromotionConditionEligibilitySO). The manual eligibility always contains the trigger type(ManualPromotionConditionEligibilitySO.triggerType) and the trigger value(ManualPromotionConditionEligibilitySO.triggerValue). Both attributes can be set by the retailer since theyare used to distinguish between different possible discounts.

The way how the PCE calculates the benefit depends on the price derivation rule. This results in thefollowing possibilities:

1. Manually trigger a predefined price derivation rule.2. Manually trigger and set a price derivation rule.3. Apply a manual trigger several times.

8.5.1 Manually Trigger a Predefined Price Derivation Rule

To apply a manual benefit, the transaction includes a manual trigger with the following attributes:

· For line item-related promotion price derivation rules:

o Item level trigger type (SaleReturnLineItemPromotionTrigger.triggerType)

o Item level trigger value (SaleReturnLineItemPromotionTrigger.triggerValue)

o Item level trigger sequence number(SaleReturnLineItemPromotionTrigger.Key.triggerSequenceNumber)

o Item level trigger sequence addend(SaleReturnLineItemPromotionTrigger.triggerSequenceAddend)

· For transaction-related promotion price derivation rules:

Page 88: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine88 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

o Transaction level trigger type (RetailTransactionPromotionTrigger.triggerType)

o Transaction level trigger value (RetailTransactionPromotionTrigger.triggerValue)

o Transaction level trigger sequence number(RetailTransactionPromotionTrigger.Key.triggerSequenceNumber)

o Transaction level trigger sequence addend(RetailTransactionPromotionTrigger.triggerSequenceAddend)

The trigger type and trigger value have to be equivalent to the trigger type and trigger value in the manualeligibility. If there is no further information in the transaction as described previously, the price derivationrule has to be defined in the promotion master data. The price derivation rule can be freely chosen inadvance and with respect to the price derivation rule types that are supported by the PCE – for example,simple discounts or loyalty points. The PCE then calculates the benefit according to the price derivation rulein the promotion master data.

8.5.2 Manually Trigger and Set a Price Derivation Rule

The price derivation rule type (PromotionConditionRuleSO.typeCode) is "MA" for this manual benefit in thepromotion master data. This means that the PCE expects the calculation rule information in the transaction.To apply a manual benefit and to manually set the price derivation rule, the transaction includes a manualtrigger with the additional attributes:

· For line item-related promotion price derivation rules:

o Item level privilege type (SaleReturnLineItemPromotionTrigger.privilegeType)

o Item level privilege value (SaleReturnLineItemPromotionTrigger.privilegeValue)

· For transaction-related promotion price derivation rules:

o Transaction level privilege type (RetailTransactionPromotionTrigger.privilegeType)

o Transaction level privilege value (RetailTransactionPromotionTrigger.privilegeValue)

As in the previously described scenario, the trigger type and trigger value have to be equivalent with thetrigger type and trigger value in the manual eligibility. The price derivation rule is defined by the privilegetype and privilege value of the manual trigger in the transaction. Thereby, the privilege type can have thefollowing values:

· RP: reduction of the sales unit price by a percentage

· RS: reduction of the sales unit price by an amount

· PS: setting the discount price of the sales unit price

These values correspond to the values of the price modification method for the simple discounts and arecomputed likewise.

Page 89: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 89

Note that it is not possible to manually grant loyalty points without a predefined price derivation rule. Theamount, the percentage, or the discount price are stated in the privilege value of the transaction.

8.5.3 Apply a Manual Benefit Several Times

It is possible that the same manual benefit is granted several times by the employee of the retail company.The corresponding transaction then includes several manual triggers with the same trigger type and triggervalue that trigger the same promotion price derivation rule with the same sequence and resolution. Thepromotion price derivation rules would collide. The PCE takes the then the trigger sequence addend of themanual trigger into account to resolve the collision of the corresponding promotion price derivation rule. Forthis purpose, the trigger sequence addend includes unique values in the context of a transaction. This valueis then added to the sequence of the promotion price derivation rule. This means, the higher the triggersequence addend is, the later this manual trigger is consumed.

THERE IS MORE

A combination eligibility with the combination code(CombinationPromotionConditionEligibilitySO.combinationCode) AND that includes several manualeligibilities is not allowed. The corresponding promotion price derivation rule cannot be applied.

A combination eligibility with the combination code AND which includes at least one manual eligibility and atleast one coupon eligibility is not allowed. The corresponding promotion price derivation rule cannot beapplied.

Further information about the attributes can be found in chapter Configuration.

8.6 Mix and Match

Typically, the PCE applies a benefit to the eligible line items that trigger the corresponding price derivationrule eligibility. The price derivation rule type mix and match is an exception. It is possible that triggers in thetransaction do not get the benefit, but the items, merchandise categories, and product groups which aredefined in the price derivation rule – the Matching Items (MatchingItemSO). This price derivation rule isherein called Mix and Match (MixAndMatchPromotionConditionRuleSO). As a result, the transaction has tocontain the triggers for the price derivation rule eligibility and also the matching items of the mix and match.

HOW IT WORKS

The matching items are defined in the mix and match in the promotion master data. Thereby, a matchingitem can be the following:

· An item

· A merchandise category

Page 90: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine90 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

· A product group

The combination of several matching items is also part of the price derivation rule. It is defined by the mixand match combination code (MixAndMatchPromotionConditionRuleSO.combinationCode). This code hasthe following possible values:

· OR: combination via a logical OR operator

· AND: combination via a logical AND operator

· OR_QUANTITY: combination via a logical OR operator with a certain threshold quantity

The evaluation is done likewise to the comparison of triggers with price derivation rule eligibilities. Thus, it isdecided based on the same attributes and with the same procedure whether a line item in the transactionmatches a matching item in the mix and match. An exception is the handling of items as matching item. Allline items with the item identifier corresponding to the item identifier indicated in the matching item arepossible for the benefit in all cases. The unit of measure of the item is not considered regardless of the unitof measure defined for the matching item.

The mix and match is not applicable to coupons, customer groups, shopping baskets, and simple productgroups.

The combination of the matching items can result in the following behaviors of the PCE:

1. Combine matching items with a logical OR2. Combine matching items with a logical AND3. Combine a certain threshold quantity of matching items with a logical OR

The mix and match price modification (MatchingItemSO.reductionMethodCode) is restricted to thefollowing values:

· REBATE_SINGLE/"RS": reduction of the sales unit price by an amount

· REBATE_PERCENT/"RP": reduction of the sales unit price by a percentage

· PRICE_SINGLE/"PS": setting the discount sales unit price of the regular sales unit price

Thereby, the PCE calculates and prorates the discount like described in Apply a Simple Discount and Proratethe Benefit. Since the mix and match price modification is related to a matching item, the mix and matchprice modification can be different for each one.

8.6.1 Combine Matching Items with a Logical OR

The mix and match combination code is OR. The 1..n matching items of the mix and match form a selectionlist. The benefit can be applied if one or several matching items are part of the processed transaction. Thediscount is computed according to the mix and match price modification. Note that all the applicable mixand match price modifications refer to the regular/discount sales unit price of an item. The mix and matchlimit count (MixAndMatchPromotionConditionRuleSO.limitCount) defines the maximum quantities of

Page 91: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 91

matching items that can get a discount by applying the promotion price derivation rule. If the mix and matchlimit count is not reached, the promotion price derivation rule cannot be applied.

8.6.2 Combine Matching Items with a Logical AND

The mix and match combination code is AND. The 1..n matching items of the mix and match. The benefit canbe applied only if all matching items are part of the currently processed transaction. The discount iscomputed according to the mix and match price modification. Thereby, the mix and match limit count is notconsidered. A threshold quantity of matching items is checked. This threshold quantity is defined by therequired quantity (MatchingItemSO.requiredQuantity). If the required quantity is equal to null, 1 is used.

8.6.3 Combine a Certain Threshold Quantity of Matching Items with aLogical OR

The mix and match combination code is OR_QUANTITY. The 1..n matching items of the mix and match form aselection list. The benefit can be applied if one or several matching items are part of the processedtransaction. The discount is computed according to the mix and match price modification. Note that all theapplicable mix and match price modifications refer to the regular/discount sales unit price of an item.

There exist two differences compared to the mix and match combination code is OR. Firstly, the mix andmatch limit count is not considered. Secondly, a threshold quantity of matching items is checked. Thisthreshold quantity is defined by the required quantity. If the required quantity is equal to null, 1 is used.

THERE IS MORE

The discount flag (SaleReturnLineItem.discountFlag) must be true for matching items. This ensures that nodiscounts are granted to non-discountable line items (the discount flag is false), but otherwise non-discountable line items can cause a discount of other discountable line items. This means that line itemswhich are not discountable are possible triggers.

The line items that correspond to a matching item are chosen according to the following section ChooseItems.

Further information about the attributes can be found in chapter Configuration.

8.7 Trigger an Action of the Client

An action shall be performed by the client which invokes the PCE in advance. The corresponding pricederivation rule includes the information about the external action the client has to perform. The PCE takes

Page 92: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine92 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

over the external action data from the promotion master data to the transaction. This kind of calculationrule is herein called external action price derivation rule (ExternalActionPromotionConditionRuleSO).

HOW IT WORKS

A promotion price derivation rule includes an external action price derivation rule. The promotion masterdata also includes an arbitrary number of external action texts (ExternalAcionTextSO) and external actionparameters (ExternalActionParameterSO) with an identifier and a value for the link in the external actionprice derivation rule. These external action texts and external action parameters are needed by the client forfurther processing of the PCE-response. Thus, the PCE does not calculate and apply a benefit to thetransaction, but forwards the external action texts and external action parameters from the promotionmaster data to the client.

Additionally, it adds a discount amounting to 0.0 or 0.0 loyalty points to the transaction in the process steptransaction update. Thereby, the price modification(RetailTransactionPromotionPriceDerivationRule.priceModificationMethodCode) is set to "EX" in the PCE-response. This price modification indicates that the client has to perform some kind of action in accordanceto the added external action texts and external action parameters in the promotion master data.

Page 93: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 93

9 Transaction Update – Finalize Promotion Calculation

The computed discounts and loyalty points of the previously executed steps are required to update thecurrently processed transaction. If a benefit exists and several line items are affected, it is prorated to allrelated items in the transaction. Modifiers are prepared and added to the affected line items. Finally, thetransaction is mapped into the PCE-response. The PCE-response contains all information about themodification. For example, it contains the identifier for the applied promotion price derivation rules and thecalculated benefit. There are four modifiers: the retail price modifier (RetailPriceModifier) or the pricemodification line item (PriceModificationLineItem) that include a monetary discount, and the frequentshopper points modifier (FrequentShopperPointsModifier) or the loyalty reward line item(LoyaltyRewardLinteItem) that include loyalty points.

The bonus points flag (PromotionConditionRuleSO.bonusPointsFlag) and the transaction control break code(PromotionConditionRuleSO.transactionControlBreakCode) decide which modifier is attached to thetransaction. If the bonus points flag is true, either the frequent shopper points modifier or the loyalty rewardline item is added to the transaction. Thereby, the transaction control break code is either "PO" or "PC", sothat a frequent shopper points modifier is added to the corresponding eligible line item. If the transactioncontrol break code is either "SP" or "SU", the loyalty reward line item is attached to the transaction asseparate line item. If the bonus points flag is false, either the retail price modifier or the price modificationline item are added. Thereby, the transaction control break code is either "PO" or "PC", so that a retail pricemodifier is added to the corresponding eligible line item. If the transaction control break code is either "SP"or "SU", the price modification line item is attached to the transaction as separate line item.

In this chapter, the following topics are discussed:

· Round the Benefit

· Select the Method to Discount

· Prorate the Benefit

9.1 Round the Benefit

The PCE rounds the calculated benefits according to rounding rules (RoundingRuleDO). These rounding rulesare part of the price derivation rules in the promotion master data.

HOW IT WORKS

Rounding rules consist of a value and a direction. The value is the multiple (RoundingRuleDO.multiple),whereas the direction is encoded in the round method (RoundingRuleDO.roundMethodCode). Roundingalways is done on the benefit and not on the effective sales unit price.

Page 94: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine94 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

The round method can have the following values:

· NO_ROUNDING: no rounding

· HALF_UP: round half up, commercial (round up for greater than or equal to the half of the multiple,else round down)

· DOWN: round down

· UP: round up

· HALF_DOWN: round half down (round up for greater than the half of the multiple, else round down)

The multiple is thereby the absolute difference between the calculated discount before rounding and afterrounding. It can contain the digit 0 and either 1 or 5. Thereby, the digits 1 and 5 do appear at most once inthe multiple whereas the digit 0 can appear more often.

The price derivation rule can contain three different kinds of rounding rules which results in the followingpossibilities:

1. Round benefits2. Round benefit shares3. Round the monetary equivalent of loyalty points

Each of these possibilities can be defined by a separate rounding rule.

9.1.1 Round Benefits

The round rule (PromotionConditionRuleSO.roundingRuleID) is set in the price derivation rule. If it is valid, itapplies for the computed benefits – that is, discounts and loyalty points – according to the price derivationrule. Otherwise, the attributes are set according to the following possibilities:

1. Round discounts2. Round loyalty points

9.1.1.1 Round Discounts

If the round rule is null or does not reference a valid rounding rule, the flag bonus points flag(PromotionConditionRuleSO.bonusPointsFlag) decides how the PCE proceeds. If the bonus points flag is false,the discounts are rounded according to the following possibilities in the price derivation rule that are:

· Rounding method (PromotionConditionRuleSO.roundingMethodCode) with the following possiblevalues:

o COMMERCIAL_ROUNDING/"00": commercial rounding, round half up

Page 95: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 95

o DOWN/"01": round down

o UP/"02": round up

· Decimal places count (PromotionConditionRuleSO.decimalPlacesCount) can be:

o null: that is mapped to "2"

o a value that represents the decimal places the benefit can maximally have

· Round destination value (PromotionConditionRuleSO.roundDestinationValue) can have the followingvalues:

o "1"/null: no additional treatment of the rounded result necessary

o "5": the rounded result is rounded again to the next respectively to the previous multiple of 5

If the bonus points flag is false and the rounding method is null or is invalid, it is set toCOMMERCIAL_ROUNDING. If the decimal places count is null, the default value of 2 is used. If the rounddestination value is null, it is set to 1.

If the bonus points flag is true and the round method is null or invalid, the value HALF_UP is used instead. Ifthe multiple is null or invalid, the default value of 0.01 is used.

9.1.1.2 Round Loyalty Points

If the round rule is null or does not reference a valid rounding rule, the flag bonus points flag decides howthe PCE proceeds. If the bonus points flag is true, the loyalty points are rounded according to the attributesin the price derivation rule.

If the bonus points flag is true and the rounding method is null or is invalid, it is set toCOMMERCIAL_ROUNDING. If the decimal places count is null, the default value of 0 is used. If the rounddestination value is null, it is set to 1.

If the bonus points flag is false and the round method is null or invalid, the value HALF_UP is used instead. Ifthe multiple is null or invalid, the default value of 0.01 is used.

9.1.2 Round Benefit Shares

The share rounding rule (PromotionConditionRuleSO.shareRoundingRuleID) is set in the price derivation rule.If it is valid, it is used for the benefit shares that are computed during the proration of a benefit that resultsfrom a transaction-related promotion price derivation rule. Otherwise, the attributes are set according tothe following possibilities:

1. Round discount shares2. Round loyalty point shares

Page 96: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine96 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

9.1.2.1 Round Discount Shares

If the share rounding rule is null or does not reference a valid rounding rule, the bonus points flag decideshow the PCE proceeds. If the bonus points flag is false, the discounts are rounded according to the attributesin the price derivation rule.

If the bonus points flag is false and the rounding method is null or invalid, the corresponding systemparameter rebateShareRoundingMethod is used instead. This parameter can have the following values:

· NO_ROUNDING: no rounding

· HALF_UP: round half up, commercial

· DOWN: round down

· UP: round up

· HALF_DOWN: round half down

If the bonus points flag is false and the decimal places count is null or invalid, the corresponding systemparameter rebateShareDecimalPlacesCount is used instead. This parameter can be a natural numberbetween zero and four. The default value is thereby two.

If the bonus points flag is false and the round destination value is null or invalid, the corresponding systemparameter rebateShareRoundingDestinationValue is used instead. This parameter can be either 1 or 5. Thedefault value is thereby 1.

If the bonus points flag is true and the round method is null or invalid, the value HALF_UP is used instead. Ifthe multiple is null or invalid, the default value of 0.01 is used.

9.1.2.2 Round Loyalty Point Shares

If the share rounding rule is null or does not reference a valid rounding rule, the bonus points flag decideshow the PCE proceeds. If the bonus points flag is true, the loyalty points are rounded according to theattributes in the price derivation rule.

If the bonus points flag is true and the rounding method is null or invalid, the corresponding systemparameter pointsShareRoundingMethod is used instead. This parameter can have the following values:

· "Down": truncation of the result

· "Up": rounding up

· "Commercial": round half up (this is the default value)

If the bonus points flag is true and the rounding method is null or invalid, the corresponding systemparameter pointsShareDecimalPlacesCount is used instead. This parameter can be a natural numberbetween zero and four. The default value is thereby zero.

Page 97: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 97

If the bonus points flag is true and the round destination value is null or invalid, the parameter is set to 1.

If the bonus points flag is false and the round method is null or invalid, the value HALF_UP is used instead. Ifthe multiple is null or invalid, the default value of 1 is used.

9.1.3 Round the Monetary Equivalent of Loyalty Points

The points amount rounding rule (PromotionConditionRuleSO.pointsAmountRoundingRuleID) is set in theprice derivation rule. It is used to round the monetary equivalent of loyalty points. Thus, this type ofrounding rule is not applicable to price derivation rules that apply discounts.

If the points rounding rule is null or does not reference a valid rounding rule, the monetary equivalent isrounded according to the following values:

· Round method is HALF_UP

· Multiple is 0.01

If only the round method is invalid or null, the default value is used instead. The default value is HALF_UP.On the other hand, if only the multiple of the rounding rule is invalid or null, the attribute is set to 0.01.

THERE IS MORE

Due to the normalized calculation, the discount amounts are rounded on the normalized item level as well.This can lead to different values for rounding than it may be expected for a line item.

9.2 Select the Method to Discount

It is possible to decide how to credit a discount. The PCE supports the following methods:

· a discount that reduces the price

· the creation of a gift certificate

· the creation of a coupon

These different ways to credit a discount – herein called discount methods(PromotionConditionRuleSO.discountMethodCode) – indirectly influence the money exchange between acustomer and a retailer. In addition, a discount method can incentivize a customer to come back to honorthe previously received coupon or gift certificate.

HOW IT WORKS

Page 98: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine98 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

The discount method of the price derivation rule controls the method of applying a discount for any kind ofcalculation rule. It indicates how the discount is applied to the transaction. The discount method can be setin the promotion master data with the subsequent possible values:

· "00": The PCE reduces the total amount of the transaction.

· "01": The PCE does not change the total amount of the transaction and prepares the creation of agift certificate with the value of the discount.

· "03": The PCE reduces the total amount of the transaction and prepares a gift certificate.

· "04": The PCE does not change the total amount of the transaction and prepares the creation of acoupon.

Example:SelecttheMethodtoDiscount

Letusassumethattherearethefollowingitems:

· Cocktaildress:424.24€

· Gown:434.34€

· Shirt:18.99€

Wealsoassumethattherearethefollowingpromotionpricederivationrulesinthepromotionmasterdata:

1. Foreverypurchasedcocktaildressgetagiftcertificateofvalue50.00€.2. Foreverypurchasedgowngetagiftcertificateandadiscountof50.00€.3. Foreverypurchasedshirtgetthecoupon"PercentualReduction".4. Forthecoupon"PercentualReduction"get10%discount.

ExamplesforthediscountmethodthatreducesthepricearedescribedinsectionApplyaSimpleDiscount.

The different possibilities and their meaning are roughly illustrated in the following decision tree. The graybox depicts the part of this behavior that is not supported by the OPP or PPS, respectively.

Page 99: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 99

If the discount method is not set in the promotion master data, the PCE reduces the total price of thetransaction. This behavior is the same as if the discount method had the value "00".

The promotion master data also includes the information about the gift certificate and the coupon – forinstance, the reduction method the coupon can have, as for example, 10.00€ discount.

Example(cont.)

Page 100: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine100 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Letusassumethatacustomerbuysoneofthesubsequentitems:

1. Firstpossibility:acocktaildress2. Secondpossibility:agown3. Thirdpossibility:ashirt

When preparing the transaction, the following outcomes are possible:

1. Use the discount to reduce the price.2. Create a gift certificate.3. Reduce the total amount and counterbalance it with a gift certificate4. Create a coupon.

9.2.1 Use the Discount to Reduce the Price

The discount computed by the PCE reduces the price of the line item or the transaction according to theprice derivation rules. This kind of discount is called monetary discount.

9.2.2 Create a Gift Certificate

The PCE prepares the transaction in a way that a gift certificate is created for the customer. The pricederivation rule indicates the value of the gift certificate and the time period in which it is valid. This meansthat the computed discount is the value of the gift certificate. This discount does not reduce the price of thecorresponding line items or the transaction and is called virtual discount.

Example(cont.)

Letusassumethatthediscountmethodis"01".ThePCEcalculatesthefollowingdiscount:

· Firstpossibility:acocktaildress

a. Thecustomergetsnomonetarydiscountandhastopay424.24€.

b. Thecustomergetsagiftcertificatewiththevalueofthevirtualdiscountthatis50.00€.

Page 101: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 101

9.2.3 Reduce the Total Amount and counterbalance it with a Gift Certificate

The PCE prepares the transaction in a way that a gift certificate is created for the customer. The pricederivation rule does indicate which value the gift certificate has and in which time period the certificate isvalid. This means that the computed discount reduces the price of the corresponding line items or thetransaction. The virtual discount is set to zero. In addition, the PCE adds a gift certificate to the transaction.The calling instance of the PCE then handles the PCE-response and creates the correct value of the giftcertificate which is the given monetary discount.

Example(cont.)

Letusassumethatthediscountmethodis"03".ThePCEcalculatesthefollowingdiscount:

· Secondpossibility:agown

a. Thecustomergetsamonetarydiscountandhastopay384.34€.

b. Thecustomergetsagiftcertificateofthevalue50.00€.

c. ThePCEsetsthevalueofthevirtualdiscountto0.0€.

9.2.4 Create a Coupon

The PCE prepares the transaction in a way that a coupon is created for the customer. The price derivationrule indicates that a coupon should be printed. The computed discount does not reduce the price of thecorresponding line items or the transaction, respectively. Thus, this is a virtual discount. In addition, there isanother promotion price derivation rule in the promotion master data that has the printed coupon as atrigger. The latter promotion price derivation rule defines the effect of the coupon.

Example(cont.)

Letusassumethatthediscountmethodis"04".ThePCEcalculatesthefollowingdiscount:

· Secondpossibility:ashirt

a. Thecustomergetsnomonetarydiscountandhastopay18.99€.

b. Thecustomergetsthecoupon"PercentualDiscount".

Thecustomercanget10%discountforanadditionalpurchase.

Page 102: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine102 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

THERE IS MORE

The discount method is part of the price derivation rule. Further information can be found in chapterConfiguration.

9.3 Prorate the Benefit

The resulting benefits from the step promotion calculation are prorated if several line items are eligible.Therefore, the benefit type is crucial for the proration of these.

HOW IT WORKS

The following steps are executed in order to obtain the benefit share for each line item for the processedtransaction-related promotion price derivation rule:

1. Calculation of the discount total amount2. Calculation of the benefit shares for all line items except the last line item3. Calculation of the residual for the last line item

Thereby, the system parameter rebateShareMethod is taken into account for discount shares but not forloyalty points. It defines the method for proportionally distributing the total discount among the differentline items (for transaction-related total discounts):

· SHARE: shares for discounts in percent are calculated directly from sales price of a line item, lineitems are sorted according to their sales prices, starting with the line item that has the smallest salesprice

· STANDARD: standard calculation, line items sorted in order as they were registered

The PCE checks the bonus points flag (PromotionConditionRuleSO.bonusPointsFlag) to decide if the systemparameter rebateShareMethod is used or not.

9.3.1 Calculate Monetary Discount Shares

The discount total amount is the sum of the discount sales prices of all line items in the processedtransaction. This means that all previously applied promotion price derivation rules are taken into account tocalculate the discount shares for the processed transaction-related promotion price derivation rule. Notethat the discount total amount must be unequal to 0, as a division by it can take place. If this is not the case,the proration will not be carried out.

If the system parameter rebateShareMethod is equal to STANDARD or the price modification percent(RebatePromotionConditionRuleSO.priceModificationPercent) is 0.0 or null, the discount total amount isused to obtain the ratio between it and the discount sales price of the line items. This ratio corresponds tothe discount share. Thus, the PCE uses the previously calculated total discount and multiplies it with the

Page 103: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 103

discount sales price of the line item. This result is then divided by the discount total amount in order to getthe discount share. Thereby, the ordering of the line items is according to their registration.

If the system parameter rebateShareMethod is equal to SHARE and the price modification percent is not 0.0or null, a percentage is calculated in order to obtain the discount share. Thereby, the price modificationpercent is multiplied with the calculated total discount within the step promotion calculation in order tocompute the discount share for the corresponding line item. An exception is the manually applied benefit,whereby no information about the discount type is given in the price derivation rule. In order that thepercentage is calculated to obtain the discount share, the privilege type(ManualPromotionTrigger.PrivilegeType) is "RP". The discount share is then the multiple of the privilegevalue (ManualPromotionTrigger.PrivilegeValue) and the total discount. Otherwise, the discount share wouldbe calculated according to the case where the price modification percent is 0.0 or null. Thereby, the lineitems that get a discount share are sorted in ascending order according to their current discount sales prices.

The resulting discount shares are rounded according to the share rounding rule(PromotionConditionRuleSO.shareRoundingRuleID). It is then added to the retail price modifier(RetailPriceModifier) of the corresponding line item.

The last line item that is processed within the calculation of the discount shares is handled differently by thePCE. The discount share of the last line item is the difference between the total discount and the sum overall already computed discount shares for the processed promotion price derivation rule.

9.3.2 Calculate Virtual Discount Shares

The discount total amount is the sum of the discount sales prices of all line items in the processedtransaction. This means that all previously applied promotion price derivation rules are taken into account tocalculate the virtual discount shares for the processed transaction-related promotion price derivation rule.Note that the discount total amount must be unequal to 0, as a division by it can take place. If this is not thecase, the proration will not be carried out.

If the system parameter rebateShareMethod is equal to STANDARD or the price modification percent is 0.0or null, the discount total amount is used to obtain the ratio between it and the discount sales price of theline items. This ratio corresponds to the virtual discount share. Thus, the PCE uses the previously calculatedtotal virtual discount and multiplies it with the discount sales price of the line item. This result is then dividedby the discount total amount in order to get the virtual discount share. Thereby, the order of the line items isaccording to their registration.

If the system parameter rebateShareMethod is equal to SHARE and the price modification percent is not 0.0or null, a percentage is calculated in order to obtain the virtual discount share. Thereby, the pricemodification percent is multiplied with the calculated total virtual discount within the step promotioncalculation in order to compute the virtual discount share for the corresponding line item. The absolutevalue of the computed virtual discount share is then added to the retail price modifier of the correspondingline item. Thereby, the line items that get a discount share are sorted in ascending order according to theircurrent discount sales prices.

Page 104: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine104 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

The resulting virtual discount shares are rounded according to the share rounding rule. It is then added tothe retail price modifier of the corresponding line item.

The last line item that is processed within the calculation of the virtual discount shares is handled differentlyby the PCE. The virtual discount share of the last line item is the difference between the total virtual discountand the sum over all already computed virtual discount shares for the processed promotion price derivationrule.

9.3.3 Calculate Loyalty Point Shares

The discount total amount is the sum of the discount sales prices of all line items in the processedtransaction. This means that all previously applied promotion price derivation rules are taken into account tocalculate the loyalty point shares for the processed transaction-related promotion price derivation rule. Notethat the discount total amount must be unequal to 0, as a division by it can take place. If this is not the case,the proration will not be carried out.

The discount total amount is used to obtain the ratio between it and the discount sales price of the lineitems. This ratio corresponds to the loyalty point share. Thus, the PCE uses the previously calculated loyaltypoints and multiplies it with the discount sales price of the line item. This result is then divided by thediscount total amount in order to get the loyalty point share. Thereby, the order of the line items isaccording to their registration.

The resulting loyalty point shares are rounded according to the share rounding rule. It is then added to thefrequent shopper points modifier (FrequentShopperPointsModifier) of the corresponding line item.

The last line item that is processed within the calculation of the loyalty point shares is handled differently bythe PCE. The loyalty point share of the last line item is the difference between the loyalty points and the sumover all already computed loyalty point shares for the processed promotion price derivation rule.

THERE IS MORE

For the rounding behavior of the PCE, refer to chapter Round the Benefit.

Further information about the parameters and attributes can be found in chapter Configuration.

Page 105: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 105

10 Configuration

10.1 System Parameters of the PCE

Name Type Default Value Description

allowZeroRebate boolean false

Decides whether apromotion price derivationrule which provide a zerodiscount will be used (true)or not (false).

cacheSize long 300

Defines the size of all localmaster data caches. Thisvalue is the count per type ofelement (that is, itemeligibility, merchandisecategory eligibility,promotion). Each type has aseparate cache that cankeep up to 300 differentobjects in the default setting.

calculationMode CalculationMode BASKET

The calculation mode of thePCE. It can be provided viaan element of the PCE-request.

· BASKET: The PCEcalculates thebenefits for theentire shoppingbasket.

· LINE_ITEM: ThePCE calculates thebenefits per lineitemindependently.

calculationQuantityLimit int 50000Defines the overallcalculation quantity limit forone transaction.

calculationTimeLimit long 1000 Defines the time limit in msfor the best price algorithm.

charset Charset UTF-8 Defines the default Charsetto be used.

Page 106: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine106 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Type Default Value Description

checkApiVersion boolean falseDefines whether the requestclient API version should bechecked (true) or not (false).

itemChooseMethod ChooseItemMethod LOWEST_FIRST

Determines in which orderitems get a benefit.

· LOWEST_FIRST/"01": The cheapestline item is chosenfirst.

· HIGHEST_FIRST/"02": The mostexpensive line itemis chosen first.

· LOWEST_FIRST_INT/"03": Handledlike valueLOWEST_FIRST.

· HIGHEST_FIRST_INT/"04": Handledlike valueHIGHEST_FIRST.

conditionLimit long 100

Defines the number ofmaximum applicablepromotion price derivationrules.

defaultBusinessUnitGroupId long 100000000000000014

Gets the default businessunit group identifier.

discountVectorForItemEligibilities boolean false

Specifies whether thediscount control vectorcheck is used for promotionprice derivation rules withitem eligibilities (true) or not(false).

Page 107: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 107

Name Type Default Value Description

discountVectorMethod DiscountVectorMethodCode COMMON

Defines which positions arechecked against thediscount vector.

· ALL: Promotionvalidity level.

· COMMON: Pricederivation ruleeligibility validitylevel.

enabled boolean true Enabling of the promotionservice (true) or not (false).

incrementalCalculationMode IncrementalCalculationMode RECALCULATE_ALL

Enum for controlling thebehavior of incrementalcalculation mode. It is notused in server embeddedmode. This value controlsthe reuse of session(context) information if theyare passed with a calculationrequest.

Possible values:

· DISABLED: Noincrementalcalculation at all,always a freshcontext is used.

· RECALCULATE_ALL:Keep context, butrecalculate allpromotionscompletely.

· INCREMENTAL: If aset of changes ispassed, this will beused to determinewhat can be kept inthe context andwhat needs to berecalculated.

itemTypesWithoutDiscounts List<String> Empty listList of line item typesgenerally excluded fromdiscount.

Page 108: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine108 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Type Default Value Description

itemTypesWithoutReceiptRelatedDiscounts List<String> SALES_ORDER

List of line item types whichare not allowed fortransaction-related monetarydiscounts (see PositionType).

itemTypesWithoutReceiptRelatedPoints List<String> SALES_ORDER

List of line item types whichare not allowed fortransaction-related loyaltypoints (see PositionType).

localMasterdataCacheEnabled boolean trueDefines whether the localmaster data caching isenabled or not.

merchandiseSetsEnabled boolean trueDecides whether a productgroup is adaptable by thePCE (true) or not (false).

minimumQuantityForSingleNormalizedItemCreation int 30000

Defines a minimum quantityabove which the line itemnormalization shouldproduce a single normalizeditem with quantity > 1 forperformance improvement.

nonPieceItemPerPosition boolean false

Specifies whether thepercent discount for non-piece items(UnitOfMeasureCode is notPIECE) should be calculatedper unit of measure (true) orper PIECE (false).

pointsFactor BigDecimal 1.0

Factor by which the discountpercentage amount ismultiplied to grant loyaltypoints.

pointsRating BigDecimal 0.01

Factor by which the loyaltypoints are multiplied tocompare discounts withloyalty points.

pointsShareDecimalPlacesCount int

DEFAULT_POINTS_SCALE

(Default value forscale used forpoints rounding;constant fieldvalues)

Defines the number ofdecimal places (0 - 4) forloyalty points splitting.

Page 109: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 109

Name Type Default Value Description

pointsShareRoundingMethod RoundingMethod HALF_UP

Defines the rounding methodfor loyalty points shares:

· NO_ROUNDING: Norounding.

· HALF_UP: Roundhalf up,commercial.

· DOWN: Rounddown.

· UP: Round up.

· HALF_DOWN:Round half down.

priceTypeCodesWithoutDiscounts List<String> Empty list

List of price types(SaleReturnLineItem.priceTypeCode) generally notconsidered by the PCE.

processingMode RequestResponseProcessingMode SERVICE

Defines the PCE processingmode: SERVICE if the PPS isused or POS used for directcommunication with POSsystems.

rebateShareDecimalPlacesCount int 2Defines the number ofdecimal places (0 - 4) fordiscount splitting.

Page 110: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine110 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Type Default Value Description

rebateShareMethod RebateShareCalculationMethodCode SHARE

Defines the method forproportionally prorating thetransaction-related discountamong the different lineitems (for transaction-relatedmonetary discounts, notused for loyalty points).

· SHARE: Shares fordiscounts inpercent arecalculated directlyfrom sales price ofa line item, lineitems are sortedaccording to theirsales prices,starting with theline item that hasthe smallest salesprice.

· STANDARD:Standardcalculation, lineitems sorted inorder as they wereregistered.

rebateShareRoundingDestinationValue int 1

Defines the roundingdestination value fordiscount shares, which areused to round the value tothe proper denomination(not used for loyalty points).

Additional roundinginformation:

· "1"/null: Noadditionaltreatment of therounded resultnecessary.

· "5": The roundedresult is roundedagain to the next,respectively, to theprevious multiple of5.

Page 111: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 111

Name Type Default Value Description

rebateShareRoundingMethod RoundingMethod HALF_UP

Defines the rounding methodfor discount shares (not usedfor loyalty points).

· NO_ROUNDING: Norounding.

· HALF_UP: Roundhalf up,commercial.

· DOWN: Rounddown.

· UP: Round up.

· HALF_DOWN:Round half down.

percentualPointsMethod RoundingPercentualPointsMethodCode BEFORE

Defines the method which isused to calculate percentualloyalty points promotionprice derivation rules values.

· AFTER: Round atthe end of thecalculation forquantity unit.

· BEFORE: Roundbefore calculationfor quantity unit.

saleReturnTypeCodesForReturns List<SaleReturnTypeCode> RETURNS,SALES_RETURNS

Sets the sale return typecodes for returns.

· SALES_RETURNS/"00": Sales andreturns areconsidered.

· SALES/"01": Salesare consideredonly.

· RETURNS/"02":Returns areconsidered only.

Page 112: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine112 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Type Default Value Description

saleReturnTypeCodesForSales List<SaleReturnTypeCode> SALES,SALES_RETURNS

Sets the sale return typecodes for sales.

· SALES_RETURNS/"00": Sales andreturns areconsidered.

· SALES/"01": Salesare consideredonly.

· RETURNS/"02":Returns areconsidered only.

timeValidationMethod TimeValidationMethodCode PROMOTION

Method to determine thevalidity level of a condition.

· PROMOTION:Promotion validitylevel.

· ELIGIBILITY: Pricederivation ruleeligibility validitylevel.

transactionRebateMethod TransactionRebateCalculationMethodCode TRIGGER

Specifies how to determinethe calculation base of thetransaction-relateddiscounts.

userActionProhibited boolean true

Specifies whether it isforbidden that the userselects or enters a promotionprice derivation rule value.

Page 113: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 113

10.2 Promotion Master Data Codes

Name Description

AdjustmentMethodCode

A mnemonic code denoting what kind of adjustment is being made to the regular sales price ofthe item.

· INCREASE: Increase amount with calculated value.

· DECREASE: Decrease amount with calculated value.

AmendmentTypeCode

Determines whether the promotion price derivation rule can be used only for sales, only foramendments, or for both.

· SALES_AMENDMENTS/"00": For sales as well as for amendments.

· SALES/"01": Only for sales.

· AMENDMENTS/"02": Only for amendments.

CalculationBaseType

The code is only influencing the calculation base for transaction-related promotion pricederivation rules. It defines how the calculation base is obtained on the basis of the sold andreturned line items in the context of a transaction.

· CALCBASE_0/"00": Calculation base is the sum of all sales in a transaction.

· CALCBASE_01/"01": Calculation base is the sum of all sales minus the returns in atransaction.

ChooseItemMethod

Defines the order in which items are used in promotion calculation.

· LOWEST_FIRST/"01": Cheapest line item is chosen first.

· HIGHEST_FIRST/"02": Most expensive line item is chosen first.

· LOWEST_FIRST_INT/"03": Handled like value LOWEST_FIRST.

· HIGHEST_FIRST_INT/"04": Handled like value HIGHEST_FIRST.

CombinationCode

Code denoting the style of combination that is to be applied across the child eligibilities.

· AND: Combination via a logical AND operator.

· OR: Combination via a logical OR operator.

· INTERSECTION: Combination via an intersection.

· ITEM_OR: Combination for simple product groups.

Page 114: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine114 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Description

CouponConsumptionCode

Defines the consumption of coupons.

· CONSUME/"00"/null: Consumption of coupons depends on the other eligibilitiesinside the condition.

· CONSUME_PER_ITEM/"01": Coupon is consumed (one coupon per item).

· NOT_CONSUMED/"02": Coupon is not consumed (one coupon for all items).

· CONSUME_PER_DIFFERENT_ITEM/"03": Coupon is consumed per different item (formultiple pieces of one item only one coupon is required).

CouponPrintoutRule

The type code of the printout rule.

· SEPARATE_RECEIPT/"00": Print as extra receipt.

· PRINT_AT_END/"01": Print at the end of the transaction.

EligibilityStatusCode

Defines the price derivation rule eligibility status codes values.

· STATUS_CODE_ACTIVE: Status active.

· STATUS_CODE_INACTIVE: Status inactive.

EligibilityType

Price derivation rule eligibility type interface. Each price derivation rule eligibility has a distincttype code.

· COMB: Combination eligibility.

· EGRP: Employee eligibility.

· CGRP: Customer group eligibility.

· CUST: Customer eligibility.

· MSTR: Merchandise category eligibility.

· ITEM: Item eligibility.

· TOTL: Shopping basket eligibility.

· COUP: Coupon eligibility.

· MANU: Manual trigger eligibility.

· POST: Position type eligibility.

· EXTV: External trigger eligibility.

· MSET: Product group eligibility.

Page 115: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 115

Name Description

MerchandiseSetTypeCode

Defines the type of a product group element.

· MRHRC: Merchandise category group.

· ITM: Item.

· OPR: Set operation.

MixAndMatchCombinationType

Determines how the matching items belonging to the price derivation rule can be combined.

· OR: Combination via a logical OR operator.

· AND: Combination via a logical AND operator.

· OR_QUANTITY: Combination via a logical OR operator with a certain thresholdquantity.

· INTERSECTION: Combination of merchandise categories via an intersection.

· INTERSECTION_QUANTITY: Combination of merchandise categories via anintersection with a certain threshold quantity.

· ST: Set a discount price for all matching items.

Page 116: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine116 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Description

PositionType

Type safe, extensible enumeration in a PositionTypePromotionConditionEligibilitySO.

· COMMON/"CO": Common sale return line item.

· DEPOSIT_ITEM/"DI": Deposit line item.

· DONATION/"DO": Invoice payment line item.

· DOWNPAYMENT/"DP": Down payment line item.

· DOWNPAYMENT_CLEARING/"DC": Downpayment clearing line item.

· EMPTIES_RETURN/"ER": Empties return line item.

· GIFT_CERTIFICATE/"GC": Gift certificate line item.

· INVOICE_PAYMENT/"IP": Invoice payment line item.

· ITEM_INFORMATION/"II": Invoice payment line item.

· PAY_IN/"PI": Pay in line item.

· PAY_OUT/"PO": Pay out line item.

· PREPAID/"PR": Prepaid line item.

· PROMOTION_GIFT_CERTIFICATE/"PG": Promotion gift certificate line item.

· SALES_ORDER/"SO": Sales order line item.

· SALES_ORDER_PICK_UP/"PU": Sales order pickup line item.

· SCALE_RECEIPT/"SR": Scale receipt line item.

PriceModificationMethod

A code denoting the method of modifying the price or loyalty points that are being applied tothe transaction.

· DISCOUNT_SINGLE/"RS": Reduction of the sales unit price by an amount.

· DISCOUNT_PERCENT/"RP": Reduction of the sales unit price by a percentage.

· FIXED_PRICE/"PS": Setting the discount price of the sales unit price.

· DISCOUNT_TOTAL/"RT": Reduction of the summed up sales prices by an amount.

· FIX_PRICE_TOTAL/"PT": Setting the discount of the summed up sales prices.

· SET_PRICE_TOTAL/"ST": Set price total.

· DISCOUNT_PERCENT_TOTAL/"TP": Reduction of the summed up sales prices by apercentage.

· DISCOUNT_PERCENT_TOTAL2/"T2": Reduction of the summed up sales prices by apercentage with different rounding.

· DISCOUNT_INTERVAL_TOTAL/"PI": New total price per interval.

Page 117: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 117

Name Description

PrivilegeType

For mapping privilege type values for manual benefits.

· RS: Reduction of the sales unit price by an amount.

· RP: Reduction of the sales unit price by a percentage.

· PS: Setting the discount price of the sales unit price.

· RT: Reduction of the summed up sales prices by an amount.

· PT: Setting the discount of the summed up sales prices.

· TP: Reduction of the summed up sales prices by a percentage.

· T2: Reduction of the summed up sales prices by a percentage with different rounding.

· ST: Set price total.

ReductionMethodMixAndMatch

A code denoting the method of modifying the price that is being applied in case of a mix andmatch.

· REBATE_SINGLE/"RS": Reduction of the sales unit price by an amount.

· REBATE_PERCENT/"RP": Reduction of the sales unit price by a percentage.

· PRICE_SINGLE/"PS": Setting the discount price of the sales unit price.

· ALLOCATION_PERCENT/"MP": Set a discount price for all matching items.

RoundingMethod

Rounding methods.

· NO_ROUNDING: No rounding.

· HALF_UP: Round half up, commercial (round up for greater than or equal to the halfof the multiple, else round down).

· DOWN: Round down.

· UP: Round up.

· HALF_DOWN: Round half down (round up for greater than the half of the multiple,else round down).

RoundingMethodCode

Determines how the calculated benefit is to be rounded.

· COMMERCIAL_ROUNDING/"00": Commercial rounding, round half up.

· DOWN/"01": Round down.

· UP/"02": Round up.

Page 118: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine118 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Description

RuleControlType

Determines whether the price derivation rule is to be applied during the registration of thetransaction.

· PO: Line item-related price derivation rule, calculated after each line item.

· SU: Transaction-related price derivation rule, calculated after subtotal.

· PC: Line item-related price derivation rule, calculated after subtotal.

· SP: Transaction-related price derivation rule, calculated after each line item.

If there is another than the above-mentioned supported values in the request, error ID GKR-100500 is sent back. If this value is missing in the request, the default value is set to SU.

RuleType

Defines the type of price derivation rule.

· RB: Either simple discount or loyalty points.

· MM: Mix and match.

· NO: No discount.

· GP: Buy one get one.

· MA: Manual price derivation rule.

· EX: External action price derivation rule.

SaleReturnTypeCode

Determines whether the promotion price derivation rule can be used only for sales, only forreturns, or for both.

· SALES_RETURNS/"00": Sales and returns are considered.

· SALES/"01": Sales are considered only.

· RETURNS/"02": Returns are considered only.

ThresholdType

A code for the type of threshold which applies to a price derivation rule eligibility.

· NONE: No threshold type.

· QUT: The threshold and the limit are set for the quantity.

· QUTI: The threshold, the interval, and the limit are set for the quantity.

· AMT: The threshold and the limit are set for the amount.

· AMTI: The threshold, the interval, and the limit are set for the amount.

· AMTS: The threshold, the interval, and the limit are set for the regular sales price.

· AMQU: The threshold is set for the quantity and the amount.

· COMB: See chapter Use a Simple Product Group as a Trigger.

Page 119: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 119

Name Description

TriggerValueTypeCode

The type of the TriggerValue for ExternalTriggerValuePromotionConditionEligibilitySO.

· TURNOVER/"00": Turnover of the (current) year.

· REBATE_AMOUNT/"01": Discount amount which was granted during the (current)year.

10.3 Transaction Data Codes

Name Description

CalculationMethodCode

A mnemonic code denoting how the price modification calculation was performed.

· MANUAL_PRICE_OVERRIDE: Manual price override calculation method.

PriceModificationMethodTx

PriceModification codes for transaction data mapping. Combination of RuleType andPriceModificationMethod.

· RS: Reduction of the sales unit price by an amount.

· RP: Reduction of the sales unit price by a percentage.

· PS: Setting the discount price of the sales unit price.

· RT: Reduction of the summed up sales prices by an amount.

· PT: Setting the discount of the summed up sales prices.

· ST: Set price total.

· TP: Reduction of the summed up sales prices by a percentage.

· T2: Reduction of the summed up sales prices by a percentage with differentrounding.

· PI: New total price per interval.

· RM: Manual price derivation rule.

· NO: No discount.

· MM: Mix and match.

· GP: Buy one get one.

· EX: External action price derivation rule.

Page 120: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine120 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Description

RetailTransactionLineItemTypeCode

A code to denote the type of retail transaction line item.

· CHILD_ITEM: Child item.

· LOYALTY_REWARD_LINE_ITEM: Loyalty reward line item.

· PRICE_MODIFICATION_LINE_ITEM: Price modification line item.

· ROUNDING_LINE_ITEM: Rounding line item.

· SALE_RETURN_LINE_ITEM: Sale return line item.

· TAX_LINE_ITEM: Tax line item.

· TENDER_LINE_ITEM: Tender line item.

· VOIDS_LINE_ITEM: Voids line item.

· WORKER_DISCOUNT_LINE_ITEM: Worker discount line item.

SaleReturnLineItemActionCode

A code denoting how the item is being treated in the line item.

· RETURN_ITEM: Return item.

· SALE_ITEM: Sale item.

SalesOrderDeliveryTypeCode

Type-safe extensible enumeration for mapping the delivery type code of the related salesorder.

· PICKUP_OWN_STORE: Pick up in own store.

· DELIVERY: Delivery.

· IMMEDIATE_PICKUP: Pick up immediately.

· PICKUP_FOREIGN_STORE: Pick up in foreign store.

UnitOfMeasureCode

Sale return line items quantity input methods.

· PIECE: Solid pieces (single quantity).

· LENGTH: Length.

· AREA: Area (length and width).

· VOLUME: Length and width and height.

· WEIGHT: Weight.

· MEASUREMENT: General measurement (for arbitrary units of measure).

· PARTITION: Divisible pieces (quantity with decimal places).

Page 121: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 121

10.4 Objects and Attributes from the Master Data

Name Default Value Data type, range Mandatory Description

CombinationPromotionConditionEligibilitySO extends ThresholdPromotionConditionEligibility

combinationCode - CombinationCode YesCode denoting the style ofcombination that is to be appliedacross the child eligibilities.

childEligibilityList - List<PromotionConditionEligibilitySO> No List of all child eligibilities

thresholdForSingleItemFlag false Boolean No

If set to false in a merchandisecategory, the quantity and/or theamount of all eligible items in thetransaction are summarized andchecked against thequantities/amounts indicated inthe price derivation rule eligibility.Otherwise, the quantity and/oramount are summarizedindividually for each item thattriggers the corresponding pricederivation rule eligibility.

Not supported by OPP/PPS.

CouponPromotionConditionEligibilitySO extends PromotionConditionEligibilitySO

couponNumber - String Yes Identifier of a coupon.

consumptionTypeCode - CouponConsumptionCode Yes Defines the consumption ofcoupons.

CurrencyRoundingRuleDO

roundMethodCode - RoundingMethod No Rounding methods defined inconfiguration.

roundDecimalCount - Integer No Count of decimals which the resultshould have.

roundDestinationValue - Integer NoDefines the rounding destinationvalue which is used to round thevalue to the proper denomination.

CustomerGroupPromotionConditionEligibilitySO extends PromotionConditionEligibilitySO

customerGroupID - String No Identifier of a customer group.

CustomerPromotionConditionEligibilitySO extends PromotionConditionEligibilitySO

customerID - String No Identifier of a customer.

Page 122: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine122 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

ExternalActionParameterSO

parameterID - String No Identifier of a parameter that isneeded by an external action.

parameterValue - String No Value of a parameter that isneeded by an external action.

ExternalActionPromotionConditionRuleSO extends PromotionConditionRuleSO

externalActionID - String No Identifier of an external action.

externalActionDescription - String No Description of an external action.

externalActionParameterList -List<? extendsExternalActionParameterSO>

No List of external action parametersand their values.

externalActionTextList - List<? extendsExternalActionTextSO> No List of external action texts.

ExternalActionTextSO

textID - String No Identifier for a text that is neededby an external action.

text - String No The text that is needed by anexternal action.

language - String No Language of the text.

ExternalTriggerValuePromotionConditionEligibilitySO extends PromotionConditionEligibilitySO

triggerValueTypeCode - TriggerValueTypeCode No The type of the trigger value.

triggerValue - BigDecimal No The value or amount, respectively.

freeTriggerValueTypeCode - String No The external trigger value typecode.

Get3Pay2PromotionConditionRuleSO extends PromotionConditionRuleSO

toBePaidQuantity - BigDecimal No Number of items which is to bepaid.

ItemPromotionConditionEligibilitySO extends ThresholdPromotionConditionEligibility

itemID - String Yes Unique item identifier.

unitOfMeasureCode - String Yes Unit of measure of an item.

ManualPromotionConditionEligibilitySO extends PromotionConditionEligibilitySO

Page 123: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 123

Name Default Value Data type, range Mandatory Description

triggerType - String Yes Reference to the clients. Arbitraryvalue.

triggerValue - String Yes Reference to the clients. Arbitraryvalue.

thresholdValue 0.0 BigDecimal No

Start value (lower bound) forchoosing.

Not supported by OPP/PPS.

intervalValue 0.0 BigDecimal NoInterval value for choosing.

Not supported by OPP/PPS.

limitValue 0.0 BigDecimal No

Limit value(upper bound) forchoosing.

Not supported by OPP/PPS.

privilegeType - PrivilegeType No

Setting the modification of thediscount.

Not supported by OPP/PPS.

userActionRequiredFlag false Boolean No

Determines whether additionally itis necessary that the user pressesa button in order that the pricederivation rule eligibility is fulfilled.

MarketBasketAmountEligibilitySO extends PromotionConditionEligibilitySO

marketBasketThresholdAmount - BigDecimal Yes

The extended regular sales pricerequired to cause the applicationof the price derivation rule - beforeapplication of the correspondingprice derivation rule.

internalMarketBasketTriggerID - Long NoInternal identifier.

Not supported by OPP/PPS.

MatchingItemRelationSO

itemID - String Yes Identifier of an item.

uomCode - String Yes Unit of measure of an item.

internalPromotionalProductID - Long No Internal generated identifier ofpromotional product.

internalVirtualMhgID - String No Internal generated identifier of amerchandise category.

MatchingItemSO

Page 124: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine124 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

internalRuleID - Long No A identifier for a specific pricederivation rule.

priceModificationPercent 0.0 BigDecimal NoThe percentage modification eachtime this price derivation rule isapplied.

priceModificationAmount 0.0 BigDecimal NoThe monetary discount of themodification each time this pricederivation rule is applied.

newPriceAmount 0.0 BigDecimal No A price modification expressed asa new price.

priceModificationAllocationPercent 0.0 BigDecimal NoThe percentage of the totalmodification from the promotionthat is to be applied.

reductionMethodCode - ReductionMethodMixAndMatch Yes

A code denoting the method ofmodifying the price that is beingapplied.

adjustmentMethodCode - AdjustmentMethodCode No

A mnemonic code denoting whatkind of adjustment is being madeto the regular sales price of theitem.

value 0.0 BigDecimal No

The percentage modification,modification amount, or new priceamount according to thereductionMethodCode.

requiredQuantity 0.0 BigDecimal NoThe count of the item which isneeded in the context of the mixand match.

itemList - List<? extendsMatchingItemRelationSO> No Promotional product: Items.

mhgList - List<? extendsMatchingMhgRelationSO> No Promotional product: Merchandise

categories.

merchandiseSet - MerchandiseSetSO No Promotional product: Productgroups.

matchingItemID - Long Yes Identifier of a matching item.

MatchingMhgRelationSO

mhgID - String Yes Identifier of a merchandisecategory.

mhgQualifier - String Yes Qualifier of a merchandisecategory.

Page 125: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 125

Name Default Value Data type, range Mandatory Description

internalPromotionalProductID - Long No Internal generated identifier ofpromotional product.

internalVirtualMhgID - String No Internal generated identifier of amerchandise category.

MerchandiseSetPromotionConditionEligibilitySO extends ThresholdPromotionConditionEligibility

merchandiseSetID - String Yes Identifier of a product group.

isMixingForbidden - boolean Yes

Indicates that it is not possible tomix different items of the specifiedmerchandise set in order to reachthe required threshold.

merchandiseSet - MerchandiseSetSO No Deprecated.

MerchandiseSetRelationSO

childMerchandiseSetID - Long No Identifier of a child product group.

parentMerchandiseSetID - Long No Identifier of a parent productgroup.

rootMerchandiseSetID - Long No Identifier of the root product group.

merchandiseSetTypeCode - MerchandiseSetTypeCode No Defines type of a product groupelement.

merchandiseSetValue - String No

The content of an element (code ofthe set operation, item identifier,or merchandise categoryidentifier).

merchandiseSetValue2 - String No

Further optional informationregarding to a set element (unit ofmeasure, merchandise categoryqualifier).

MerchandiseSetSO

internalMerchandiseSetGroupID - Long No Identifier of a product group.

internalPromotionalProductID - Long No Identifier of a promotional product.

merchandiseSetID - Long Yes Identifier for the product groupelement.

merchandiseSetElementList -List<? extendsMerchandiseSetRelationSO>

No List of the elements of a productgroup.

MHGPromotionConditionEligibilitySO extends ThresholdPromotionConditionEligibility

Page 126: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine126 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

merchandiseHierarchyGroupIDQualifier - String Yes Qualifier of the merchandise

category.

merchandiseHierarchyGroupID - String Yes Identifier of the merchandisecategory.

thresholdForSingleItemFlag - Boolean Yes

If set to false in a merchandisecategory, the quantity and/or theamount of all eligible items in thetransaction are summarized andchecked against thequantities/amounts indicated inthe price derivation rule eligibility.Otherwise, the quantity and/oramount is summarized individuallyfor each item that triggers thecorresponding price derivation ruleeligibility.

MixAndMatchPromotionConditionRuleSO extends PromotionConditionRuleSO

limitCount - BigDecimal Yes

The maximum number of matchingitems that may be purchasedalong with the item that triggeredthe price derivation rule eligibility.

combinationCode - MixAndMatchCombinationType Yes

Determines how the matchingitems belonging to the pricederivation rule can be combined.

matchingItemList - List<? extendsMatchingItemSO> No List of matching items.

newSetPriceAmount - BigDecimal NoNew price of the set which isdefined by the matching items ofthe promotion price derivation rule.

PositionTypePromotionConditionEligibilitySO extends PromotionConditionEligibilitySO

positionType - PositionType No Type of an item.

PromotionConditionEligibilitySO

InternalEligibilityID - Long Yes Internal identifier of a pricederivation rule eligibility.

typeCode - EligibilityType Yes A code that indicates the type ofthe price derivation rule eligibility.

rootEligibilityID - Long NoReference to the root pricederivation rule eligibility of thecombination eligibility.

parentEligibilityID - Long Yes Reference to the parent eligibility.

Page 127: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 127

Name Default Value Data type, range Mandatory Description

levelID - Short No

Level in the combination eligibilitythe price derivation rule eligibilitybelongs to.

Not supported by OPP/PPS.

effectiveDateTime - Timestamp YesTimestamp when this pricederivation rule eligibility starts tobe effective.

expirationDateTime - Timestamp YesTimestamp when this pricederivation rule stops to beeffective.

statusCode - String Yes Defines the current status of theprice derivation rule eligibility.

negationFlag false Boolean No

Determines whether the pricederivation rule eligibility must befulfilled (false) or not (true) in orderthat the price derivation rule canbe applied.

Not supported by OPP/PPS.

PromotionConditionRuleSO

internalRuleID - Long Yes Internal identifier of the pricederivation rule.

name - String No Name of price derivation rule.

description - String No Description of price derivation rule.

transactionControlBreakCode - RuleControlType Yes

This is a special code thatdetermines when, during the entryof a sale transaction, this pricederivation rule is applied.

statusCode - String Yes Defines the current status for theprice derivation rule.

typeCode - RuleType Yes Defines the type of price derivationrule.

ruleID - String No External identifier of the pricederivation rule.

bonusPointsFlag - Boolean YesDetermines whether a discount orloyalty points are awarded by theprice derivation rule.

roundingMethodCode - RoundingMethodCode No Determines how the calculatedbenefit is to be rounded.

Page 128: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine128 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

decimalPlacesCount - Integer No Requested number of decimalplaces of the calculated benefit.

roundDestinationValue - Integer No

Additional rounding information:

· "1"/null: No additionaltreatment of the roundedresult necessary.

· "5": The rounded result isrounded again to thenext respectively to theprevious multiple of 5.

discountMethodCode - String Yes

Determines how the benefitinfluences the transaction.

· "00"/null: The discountreduces theregular/discount totalamount.

· "01": The discount doesnot influence theregular/discount totalamount or the amountthe customer has to pay,but the customer gets agift certificate about thediscount which can beused for payment thenext time.

· "02": The discount isused as tender for thecurrent transaction, thatis, it reduces the amountthe customer still has topay.

· "03": The rebate reducesthe regular/discount totalamount but it will becounterbalanced by a giftcertificate sale.

· "04": A coupon will begiven to the customerinstead of a discount.Regular/discount totalamount will not bereduced.

Page 129: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 129

Name Default Value Data type, range Mandatory Description

giftCertificateExpirationDate - Date No End of the date range in which thegift certificate is valid.

tenderTypeCode - String NoA code which uniquely identifiesthe type of tender, for example,cash, check, credit card, etc.

prohibitTransactionRelatedPromotionConditionFlag false Boolean No

Determines whether applying thispromotion price derivation ruleinfluences the calculation base ofsubsequent transaction-relatedpromotion price derivation rules(false) or not (true). It is relevantfor line item-related monetarypromotion price derivation rulesonly.

chooseItemMethod null ChooseItemMethod No Determines in which order itemsget a benefit.

noEffectOnSubsequentPromotionConditionFlag - Boolean Yes

Determines whether a promotionprice derivation rule influences thecalculation base of subsequentpromotion price derivation rules(false) or not (true).

calculationBase - CalculationBaseType No

Only influences the calculationbase for transaction-relatedpromotion price derivation rules.Defines how the calculation baseis obtained on the basis of the soldand returned line items in thecontext of a transaction.

couponPrintoutID - String No Identifier of the printout coupon.

couponPrintoutRule - CouponPrintoutRule No The type code of the printout rule.

couponPrintoutText - Object No Formatted text of the printoutcoupon.

considerPreviousPromotionConditionFlag - boolean Yes

Controls whether the conceptbehind the parameternoEffectOnSubsequentPriceDerivationRulesFlag (false) or thecalculationBaseSequence concept(true) is to be considered.

printoutValidityPeriod - BigDecimal No Validity period for printout couponsor gift certificates.

Page 130: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine130 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

tid - Long No

Translation identifier - used for theunique identification oftranslations in the commontranslation table.

externalConditionRuleID - String No External identifier of the promotionprice derivation rule.

Page 131: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 131

Name Default Value Data type, range Mandatory Description

calculationBaseSequence - Long Yes

Determines which one of thepreviously applied modifiers is tobe considered as calculation basefor the current modification. Indetail, the calculation base for thecurrent price derivation rule is tobe determined as following:

· In case that no pricederivation rules wereapplied before, it is theregular sales price orregular total amount.

· <= -2 / null: All pricederivation rules are to beconsidered which wereapplied before thecurrent price derivationrule, that is, thecalculation base for thecurrent price derivationrule equals to thediscount salesprice/discount totalamount of the pricederivation rule which wasapplied just before it – atlatest.

· Otherwise, thecalculation base for thecurrent price derivationrule equals to thediscount salesprice/discount totalamount of that pricederivation rule which wasapplied one or moresteps before it, havingthe highest sequence <=calculationBaseSequence (or the regular salesprice/regular totalamount if no such pricederivation rule wasapplied).

roundingRuleID - Long No

The system-generated identifier ofthe rounding rule which applies fordiscounts/loyalty point countsresulting from applying the pricederivation rule.

Page 132: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine132 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

shareRoundingRuleID - Long No

The system-generated identifier ofthe rounding rule which applies forshares resulting from proratingtransaction-related discounts orloyalty points resulting fromapplying the price derivation rule.

pointsAmountRoundingRuleID - Long No

The system-generated identifier ofthe rounding rule applies formonetary equivalents to loyaltypoint counts resulting fromapplying the price derivation rule.

noPreviousMonetaryDiscountAllowedFlag - boolean Yes

Indicates whether the pricederivation rule is applicable onitems with previously appliedmonetary discounts (false) or not(true).

PromotionConditionSO

promotionID - Long Yes Identifier of a promotion.

conditionID - Long Yes Identifier of a promotion pricederivation rule.

internalRuleID - Long Yes Identifier of a specific pricederivation rule.

internalEligibilityID - Long Yes

Identifier for a price derivation ruleeligibility. It is the identifier of theroot eligibility of the promotionprice derivation rule.

timeGroup - PromotionConditionTimeGroupSO No Time restrictions.

typeCode - String No Code of the promotion pricederivation rule type.

rule - PromotionConditionRuleSO Yes Price derivation rule data.

eligibility - PromotionConditionEligibilitySO No Price derivation rule eligibility data.

sequence - Long Yes Sequence of the promotion forcollision handling.

resolution - Long Yes Resolution of the promotion forcollision handling.

Page 133: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 133

Name Default Value Data type, range Mandatory Description

notShowingFlag - Boolean No

Determines whether the result ofthe applied promotion pricederivation rule is to be suppressedon displays and on the receipt(true) or not (false). For example,line item-related loyalty points arenot printed after each line item,but only summarized at the end ofthe receipt.

description - String No Description of the promotion.

receiptPrinterName - String No Transaction text (overwrites thetransaction text of the promotion).

operatorDisplayName - String NoOperator display text (overwritesthe operator display text of thepromotion).

customerDisplayName - String NoCustomer display text (overwritesthe customer display text of thepromotion).

itemDiscountControlVector - String No Vector to control which items canget that benefit.

saleReturnTypeCode SALES_RETURNS SaleReturnTypeCode No

Determines whether the promotionprice derivation rule can be usedonly for sales, only for returns, orfor both.

amendmentTypeCode SALES_AMENDMENTS AmendmentTypeCode No

Determines whether the promotionprice derivation can be used onlyfor sales, only for amendments, orfor both.

exclusiveFlag - Boolean Yes

Determines whether thispromotion price derivation rule isan exclusive one (true) or not(false).

iconID - String No Identifier of the icon that should bedisplayed as sales information.

concurrenceControlVector - String No

Determines how this promotionprice derivation rule works inrelation to other applicablepromotion price derivation rules.

tid - Long No

Translation identifier – used forthe unique identification oftranslations in the commontranslation table.

Page 134: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine134 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

PromotionConditionTimeGroupSO

internalTimeGroupID - Long Yes Identifier of a time group.

PromotionMhgFilterSO

merchandiseHierarchyGroupID - String Yes Identifier of a merchandisecategory.

merchandiseHierarchyGroupIDQualifier - String Yes Qualifier of a merchandise

category.

PromotionSO

businessUnitGroupID - Long No Identifier of the business unitgroup.

promotionID - String Yes External identifier of thepromotion.

effectiveDateTime - Timestamp YesTime stamp when this pricederivation rule eligibility starts tobe effective.

expirationDateTime - Timestamp YesTime stamp when this pricederivation rule stops to beeffective.

operatorDisplayName - String No Text to be displayed to theoperator.

customerDisplayName - String No Text to be displayed to thecustomer.

receiptPrinterName - String No Text which is to be printed on thereceipt.

origin - String No Origin of the promotion.

description - String No Description of the promotion.

promotionTypeID - String No Identifier of the promotion type.

conditionList - List<? extendsPromotionConditionSO> No List of promotion price derivation

rules.

internalPromotionID - Long Yes Internal identifier of a promotion.

promotionMultiLanguageTexts - List<PromotionTextSO> No List with translations of texts.

PromotionTextSO

description - String No Description of a promotion.

Page 135: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 135

Name Default Value Data type, range Mandatory Description

languageCode - String No Code of the correspondinglanguage.

name - String No Name of the promotion.

receiptText - String No Text to be printed on the receipt.

customerDisplayText - String No Text to be displayed to thecustomer.

operatorDisplayText - String No Text to be displayed to theoperator.

RebatePromotionConditionRuleSO extends PromotionConditionRuleSO

priceModificationMethodCode - PriceModificationMethod YesA code denoting the method ofmodifying the price that is beingapplied to the transaction.

priceModificationAmount - BigDecimal NoThe modification to be applied tothe line item, expressed as amonetary discount.

priceModificationPercent - BigDecimal No

The modification to be applied tothe line item, expressed as apercentage of the regular/discountsales price.

newPriceAmount - BigDecimal NoThe reduction to be applied to theline item, expressed as the newprice for the line item.

adjustmentMethodCode DECREASE AdjustmentMethodCode No

A mnemonic code denoting whatkind of adjustment is being madeto the regular/discount sales priceof the line item.

RoundingRuleDO

Key.businessUnitGroupID - Long No Identifier of the business unitgroup.

Key.roundingRuleID - Long Yes The system-generated identifier ofthe rounding rule.

roundMethodCode - RoundingMethod Yes Defines how the decimal numberis to be rounded.

Page 136: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine136 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name Default Value Data type, range Mandatory Description

multiple - BigDecimal Yes

The absolute difference betweenthe calculated discount beforerounding and after rounding. Cancontain the digit 0 and either 1 or5. Thereby, the digits 1 and 5 doappear at most once in themultiple whereas the digit 0 canappear more often.

ThresholdPromotionConditionEligibility extends PromotionConditionEligibilitySO

thresholdTypeCode - ThresholdType YesA code for the type of thresholdwhich applies to a price derivationrule eligibility.

thresholdQuantity - BigDecimal NoA quantity of a line item required tobe purchased to trigger this pricederivation rule eligibility.

thresholdAmount - BigDecimal NoAn amount of a line item requiredto be purchased to trigger thisprice derivation rule eligibility.

intervalQuantity - BigDecimal NoAn interval quantity for which thisprice derivation rule eligibility istriggered.

intervalAmount - BigDecimal NoAn interval amount for which thisprice derivation rule eligibility istriggered.

limitQuantity - BigDecimal NoThe maximum quantity of a lineitem for which this price derivationrule eligibility is triggered.

limitAmount - BigDecimal NoThe maximum amount of a lineitem for which this price derivationrule eligibility is triggered.

WorkerDiscountGroupPromotionConditionEligibilitySO extends PromotionConditionEligibilitySO

employeeDiscountGroupID - Long No Identifier for a specific employeediscount group.

Page 137: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 137

10.5 Objects and Attributes from the Transaction

Name

DefaultValue

Data type, range Mandatory Description

FrequentShopperPointsModifier

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

Key.frequentShopperPointsModifierSequenceNumber - Short Yes

The sequence number for thisFrequentShopperPointsModifierallowing more than one loyaltypoints' modification to occur oneach line item.

prorateFrom - Short No

The sequence number of theLoyaltyRewardLineItem. Onlyfilled for loyalty point shares oftransaction-related loyalty points.

priceDerivationRuleEligibilityID - Long Yes Identifier of the root pricederivation rule eligibility.

priceDerivationRuleID - Long Yes Identifier of the price derivationrule.

computationBaseAmount 0.0 BigDecimal No Calculation base for thecomputation of the loyalty points.

externalSystemOriginatorFlag false Boolean No

Determines whether this entrywas created by an externalsystem. If true, it must not bechanged, but other pricemodifications with highersequence may be applied.

eligibilityTypeCode - String Yes Type code of the root promotionprice derivation rule eligibility.

frequentShopperPointsEarnedCount 0.0 BigDecimal No The number of loyalty pointsearned.

frequentShopperPointsEarnedAmount 0.0 BigDecimal No

The money equivalent (expressedin local currency) to the numberof loyalty points earned.

Page 138: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine138 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

appliedQuantity 0.0 BigDecimal Yes The quantity the loyalty points'modifier applies to.

pointsPercentage - BigDecimal No

The loyalty points price derivationrule to be applied, expressed as apercentage of the calculationbase.

promotionID - Long No Identifier of a promotion.

triggerSequenceNumber - Short NoThe identifier of the trigger,because one line item can havemore than one trigger.

LoyaltyRewardLineItem

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

promotionID - Long Yes Identifier of a promotion.

priceDerivationRuleID - Long No Identifier of a price derivationrule.

priceDerivationRuleEligibilityID - Long No Identifier of the root pricederivation rule eligibility.

computationBaseAmount 0.0 BigDecimal No Calculation base for thecomputation of the loyalty points.

externalSystemOriginatorFlag false Boolean No

Determines whether this entrywas created by an externalsystem. If true, it must not bechanged, but other pricemodifications with highersequence may be applied.

couponNumber - String No Identifier of the coupon thecustomer gets.

couponAmount 0.0 BigDecimal No The discount of the coupon thecustomer gets.

giftCertificateFaceValueAmount 0.0 BigDecimal No The discount printed orembossed on the gift certificate.

Page 139: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 139

Name

DefaultValue

Data type, range Mandatory Description

pointsPercentage - BigDecimal No

The loyalty points price derivationrule to be applied, expressed as apercentage of the calculationbase.

pointsAwardedCount - BigDecimal No The number of loyalty pointsearned.

loyaltyRewardTypeCode - String No

Describes the kind of loyaltyreward. Possible values includeloyalty points, coupons, and giftcertificates.

frequentShopperPointsEarnedAmount 0.0 BigDecimal No

The money equivalent (expressedin local currency) to the numberof loyalty points earned.

triggerSequenceNumber - Short NoThe identifier of the trigger,because one line item can havemore than one trigger.

ManualPromotionTrigger

triggerType - String Yes Reference to the clients. Arbitraryvalue.

triggerValue - String No Reference to the clients. Arbitraryvalue.

privilegeType - String Yes Defines thePriceModificationMethodTx .

privilegeValue - BigDecimal No Reduction amount, reductionpercent, or new price amount.

reasonCode - String No Reason code for the manualdiscount.

reasonDescription - String No A narrative description describingthe manual discount reason.

reference - String No An additional informationconcerning the trigger.

triggerSequenceAddend - Long No

A value which is to be added tothe sequence of the promotionprice derivation rule (whichcomes from the promotionmaster data).

PriceModificationLineItem

Page 140: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine140 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

priceDerivationRuleID - Long No Identifier of a price derivationrule.

priceDerivationRuleEligibilityID - Long No Identifier of the root pricederivation rule eligibility.

externalSystemOriginatorFlag false Boolean No

Determines whether this entrywas created by an externalsystem. If true, it must not bechanged, but other pricemodifications with highersequence may be applied.

proRatedFlag false Boolean No

Indicates if this price modificationwas prorated across all of the lineitems in the RetailTransaction.Always true.

roundingAmount - BigDecimal No

The discount that the pricemodification was adjusted by(after calculation from thepercentage).

calculationBaseAmount 0.0 BigDecimal No Calculation base for thecomputation of the discounts.

promotionID - Long No Identifier of a promotion.

amount 0.0 BigDecimal No The monetary value of the pricemodification that was computed.

extendedAmountBeforeModification 0.0 BigDecimal NoThe regular/discount totalamount before applying thecurrent price modification.

extendedAmountAfterModification 0.0 BigDecimal NoThe regular/discount totalamount after applying the currentprice modification.

extraAmount 0.0 BigDecimal No

A discount which results fromapplying a price modification thatdoes not affect theregular/discount total amount.

Page 141: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 141

Name

DefaultValue

Data type, range Mandatory Description

percentage - BigDecimal No The percentage value in case ofpercentage price modifiers.

triggerSequenceNumber - Short No

A value which is to be added tothe sequence of the promotionprice derivation rule (whichcomes from the promotionmaster data).

RetailPriceModifier

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

Key.retailPriceModifierSequenceNumber - Short Yes

The sequence number for thisRetailPriceModifier allowing morethan one price modification tooccur on each line item.

priceDerivationRuleID - Long No Identifier of a price derivationrule.

priceDerivationRuleEligibilityID - Long No Identifier of the root pricederivation rule eligibility.

extraAmount 0.0 BigDecimal No

A discount which results fromapplying a price modification thatdoes not affect theregular/discount sales price.

roundingAmount 0.0 BigDecimal NoThe monetary amount that theprice modifier was adjusted bythe rounding.

externalSystemOriginatorFlag false Boolean No

Determines whether this entrywas created by an externalsystem. If true, it must not bechanged, but other pricemodifications with highersequence may be applied.

prorateFrom - Short No

The sequence number of thePriceModificationLineItem. Onlyfilled for discount shares oftransaction-related discounts.

Page 142: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine142 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

calculationBaseAmount 0.0 BigDecimal No Calculation base for thecomputation of the discounts.

reasonCode - String No The reason code for manual priceoverrides.

previousPrice - BigDecimal NoThe regular sales unit price thatwas valid before manual priceoverride.

percent 0.0 BigDecimal No The percentage value in case ofpercentage price modifiers

amount 0.0 BigDecimal No The discount of thisRetailPriceModifier.

calculationMethodCode - String No A type code used to identitymanual price overrides.

adjustmentMethodCode - String No

A mnemonic code denoting whatkind of adjustment is being madeto the regular/discount salesprice of the line item (INCREASE,DECREASE).

newPrice - BigDecimal No Discount sales price of a lineitem.

eligibilityTypeCode - String No The type code of the root pricederivation rule eligibility.

extendedAmountBeforeModification 0.0 BigDecimal NoThe regular/discount sales pricebefore applying the current pricemodification.

extendedAmountAfterModification 0.0 BigDecimal NoThe regular/discount sales priceafter applying the current pricemodification.

appliedQuantity 0.0 BigDecimal Yes The quantity the price modifierapplies to.

promotionID - Long No Identifier of a promotion.

triggerSequenceNumber - Short No

A value which is to be added tothe sequence of the promotionprice derivation rule (whichcomes from the promotionmaster data).

reasonDescription - String No A narrative description describingthe manual discount reason.

Page 143: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 143

Name

DefaultValue

Data type, range Mandatory Description

promotionSequence - Long No Sequence of a promotion pricederivation rule for internal usage.

RetailTransaction

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

retailTransactionCouponSummaryList - List<RetailTransactionCouponSummary

> NoList ofRetailTransactionCouponSummary.

retailTransactionPromotionPriceDerivationRuleList - List<RetailTransactionPromotionPriceDe

rivationRule> NoList ofRetailTransactionPromotionPriceDerivationRule.

promotionManualTriggerList - List<RetailTransactionPromotionTrigger> No

List ofRetailTransactionPromotionTrigger.

retailTransactionLineItemList - List<RetailTransactionLineItem> No List of RetailTransactionLineItem.

retailTransactionTotalList - List<RetailTransactionTotal> No List of RetailTransactionTotal.

retailTransactionCustomerList - List<RetailTransactionCustomer> No List ofRetailTransactionCustomer.

retailTransactionModifierCouponList - List<RetailTransactionModifierCoupon> NoList ofRetailTransactionModifierCoupon.

retailTransactionExternalTriggerList - List<RetailTransactionExternalTrigger> No List ofRetailTransactionExternalTrigger.

promotionTimestamp - Timestamp NoThe time stamp used forpromotion validity checks andcalculation.

RetailTransactionCouponSummary

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.couponNumber - String Yes Identifier of a coupon.

appliedCount - BigDecimal No Number of used coupons.

inputCount 0.0 BigDecimal No Count of registered coupons.

Page 144: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine144 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

privilegeType - String No

Determines how theregular/discount sales price(resp. regular/discount totalamount) is to be calculated incase that the PrivilegeValue isgiven.

privilegeValue - BigDecimal No

Reduction amount, reductionpercent or new price amount –depending on the chosenPrivilegeType.

RetailTransactionCustomer

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.customerID - String Yes Identifier of a customer.

Key.addressTypeCode - String Yes The customer type code.

firstName - String No A person's first name.

lastName - String No A person's surname.

genderType - String No A code for specifying a person'sgender.

birthDayNumber - Integer NoA number in the range 1-31denoting the day of the monthpart of the person's date of birth.

birthMonthNumber - Integer NoA number in the range 1-12denoting the month part of theperson's date of birth.

birthYearNumber - Integer No The year part of the person's dateof birth.

addressTypeDescription - String No The description of the customertype code.

retailTransactionCustomerGroupAssignmentList - List<RetailTransactionCustomerGroupAs

signment> No List of customer groups.

RetailTransactionCustomerGroupAssignment

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Page 145: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 145

Name

DefaultValue

Data type, range Mandatory Description

Key.transactionID - String Yes Identifier of the transaction.

Key.customerID - String Yes Identifier of a customer.

Key.addressTypeCode "00" String Yes The customer type code.

Key.customerGroupID - String Yes Identifier of a customer group.

RetailTransactionExternalTrigger

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.triggerTypeCode - String Yes The type of the TriggerValue.

triggerAmount - BigDecimal Yes The value (amount). Its type isdetermined by TriggerTypeCode.

RetailTransactionLineItem

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

saleReturnLineItem - SaleReturnLineItem No Item.

priceModificationLineItemList - List<PriceModificationLineItem> No List of transaction-relateddiscounts.

loyaltyRewardLineItemList - List<LoyaltyRewardLineItem> No List of transaction-related loyaltypoints.

retailTransactionLineItemAssociationList - List<RetailTransactionLineItemAssociati

on> No

List of associative entitiesrecording relationships betweenline items within the sameRetailTransaction.

retailTransactionLineItemTypeCode - String YesA code to denote the type of retailtransaction line item, such assale/return, void, tender.

voidFlag false Boolean NoA boolean indicator that tells ifthis line item is voided (true) ornot (false).

Page 146: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine146 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

beginDateTimestamp - Timestamp No The start time of theRetailTransactionLineItem.

entryMethodCode - String No

A retailer assigned code todenote how theRetailTransactionLineItem wasentered at the workstation.

workstationID - String No Identifier of the workstationwhere the line item was create.

workstationTypeCode - String No Type of the workstation where theline item was created.

keyedOfflineCode - String NoA code that indicates theonline/offline state when thetransaction was completed.

RetailTransactionLineItemAssociation

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.lineItemSequenceNumber - Short Yes The sequence number of lineitem.

Key.toLineItemSequenceNumber - Short Yes The sequence number of thelinked line item.

Key.lineItemAssociationTypeCode - String YesA retailer assigned code denotingthe relationship between the twoitems.

Key.toBusinessUnitGroupID - Long Yes Identifier for the business unitgroup of the linked transaction.

toTransactionID - String No The transaction identifier of thelinked transaction.

RetailTransactionModifierCoupon

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.promotionID - Long Yes Identifier of a promotion.

Key.priceDerivationRuleID - Long Yes Identifier of a price derivationrule.

Page 147: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 147

Name

DefaultValue

Data type, range Mandatory Description

Key.priceDerivationRuleEligibilityID - Long Yes Identifier of the root pricederivation rule eligibility.

Key.couponSequenceNumber - Short Yes

The sequence number of acoupon entry (starting with 1), incase there was more than onecoupon registered for one pricemodifier.

couponNumber - String No Identifier of a coupon.

RetailTransactionPromotionExternalActionParameter

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.promotionID - Long Yes Identifier of a promotion.

Key.priceDerivationRuleID - Long Yes Identifier of a price derivationrule.

Key.priceDerivationRuleEligibilityID - Long Yes Identifier of the root pricederivation rule eligibility.

Key.parameterID - String Yes Identifier of an external actionparameter.

parameterValue - String Yes The value of the parameter.

RetailTransactionPromotionExternalActionText

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.promotionID - Long Yes Identifier of a promotion.

Key.priceDerivationRuleID - Long Yes Identifier of a price derivationrule.

Key.priceDerivationRuleEligibilityID - Long Yes Identifier of the root pricederivation rule eligibility.

Key.textID - String Yes Identifier of an external actiontext.

text - String Yes Text for an external action.

Page 148: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine148 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

language - String No Language of the external actiontext.

RetailTransactionPromotionPriceDerivationRule

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.promotionID - Long Yes Identifier of a promotion.

Key.priceDerivationRuleID - Long Yes Identifier of a price derivationrule.

Key.priceDerivationRuleEligibilityID - Long Yes Identifier of the root pricederivation rule eligibility.

promotionDescription - String No Description of a promotion.

receiptPrinterName - String No Text to be printed on the receipt.

promotionPriceDerivationRuleSequence - Long No Sequence - for collision handling.

couponPrintoutText - Object No The formatted text of the printoutcoupon.

promotionPriceDerivationRuleResolution - Long No Resolution - for collision handling

promotionPriceDerivationRuleTypeCode - String No The type code of the promotion

price derivation rule.

transactionControlBreakCode - String No

This type code defines the basefor applying the promotion pricederivation rule and it defines thecalculation time.

priceModificationMethodCode - String No

A code denoting the method ofmodifying the price that is beingapplied to the transaction resp.line item (seePriceModificationMethodTx).

priceDerivationRuleDescription - String No Business description for this pricederivation rule.

promotionOriginatorTypeCode - String No The type code of the originator ofthe promotion.

Page 149: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 149

Name

DefaultValue

Data type, range Mandatory Description

externalPromotionID - String No The external identifier of thepromotion.

externalPriceDerivationRuleID - String No The external identifier of the pricederivation rule.

triggerQuantity 0.0 BigDecimal No

The quantity of items fulfilling theprice derivation rule eligibilitywhich is required to be purchasedto trigger it.

giftCertificateExpirationDate - Timestamp No End of the date range in whichthe gift certificate is valid.

Page 150: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine150 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

discountMethodCode - Boolean No

Determines how the discountinfluences the transaction.

· "00"/null: The discountreduces theregular/discount totalamount.

· "01": The discount doesnot influence theregular/discount totalamount or the amountthe customer has topay, but the customergets a gift certificateabout the discountwhich can be used forpayment the next time.

· "02": The discount isused as tender for thecurrent transaction, thatis, it reduces theamount the customerstill has to pay.

· "03": The rebatereduces theregular/discount totalamount but it will becounterbalanced by agift certificate sale.

· "04": A coupon will begiven to the customerinstead of a discount.Regular/discount totalamount will not bereduced.

frequentShopperPointsFlag false Boolean No

Determines whether a discount orloyalty points are awarded by theprice derivation rule (seebonusPointsFlag).

customerGroupLoyaltyPointsDefaultQuantity 0.0 BigDecimal No The count of default loyalty points

assigned to the customer group.

Page 151: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 151

Name

DefaultValue

Data type, range Mandatory Description

prohibitPrintFlag false Boolean No

Determines whether the result ofthe applied promotion pricederivation rule is to besuppressed on displays and onthe receipt (true) or not (false).For example, line item-relatedloyalty points are not printed aftereach line item, but onlysummarized at the end of thereceipt (see notShowingFlag).

tenderTypeCode - String NoA code which uniquely identifiesthe tender in case of discount astender.

promotionTypeName - String No Name of promotion type.

calculationBase - String No

Only influences the calculationbase for transaction-relatedpromotion price derivation rules.Defines how the calculation baseis obtained on the basis of thesold and returned line items inthe context of a transaction.

pointsConversionAmount 0.0 BigDecimal NoExchange rate for the conversionfrom loyalty points into localcurrency.

noEffectOnSubsequentPriceDerivationRulesFlag false Boolean No

Determines whether applying thisprice derivation rule influencesthe calculation base ofsubsequent price derivation rules(false) or not (true).

prohibitTransactionRelatedPriceDerivationRulesFlag false Boolean No

Determines whether applying thisprice derivation rule influencesthe calculation base ofsubsequent transaction-relatedprice derivation rules (false) ornot (true). It is relevant for lineitem-related monetary promotionprice derivation rules only.

couponPrintoutID - String No The identifier of the printoutcoupon.

couponPrintoutRule - String No The type code of the printout rule.

exclusiveFlag false Boolean NoDetermines whether this pricederivation rule is an exclusive one(true) or not (false).

Page 152: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine152 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

requireUserInteractionFlag false Boolean No

Determines whether anadditional user interaction(pressing a button) is necessaryin order to fulfill the eligibility forapplying the price derivation rule(true) or not (false).

considerPreviousPriceDerivationRulesFlag false Boolean No

Controls whether the conceptbehind the parameternoEffectOnSubsequentPriceDerivationRulesFlag (false) or thecalculationBaseSequenceconcept (true) is to beconsidered.

concurrenceControlVector - String No

Determines how this promotionprice derivation rule works inrelation to other applicablepromotion price derivation rules.

appliedCount 0.0 BigDecimal No Describes how often the currentprice derivation rule was applied.

printoutValidityPeriod 0.0 BigDecimal NoDescribes how long (how manydays) the printed coupon/giftcertificate is valid.

externalActionID - String No The identifier of the action whichis to be performed by the client.

externalActionDescription - String NoThe description of the actionwhich is to be performed by theclient.

externalActionTextList - List<RetailTransactionPromotionExternalActionText> No The texts for the action which is

to be performed by the client.

externalActionParameterList - List<RetailTransactionPromotionExternalActionParameter> No

The parameters for the actionwhich is to be performed by theclient.

promotionMultiLanguageTexts - List<PromotionTextSO> No List of translated texts.

Page 153: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 153

Name

DefaultValue

Data type, range Mandatory Description

calculationBaseSequence - Long No

Determines which one of thepreviously applied modifiers is tobe considered as calculationbase for the current modification.In detail, the calculation base forthe current price derivation rule isto be determined as following:

· In case that no pricederivation rules wereapplied before, it is theregular sales price orregular total amount.

· <= -2 / null: All pricederivation rules are tobe considered whichwere applied before thecurrent price derivationrule, that is, thecalculation base for thecurrent price derivationrule equals to thediscount salesprice/discount totalamount of the pricederivation rule whichwas applied just beforeit – at latest.

· Otherwise, thecalculation base for thecurrent price derivationrule equals to thediscount salesprice/discount totalamount of that pricederivation rule whichwas applied one ormore steps before it,having the highestsequence <=calculationBaseSequence (or the regular salesprice/regular totalamount if no such pricederivation rule wasapplied).

RetailTransactionPromotionTrigger extends ManualPromotionTrigger

Page 154: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine154 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.triggerSequenceNumber - Short YesThe identifier of the triggerbecause a transaction can havemore than one trigger.

RetailTransactionTotal

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.transactionTotalTypeCode - String YesA unique assigned mnemonicidentifier that identifies theTransactionTotalType.

amount - BigDecimal No The monetary value of theeffective total amount.

ReturnLineItem

SaleReturnLineItem

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

frequentShopperPointsModifierList - List<FrequentShopperPointsModifier> No List ofFrequentShopperPointsModifier.

saleReturnLineItemModifierReferenceList - List<SaleReturnLineItemModifierRefere

nce> NoList ofSaleReturnLineItemModifierReference.

retailPriceModifierList - List<RetailPriceModifier> No List of RetailPriceModifier.

saleReturnLineItemMerchandiseHierarchyGroupList - List<SaleReturnLineItemMerchandiseHi

erarchyGroup> NoList ofSaleReturnLineItemMerchandiseHierarchyGroup.

saleReturnLineItemSalesOrder - SaleReturnLineItemSalesOrder No Information about a customerorder related to this line item.

Page 155: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 155

Name

DefaultValue

Data type, range Mandatory Description

saleReturnLineItemPromotionTriggerList - List<SaleReturnLineItemPromotionTrigg

er> NoList ofSaleReturnLineItemPromotionTrigger.

saleReturnLineItemModifierCouponList - List<SaleReturnLineItemModifierCoupon

> NoList ofSaleReturnLineItemModifierCoupon.

itemID - String No Identifier of an item.

quantity 0 Integer Yes Quantity of a line item.

extendedAmount 0.0 BigDecimal NoThe product of the quantity timesthe discount sales price of anitem.

extendedDiscountAmount - BigDecimal NoThe monetary discount of all lineitem-related discounts that wereapplied to this line item.

actionCode - String Yes A code denoting the sign of theline item.

itemType - String Yes The type code of the line item.

units - BigDecimal No The number of units sold.

notConsideredByLoyaltyEngineFlag false Boolean NoDetermines whether the PCEshould care about the line itemas a trigger (false) or not (true).

priceTypeCode - String No The price type code.

discountFlag false Boolean NoA flag to indicate whether this lineitem can be discounted (false) ornot (true).

grandExtendedAmount 0.0 BigDecimal No The line item total including taxesand discounts.

discountTypeCode - String Yes A code to control which items canget that benefit.

frequentShopperPointsEligibilityFlag false Boolean NoA flag to denote that the line itemis eligible for loyalty points (false)or not (true).

quantityInputMethod - String No Determines how the input ofquantity was done on the client.

Page 156: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine156 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

mainMerchandiseHierarchyGroupIDQualifier - String No

A qualifier which is used to differbetween merchandise categoriesbelonging to different functionsbut having the same identifier.

mainMerchandiseHierarchyGroupID - String No Unique system assigned identifierfor the merchandise category.

unitOfMeasureCode - String YesThe code used to specify the unitof the item (seeUnitOfMeasureCode).

regularUnitPrice 0.0 BigDecimal No The regular sales unit price of theline item.

actualUnitPrice - BigDecimal Yes The current discount sales unitprice of the line item.

SaleReturnLineItemMerchandiseHierarchyGroup

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

Key.merchandiseHierarchyGroupID - String Yes Identifier of a merchandisecategory.

Key.merchandiseHierarchyGroupIDQualifier - String Yes Qualifier of a merchandise

category.

timeStampEffective - Timestamp No The timestamp when thisassignment becomes active.

timeStampExpiration - Timestamp No The timestamp when thisassignment becomes inactive.

statusCode - String No

Defines the current status for theassignment.

Valid codes include:

· AC/null: Active.

· IA: Inactive.

SaleReturnLineItemModifierCoupon

Page 157: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 157

Name

DefaultValue

Data type, range Mandatory Description

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

Key.modifierSequenceNumber - Short Yes The sequence number of therelated modifiers.

Key.promotionID - Long Yes Identifier of a promotion.

Key.priceDerivationRuleID - Long Yes Identifier of a price derivationrule.

Key.priceDerivationRuleEligibilityID - Long Yes Identifier of the root pricederivation rule eligibility.

Key.couponSequenceNumber - Short Yes

The sequence number of thecoupon entry (starting with 1), incase there was more than onecoupon registered for onemodifier.

couponNumber - String Yes Identifier of a coupon.

SaleReturnLineItemModifierReference

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.promotionID - Long Yes Identifier of a promotion.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

Key.priceDerivationRuleID - Long Yes Identifier of a price derivationrule.

Key.priceDerivationRuleEligibilityID - Long Yes Identifier of the root pricederivation rule eligibility.

referenceQuantity 0.0 BigDecimal Yes

The quantity share of that lineitem which was necessary forfulfilling the price derivation ruleeligibilities.

Page 158: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine158 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

Name

DefaultValue

Data type, range Mandatory Description

SaleReturnLineItemPromotionTrigger extends ManualPromotionTrigger

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

Key.triggerSequenceNumber - Short YesThe identifier of the trigger,because one line item can havemore than one trigger.

SaleReturnLineItemSalesOrder

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.retailTransactionLineItemSequenceNumber - Short Yes

The sequence number of lineitem within the context of thisRetailTransaction.

requestedDeliveryDate - Timestamp No The delivery date that wasrequested by the customer.

salesOrderTypeCode - String No The type code of the related salesorder.

salesOrderDeliveryTypeCode - String Yes The delivery type code of therelated sales order.

Transaction

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

retailTransaction - RetailTransaction Yes Retrieve the relatedRetailTransaction.

transactionTypeCode - String No A code to denote the type oftransaction.

transactionCategoryList - List<TransactionCategory> No List of transaction categories.

beginDateTimestamp - Timestamp No The time and date a transactionis initiated.

Page 159: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

Functional Guide for the Promotion Calculation CUSTOMERContent © 2016 SAP SE or an SAP affiliate company. All rights reserved. 159

Name

DefaultValue

Data type, range Mandatory Description

workstationID - String NoIdentifier of the workstationwhere the transaction wascreated.

TransactionCategory

Key.businessUnitGroupID - Long Yes Identifier of the business unitgroup.

Key.transactionID - String Yes Identifier of the transaction.

Key.transactionCategoryCode - String Yes The code representing thetransaction category.

Page 160: Functional Guide for the Promotion Calculation Engine - SAP · CUSTOMER Functional Guide for the Promotion Calculation Engine ... 10.3 Transaction Data Codes ... CUSTOMER Functional

CUSTOMER Functional Guide for the Promotion Calculation Engine160 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content

www.sap.com/contactsap

© 2016 SAP SE or an SAP affiliate company. All rights reserved.No part of this publication may be reproduced or transmitted in any form or forany purpose without the express permission of SAP SE or an SAP affiliate company.SAP and other SAP products and services mentioned herein as well as theirrespective logos are trademarks or registered trademarks of SAP SE (or an SAPaffiliate company) in Germany and other countries. All other product and servicenames mentioned are the trademarks of their respective companies. Please seehttp://www. sap.com/corporate-en/legal/copyright/index.epx#trademark foradditional trademark information and notices.

Material Number: