sdk promotion calculation engine
TRANSCRIPT
SDK Promotion Calculation Engine
2 © 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, pushbuttons
labels, 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 of
variables 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 in
the documentation.
<Example> Variable user entry. Angle brackets indicate that you replace these words and characters with
appropriate entries to make entries in the system.
EXAMPLE Keys on the keyboard, for example, F2 or ENTER .
SDK Promotion Calculation Engine
Document History © 2016 SAP SE or an SAP affiliate company. All rights reserved. 3
Document History
Version Date Change
1.0 2016-08-31 Initial Version
1.1 2016-11-25 Enhancement of the following chapters:
Collision Resolution (chapter 1.2.1.8)
Condition Restrictions (chapter 1.2.1.9)
Custom Extension Map (chapter 4.4.3)
SDK Promotion Calculation Engine
4 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Content
1 Getting Started ................................................................................................................... 7
1.1 Introduction ....................................................................................................................... 7
1.2 Overview ............................................................................................................................ 8
1.2.1 Loyalty Engine ...................................................................................................... 9
1.3 Artifacts ............................................................................................................................ 14
1.4 Integration ....................................................................................................................... 15
1.5 Dependencies .................................................................................................................. 15
2 Configuration ................................................................................................................... 16
2.1 Introduction ..................................................................................................................... 16
2.2 Configuration ................................................................................................................... 16
2.2.1 PromotionServiceConfig .................................................................................... 16
3 Message Logging and Error Handling .............................................................................. 20
3.1 Introduction ..................................................................................................................... 20
3.2 Message Logging .............................................................................................................. 20
3.3 Error Handling .................................................................................................................. 21
3.3.1 Business Errors .................................................................................................. 21
3.3.2 Technical Errors ................................................................................................. 23
4 Extension Guide ............................................................................................................... 25
4.1 Overview .......................................................................................................................... 25
4.1.1 Introduction ....................................................................................................... 25
4.1.2 API components ................................................................................................ 26
4.1.3 Beans ................................................................................................................. 27
4.2 API patterns ..................................................................................................................... 30
4.2.1 Introduction ....................................................................................................... 30
4.2.2 Abstract factory ................................................................................................. 30
4.2.3 Delegate ............................................................................................................. 30
4.3 Context ............................................................................................................................. 32
4.3.1 Introduction ....................................................................................................... 32
4.3.2 Life cycle ............................................................................................................ 32
4.3.3 Context elements .............................................................................................. 32
4.4 Custom extension map .................................................................................................... 33
4.4.1 Introduction ....................................................................................................... 33
4.4.2 Mapped elements ............................................................................................. 33
4.4.3 Example: Adding ItemDomainSpecific into custom extension map.................. 36
4.5 Object factories ................................................................................................................ 37
4.5.1 Introduction ....................................................................................................... 37
4.5.2 Available Object factories .................................................................................. 37
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 5
4.5.3 Example ............................................................................................................. 38
4.6 Data access layer .............................................................................................................. 39
4.6.1 Introduction ....................................................................................................... 39
4.6.2 Data mapping .................................................................................................... 40
4.7 Transaction analyzer ........................................................................................................ 41
4.7.1 Introduction ....................................................................................................... 41
4.7.2 Class diagram ..................................................................................................... 41
4.7.3 Spring bean configuration ................................................................................. 42
4.7.4 Add new transaction analyzer ........................................................................... 42
4.7.5 Example ............................................................................................................. 42
4.8 Eligibility loader ................................................................................................................ 44
4.8.1 Introduction ....................................................................................................... 44
4.8.2 Class diagram ..................................................................................................... 44
4.8.3 Spring bean configuration ................................................................................. 44
4.8.4 Add new eligibility loader .................................................................................. 45
4.8.5 Example ............................................................................................................. 45
4.9 Calculation Rule ............................................................................................................... 47
4.9.1 Introduction ....................................................................................................... 47
4.9.2 Class diagram ..................................................................................................... 47
4.9.3 Spring bean configuration ................................................................................. 48
4.9.4 Add new calculation rule ................................................................................... 48
4.9.5 Example ............................................................................................................. 48
4.10 Price Modification ............................................................................................................ 50
4.10.1 Introduction ....................................................................................................... 50
4.10.2 Class diagram ..................................................................................................... 50
4.10.3 Spring bean configuration ................................................................................. 51
4.10.4 Add new price modification .............................................................................. 51
4.10.5 Example ............................................................................................................. 51
4.11 Transaction update handler ............................................................................................. 54
4.11.1 Introduction ....................................................................................................... 54
4.11.2 Class diagram ..................................................................................................... 54
4.11.3 Spring bean configuration ................................................................................. 54
4.11.4 Exchange TransactionUpdateHandler ............................................................... 55
4.11.5 Example ............................................................................................................. 55
4.12 Promotion Condition Rule ............................................................................................... 57
4.12.1 Introduction ....................................................................................................... 57
4.12.2 Adaptation of pricing-engine-dataaccess-sap ................................................... 57
4.12.3 Adaptation of pricing-engine-core-services ...................................................... 57
5 Domain Object Model ...................................................................................................... 58
5.1 Domain Object - Transaction ........................................................................................... 58
5.1.1 Introduction ....................................................................................................... 58
5.1.2 Relationship ....................................................................................................... 59
5.1.3 Object Details .................................................................................................... 63
5.1.4 Data ................................................................................................................... 63
SDK Promotion Calculation Engine
6 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.2 Transaction Calculation Rules ........................................................................................ 228
5.2.1 Introduction ..................................................................................................... 228
5.2.2 Business Process .............................................................................................. 228
5.3 Domain Object - Promotion ........................................................................................... 233
5.3.1 Introduction ..................................................................................................... 233
5.3.2 Data ................................................................................................................. 233
5.4 Domains ......................................................................................................................... 280
5.4.1 Introduction ..................................................................................................... 280
5.4.2 Domains ........................................................................................................... 280
6 Client API ........................................................................................................................ 286
6.1 Introduction ................................................................................................................... 286
6.2 Communication Methods .............................................................................................. 286
6.2.1 Expected Structure .......................................................................................... 286
6.2.2 Mapping of internal data to/from the interface ............................................. 289
7 Glossary .......................................................................................................................... 321
7.1 Introduction ................................................................................................................... 321
7.2 Glossary .......................................................................................................................... 321
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 7
1 Getting Started
1.1 Introduction
The Promotion Calculation Engine is a central component providing price determination functionality. The
highly configurable component allows the calculation of price data based on a large number of parallel
promotion rules.
The process is as follows:
The caller (for example, a POS application) provides a transaction with line items and other relevant data as
a request. The Promotion Calculation Engine subsequently identifies the applicable promotions.
Based on the appropriate price rules, the Engine calculates the final price for each line item and returns the
result of the calculations as a response.
SDK Promotion Calculation Engine
8 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
1.2 Overview
This section provides an overview about the main steps of a price determination operation.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 9
1.2.1 Loyalty Engine
The Loyalty Engine as the core of the Promotion Calculation Engine is responsible for price determination.
In detail, the following steps are performed:
1.2.1.1 LoyaltyEngineRequest
The caller passes an instance of this object to the Loyalty Engine. The LoyaltyEngineRequest contains all
information needed to start processing.
1.2.1.2 Analyze transaction
In this step, the transaction is analyzed by configured transaction analyzer. The purpose of the transaction
analyzer is to check the sales transaction for certain data needed for further processing like loading of
eligibilities or calculation of rules. The right place for storing results is Context.transactionAnalyzerContext.
The list of injected transaction analyzers is executed within the method executeTransactionAnalyzer by
iterating of it. The execution is triggered by calling the method TransactionAnalyzer.execute(...).
1.2.1.3 Check Eligibilities
In this step, the stored data in Context.transactionAnalyzerContext is checked by EligibilityLoaders to load
certain types of eligibilities, to register and - in case that all conditions are fulfilled - to activate them.
SDK Promotion Calculation Engine
10 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
The list of injected eligibility loaders is executed within the method executeEligibilityLoader by iterating of it.
Internally, the following steps are common for all EligibilityLoaders:
1. Load eligibility: This is typically done via the Data Access Service. Per eligibility type, the Data Access Service
provides specific access methods (for example, for item eligibilities dataAccessService.getItemEligibilities(...)).
2. Register eligibility
3. Check eligibility constraints. If all constraints are fulfilled
o the eligibility is activated.
o If parent eligibilities exist, they are rechecked and if possible they are activated.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 11
1.2.1.4 Load conditions
In this step, the stored data in Context.promotionConditionContext is checked by ConditionLoader.
Internally, the following steps are common for the ConditionLoader:
Load conditions for given eligibility. This is typically done via the Data Access Service, per eligibility ID. The Data
Access Service provides an access method dataAccessService.getPromotionConditions(...).
Get condition for a activated eligibility
register loaded condition
1.2.1.5 Rules Execution
The calculation rules define specific behaviors for each ERuleType. That means there should be one matching
CalculationRule implementation class for each possible ERuleType (RB, MM, EX, etc.).
The rule-specific behaviors are checked at several places during the Loyalty Engine processing flow (load
conditions, discount distribution, condition restrictions evaluation and others).
SDK Promotion Calculation Engine
12 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
1.2.1.6 Price modifications
The price modifications define how discounts are calculated according to the EPriceModificationMethod (for
RebatePromotionConditionRuleSO condition rules) or EReductionMethodMixAndMatch (for mix and match
rules). That means there should be one matching PriceModification implementation class for each possible
price modification method (EPriceModificationMethod.PS, EPriceModificationMethod.RP,
EPriceModificationMethod.RT, etc.). The price modification methods are called when applying rules and
calculating discounts for line items or discount distribution.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 13
1.2.1.7 LoyaltyEngineResponse
The LoyaltyEngineResponse is returned to the caller.
It contains the updated transaction object with the calculated price information.
1.2.1.8 Collision Resolution
The collision resolution is performed after the Price modification phase if more than one item was rebated.
It may occur that several line item related or several receipt related conditions with the same sequence and
the same resolution apply simultaneously. If so, a best-price calculation is performed, the goal of which is to
determine the best possible price.
The bestPriceLookup method in class PromotionCalculatorImpl provides an entry point for this purpose:
SDK Promotion Calculation Engine
14 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
PromotionCalculatorImpl.bestPriceLookup(Context, AbstractSummaryResult, boolean)
If a user-defined behavior shall take place for the same resolution and sequence number, the
bestPriceLookup method can be replaced.
1.2.1.9 Condition Restrictions
The resolution of the Condition Restrictions is performed after the Price modification phase.
If an exclusive line item related condition is applied, all line item related conditions with a higher sequence
and (ConcurrenceControlVector = null or ConcurrenceControlVector[3] = 0) which also apply for the line
item, cannot be applied. However, line item related conditions with a smaller sequence or
ConcurrenceControlVector[3] = 1 can be applied. Receipt related conditions can be applied anyway.
1.3 Artifacts
The Promotion Calculation Engine consists of the following artifacts:
api-bundle
The api-bundle artifact provides the required interfaces.
component
The component artifact serves as a container for the Spring context files.
core
The core artifact contains the main components, standard classes, and mappings.
dataaccess-sap
The dataaccess-sap artifact implements the SAP connection and thus serves as the data access layer.
dep-bundle
The dep-bundle artifact bundles the dependencies.
psi-sap
The psi-sap artifact implements the Pricing Service interface.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 15
1.4 Integration
The Promotion Calculation Engine artifacts and beans are started automatically by integrating the Promotion
Calculation Engine application context into the context of the parent application.
The related context files are included in the component artifact mentioned above.
The following application context snippet shows how to integrate it:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
...
<!-- Promotion Calculation Engine application context -->
<import resource="classpath:/com.gk-software.pricing-engine/component/beans.xml" />
...
</beans>
1.5 Dependencies
The following libraries are required by the Promotion Calculation Engine:
Group Artifact Type Minimum Version
commons-collections commons-collections jar 3.2.2
commons-lang commons-lang jar 2.6
commons-logging commons-logging jar 1.1.1
org.springframework spring-beans, spring-context, spring-txt jar 3.0.6.RELEASE
com.google.guava guava jar 12.0
joda-time joda-time jar 2.6
javax.ws.rs javax.ws.rs-api jar 2.0-m10
SDK Promotion Calculation Engine
16 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
2 Configuration
2.1 Introduction
This chapter describes the configuration of the Promotion Calculation Engine.
2.2 Configuration
2.2.1 PromotionServiceConfig
2.2.1.1 Configuration as input parameter
It is possible to hand over the configuration described below as an input parameter object to the Promotion
Calculation Engine when calling it. When doing so, the complete configuration must be handed over as no
configuration files available at service site are considered in this case.
2.2.1.2 Configuration by configuration files
It is also possible to determine the configuration by means of configuration files available at service site.
Configuration by files works as follows:
There must exist a default configuration file. This is used as a fallback in case that no more granular
configuration information is available. If no default configuration file exists, the calculation will not be
performed.
Furthermore, there may exist workstation-specific configuration files. As it cannot be ensured that the
workstation numbers are unique over all business units, the configuration files for the workstations of a
business unit are encapsulated in a directory identifying the business unit. Workstation-specific configuration
files may contain a subset of the possible parameters only.
In case that a parameter is maintained on workstation level, this value is considered. Otherwise, the value
found for the parameter in the default configuration file is considered.
Note that configuration files are not currently used.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 17
Parameter Name Data type, Range Description Default
enabled Boolean It defines the enabled flag. True
pointsFactor Double It defines the factor of standard bonus points (to
distinguish between standard & multiple points).
Default is 1 (1 point for 1 EUR).
It defines the factor which is used for the
multiplication with “percentage” points (standard
and multiple points).
It defines fixed points which are not multiplied with
this factor.
1.0
pointsRating Double It defines the rating to calculate money equivalent
of points.
0.01
itemChooseMethod Lowest
Highest
LowestPerInterval
HighestPerInterval
It defines the order in which benefits apply to
items:
Lowest = take first items with lowest
price (lowest benefit first)
Highest = take first items with highest
price (highest benefit first)
LowestPerInterval = lowest benefit per
interval first
HighestPerInterval = highest benefit per
interval first
Lowest
transactionRebateMethod Total
Trigger
Specifies how to determine the calculation base of
the receipt related discount:
Total = Receipt total
Trigger = Via triggers
Trigger
timeValidationMethod Promotion
Eligibilities
Method to determine the validity level of a
condition:
Promotion
Eligibilities
Promotion
nonPieceItemPerPosition Boolean It specifies whether the percent rebate for non-
piece items should be calculated per position
('true') or per item unit ('false'). (Default is 'false').
False
priceTypeCodesWithoutDiscounts string List of price types generally not considered by the
Loyalty Server (real, manually entered prices).
SDK Promotion Calculation Engine
18 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Parameter Name Data type, Range Description Default
rebateShareRoundingMethod Down
Up
Commercial
It defines the rounding method for rebate shares
(not used for points):
Commercial = standard (half up)/
commercial rounding
Down = Truncate
Up = Round up
0
rebateShareDecimalPlacesCount Integer (0 - 4) It defines the number of decimal places (0 - 4) for
rebate splitting
Possible values: 0 - 4
2
rebateShareRoundingDestinationValue Integer It defines the rounding destination value for rebate
shares, which are used to round the value to the
proper denomination (not used for points).
Example: decimal places = 2, destination value = 5 -
> the value will be rounded to 0.05 denomination.
(Default is 1)
Additional rounding information:
1 = There is no further handling of the
rounding result.
5 = The rounding result is adjusted to
correspond to the preceding or
subsequent multiple of 5.
1
pointsShareRoundingMethod Down
Up
Commercial
It defines the rounding method for points shares:
Commercial = standard (half up)/
commercial rounding
Down = Truncate
Up = Round up
0
pointsShareDecimalPlacesCount Integer (0-4) It defines the number of decimal places (0 - 4) for
points splitting.
Possible values: 0 - 4
0
conditionLimit Long It defines the limit of conditions for the best price
calculation. The best price calculation is just
calculated if there is more than one promotion that
conflicts in the same condition.
100
If PriceDerivationRule.CalculationBaseSequence is not null:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 19
The calculation base for the current price derivation rule equals to the new price of that price derivation
rule, which was applied one or more steps before it having the highest sequence
RetailTransactionPromotionPriceDerivationRule.PromotionPriceDerivationRuleSequence <=
PriceDerivationRule.CalculationBaseSequence (or the original price if no such price derivation rule was
applied).
SDK Promotion Calculation Engine
20 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
3 Message Logging and Error Handling
3.1 Introduction
This chapter describes the message logging and the handling of business and technical errors.
3.2 Message Logging
The Promotion Calculation Engine uses Apache Commons Logging to abstract the logging. There exist a lot of
bridges for specific log frameworks like log4j, log4j2, slf4j, a.s.o. It depends on the integration scenario which
bridge is used.
The following tables gives an overview of important log configuration with example configuration for log4j.
For enabling or disabling logging, all classes in package com.gk_software.loyalty_engine are relevant.
Basically, the following logger configuration is sufficient to enable or disable the whole Promotion
Calculation Engine logging:
com.gk_software.loyalty_engine=TRACE|DEBUG|INFO|WARN|ERROR|FATAL|OFF
com.gk_software.pricing_engine=TRACE|DEBUG|INFO|WARN|ERROR|FATAL|OFF
If only logging of specific content/classes is desired, the general logger mentioned above is not sufficient and
should be turned OFF.
The following table gives an overview of specific loggers and their content:
Logger Description
com.gk_software.loyalty_engine.LoyaltyEngine
LEVEL: TRACE|DEBUG
Shows start and end of processing and
entire transaction.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 21
Logger Description
com.gk_software.loyalty_engine.analyzer
LEVEL: DEBUG
Specific loggers:
com.gk_software.loyalty_engine.analyzer.CouponTransactionAnalyzer
com.gk_software.loyalty_engine.analyzer.CustomerGroupTransactionAnalyzer
com.gk_software.loyalty_engine.analyzer.ExternalPromotionsTransactionAnalyzer
com.gk_software.loyalty_engine.analyzer.ItemTransactionAnalyzer
Shows information about analyzed data
for all analyzers, for example, Item-IDs,
MHG-IDs, and so on.
com.gk_software.loyalty_engine.eligibility_loader
LEVEL: DEBUG
Specific loggers:
com.gk_software.loyalty_engine.eligibility_loader.CouponEligibilityLoader
com.gk_software.loyalty_engine.eligibility_loader.CustomerGroupEligibilityLoader
com.gk_software.loyalty_engine.eligibility_loader.ItemEligibilityLoader
com.gk_software.loyalty_engine.eligibility_loader.MarketBasketAmountEligibilityLoader
com.gk_software.loyalty_engine.eligibility_loader.MerchandiseGroupEligibilityLoader
com.gk_software.loyalty_engine.eligibility_loader.MerchandiseSetEligibilityLoader
Shows information about loaded
eligibilities and whether they are valid,
activated, or not activated.
com.gk_software.loyalty_engine.PromotionCalculatorImpl
LEVEL: TRACE|DEBUG
Shows detailed information for calculation
of line item and transaction promotion
calculation.
com.gk_software.pricing_engine.sapmapping.DataAccessServiceSAP
LEVEL: DEBUG
Shows information about loaded master
data.
3.3 Error Handling
3.3.1 Business Errors
The term Business Error refers to errors caused by wrong or missing data in the request.
SDK Promotion Calculation Engine
22 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
3.3.1.1 Business Error Codes
The following error IDs are currently used:
ErrorID
(Range: 100500-
100600)
Description
GKR-100500 Quantity must not contain decimal places. Expected: "Integer"
GKR-100501 RetailPriceModifierPercentAction "Replace" is not supported
GKR-100502 RetailPriceModifierPercentAction "For" is not supported
GKR-100503 RetailPriceModifierAmountAction "Replace" is not supported
GKR-100504 RetailPriceModifierAmountAction "For" is not supported
GKR-100505 PriceDerivationApplicationTypeCode "Item" is not supported
GKR-100507 PriceDerivationApplicationTypeCode "PromotionalAward" is not supported
GKR-100508 PriceDerivationApplicationTypeCode "DiscountTotalInterval" is not supported
GKR-100509 DerivationRuleEligibilityType "CustomerAccount" is not supported
GKR-100510 DerivationRuleEligibilityType "Calendar" is not supported
GKR-100511 DerivationRuleEligibilityType "Brand" is not supported
GKR-100512 DerivationRuleEligibilityType "PriceLine" is not supported
GKR-100513 PrivilegeType "PS" isn't applicable in transaction-related context
GKR-100514 PrivilegeType "AM" isn't applicable in transaction-related context
GKR-100515 The string is too long
GKR-100516 The integer value is too big
GKR-100517 The decimal value has too many decimal places or is too big
GKR-100518 Wrong interface version
GKR-100519 Wrong structure
GKR-100520 RetailPriceModifierAmountAction "Add" is not supported in transaction-related context
GKR-100521 RetailPriceModifierPercentAction "Add" is not supported in transaction-related context
GKR-100522 Line item sequence number is wrong
GKR-100523 Quantity must contain only one entry
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 23
ErrorID
(Range: 100500-
100600)
Description
GKR-100524 Retail price modifier sequence number is wrong
GKR-100525 Missing PromotionID
GKR-100526 Missing coupon number
GKR-100527 Bonus points modifier sequence number is wrong
GKR-100528 Manual trigger sequence number is wrong
GKR-100529 Wrong enumeration value
GKR-100530 Missing unit of measure code
GKR-100531 Missing or invalid Coupon RewardType. RewardValue is existing
GKR-100532 Missing Coupon RewardValue. RewardType is valid
GKR-100533 BusinessUnit does not exist or is unknown
GKR-100534 External action text id is wrong
GKR-100535 External action parameter id is wrong
GKR-100536 RoundingRule - RoundingMethod is wrong
GKR-100537 RoundingRule - Multiple must not contain other digits than zero(es) and once "1" xor "5"
GKR-100538 ItemLink - The decimal value has too many decimal places or is too big or is not unique in the context of the
line item
GKR-100539 Rounding - RoundingDirection is wrong
GKR-100540 Rounding - amount must not be negative
GKR-100541 ExtraAmount - amount must not be negative
3.3.2 Technical Errors
The term technical error refers to unforeseen technical problems preventing the calculation to be fulfilled
(like for example database exceptions).
Technical errors are directly passed to the caller.
SDK Promotion Calculation Engine
24 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 25
4 Extension Guide
4.1 Overview
4.1.1 Introduction
The following picture shows the building blocks of the Promotion Calculation Engine and gives a simplified
view on the processing:
SDK Promotion Calculation Engine
26 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
In addition to the extension options presented in the following chapters, classes may be derived
or extended. However, incompatible changes are possible at any time even without notice - in
particular in case of the methods and variables marked as "protected".
For a more detailed description of the single classes and their methods refer to the Javadoc.
4.1.2 API components
This section provides a high level summary of the various API components used in the SDK.
4.1.2.1 LoyaltyEngineRequest
The LoyaltyEngineRequest contains all information needed to start processing. The caller must pass an
instance of this object to the Loyalty Engine.
Among others, it contains the configuration, transaction, and the custom extension map.
4.1.2.2 LoyaltyEngineResponse
The LoyaltyEngineResponse is created after processing and returned to the caller.
Among others, it contains the updated transactions object.
4.1.2.3 Context
The Context holds the complete state for transaction processing and promotion calculation.
4.1.2.4 TransactionAnalyzer
The purpose of TransactionAnalyzer is to check the sales transaction for certain data, which is needed for
further processing like loading of eligibilities or calculation of rules. The results are stored to
Context.transactionAnalyzerContext.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 27
4.1.2.5 EligibilityLoader
The purpose of EligibilityLoader is to check or load eligibilities based on precalculated data from transaction
analyzers.
4.1.2.6 ConditionLoader
The ConditionLoader loads the corresponding condition of all activated eligibilities and stores them to
context.
4.1.2.7 PromotionCalculator
The PromotionCalculator serves as an entry point for promotion calculations. It provides functionality to
calculate line items and transaction based promotions.
4.1.2.8 TransactionUpdateHandler
The TransactionUpdateHandler is called after the whole processing is finished. It writes the calculated data
back to the transaction.
4.1.2.9 DataAccessService
The data access layer encapsulates the whole access to the master data provider to load promotional data
and maps it into GK data objects.
4.1.3 Beans
ID Alias Description
gkDefaultPricingServiceImpl pricingServiceImpl
gkDefaultItemTransactionAnalyzer itemTransactionAnalyzer The transaction analyzer for item related
data.
SDK Promotion Calculation Engine
28 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
ID Alias Description
gkDefaultExternalPromotionsTransactionAnalyzer externalPromotionsTransactionAna
lyzer
The transaction analyzer for checking of
external promotions.
gkDefaultCouponTransactionAnalyzer couponTransactionAnalyzer The transaction analyzer for checking
coupon data.
gkDefaultCustomerGroupTransactionAnalyzer customerGroupTransactionAnalyze
r
The transaction analyzer for checking
customer data.
gkDefaultCouponEligibilityLoader couponEligibilityLoader Eligibility loader which is responsible for
loading and checking eligibilities of type
CouponPromotionConditionEligibilitySO.
gkDefaultItemEligibilityLoader itemEligibilityLoader Eligibility loader which is responsible for
loading and checking eligibilities of type
ItemPromotionConditionEligibilitySO.
gkDefaultMerchandiseGroupEligibilityLoader merchandiseGroupEligibilityLoader Eligibility loader which is responsible for
loading and checking eligibilities of type
MHGPromotionConditionEligibilitySO.
gkDefaultMerchandiseSetEligibilityLoader merchandiseSetEligibilityLoader Eligibility loader which is responsible for
loading and checking eligibilities of type
MerchandiseSetPromotionConditionEligi
bilitySO.
gkDefaultMarketBasketAmountEligibilityLoader marketBasketAmountEligibilityLoad
er
Eligibility loader which is responsible for
loading and checking eligibilities of type
MarketBasketAmountEligibilitySO.
gkDefaultCustomerGroupEligibilityLoader customerGroupEligibilityLoader Eligibility loader which is responsible for
loading and checking eligibilities of type
CustomerGroupPromotionConditionEligi
bilitySO.
gkDefaultConditionLoader conditionLoader
gkDefaultPromotionCalculator promotionCalculator
gkDefaultDataAccessServiceSAP dataAccessServiceSAP Bean which encapsulates whole data
access to SAP master data provider.
gkDefaultDataMappingSAP2GKImpl dataMappingSAP2GKImpl This bean is used in within the data
access for SAP. It is responsible to map
the SAP data structures to GK structures.
gkDefaultRequestMapping requestMapping Bean for the PSI-Request to transaction
mapping.
gkDefaultDataMappingRequestCustomExtension dataMappingRequestCustomExtens
ion
Bean which is used in context of PSI-
Request to transaction mapping. It builds
the custom extension map.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 29
ID Alias Description
gkDefaultResponseMapping responseMapping Bean for the transaction to PSI-Response
mapping.
gkDefaultPricingPromotionService pricingPromotionService
gkDefaultPricingPromotionObjectFactory pricingPromotionObjectFactory
gkDefaultPromotionSOFactory promotionSOFactory Object factory for promotion related
objects. See Promotion DO.
gkDefaultTransactionFactory transactionFactory Object factory for transaction related
objects. See Transaction DO.
gkDefaultLoyaltyEngineObjectFactory loyaltyEngineObjectFactory
gkDefaultPricingPromotionObjectFactory pricingPromotionObjectFactory
SDK Promotion Calculation Engine
30 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.2 API patterns
4.2.1 Introduction
This chapter describes the basic principles of extensibility by showing the patterns used for implementation.
4.2.2 Abstract factory
The abstract factory pattern encapsulates a group of factories that have a common theme without specifying
their concrete classes. In normal usage, the software creates a concrete implementation of the abstract
factory and then uses the generic interface of the factory to create the concrete objects.
The client does not know (or care) which concrete objects it receives from each of these internal factories,
since it uses only the generic interfaces of their products. This pattern separates the details of
implementation of a set of objects from their general usage and relies on object composition, as object
creation is implemented in methods exposed in the factory interface.
4.2.3 Delegate
Delegates represent an alternative to interceptor, so they can be used in similar use cases. Delegates allow
you to put your class between the invoker and the standard implementation and let your class be
responsible for the delegate's functionality.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 31
You can see the usage of the delegate in this example. The delegate preserves the original functionality by
delegating method invocation to the original implementation and after that call to an extra method. This
solution guarantees that the extra method will be called on every invoking of the save() method.
For accessing the original implementation, the public dependency pattern is used.
4.2.3.1 Example of typical use case:
You want to modify the standard behavior of the save() method and after every save() method you want to
void the document. The delegate pattern is the ideal solution for that: Your class will represent the standard
implementation for other clients and delegate requests to it if necessary.
SDK Promotion Calculation Engine
32 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.3 Context
4.3.1 Introduction
The context holds the complete state for transaction processing. Therefore, all data which are passed-in via
request, calculated, or loaded are stored in specific elements within the context.
4.3.2 Life cycle
The context is created when the processing is started and destroyed after it is finished.
A context instance is related to exactly one and only one LoyaltyEngine instance.
4.3.3 Context elements
The context defines the following elements:
Configuration
Transaction
TransactionAnalyzerContext
EligibilityLoaderContext
PromotionConditionContext
Position and transaction based results
Calculation related flags
ExtensionMap
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 33
4.4 Custom extension map
4.4.1 Introduction
The extension map adds the capability to define references to external data structures for objects within the
transaction. This is used for example to add links between transaction data and the corresponding extension
points within the data structure of the Pricing Service interface.
This custom extension map can be retrieved via the context, attribute customExtensionMap.
For this concrete scenario, PSI->Transaction the in-memory map with key=[pointer to transaction element]
and value List<[pointer to request element]>> is created. It is filled for each used transaction element with
the pointer to it and the pointers to the corresponding elements of the message.
4.4.2 Mapped elements
Note that for some transaction elements multiple corresponding message elements may exist.
Transaction Element Corresponding Message Element Note
Transaction PriceCalculate[Response]
PriceCalculate[Response] -> ARTSHeader
PriceCalculate[Response] -> ARTSHeader -> Response
PriceCalculate[Response] -> ARTSHeader -> Response -> BusinessError In contrast to the
schema, there cannot
exist more than one
BusinessError element
within the Response.
RetailTransaction PriceCalculate[Response] -> PriceCalculateBody In contrast to the
schema, there cannot
exist more than one
PriceCalculateBody
element.
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
SDK Promotion Calculation Engine
34 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Transaction Element Corresponding Message Element Note
RetailTransactionCouponSu
mmary
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> Coupon
RetailTransactionCustomer PriceCalculate[Response] -> PriceCalculateBody -> Loyalty
RetailTransactionCustomer
GroupAssignment
PriceCalculate[Response] -> PriceCalculateBody -> Loyalty -> LoyaltyProgram
RetailTransactionExternalTr
igger
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> PromotionExternalTrigger
RetailTransactionPromotion
Trigger
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> PromotionManualTrigger
RetailTransactionPromotion
PriceDerivationRule
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDe
livery|CustomerOrderForPickup] -> RetailPriceModifier ->
PriceDerivationRule or
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem ->
[Sale|SaleForPickup|SaleForDelivery|Return|ReturnForDelivery|R
eturnForPickup|CustomerOrderForDelivery|CustomerOrderForPic
kup] -> FrequentShopperPointsModifier -> PriceDerivationRule or
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem -> Discount -> PriceDerivationRule or
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem -> LoyaltyReward -> PriceDerivationRule
In the request message
this information could
differ per applied
discount/bonus points
rule - i.e. first or last one
wins.
In contrast to the
schema, there cannot
exist more than one
PriceDerivationRule
element per applied
discount/bonus points
rule.
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDe
livery|CustomerOrderForPickup] -> RetailPriceModifier ->
PriceDerivationRule -> ExternalAction or
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem ->
[Sale|SaleForPickup|SaleForDelivery|Return|ReturnForDelivery|R
eturnForPickup|CustomerOrderForDelivery|CustomerOrderForPic
kup] -> FrequentShopperPointsModifier -> PriceDerivationRule ->
ExternalAction or
o PriceCalculate[Response] -> PriceCalculateBody ->
ShoppingBasket -> LineItem -> Discount ->
PriceDerivationRule -> ExternalAction or
o PriceCalculate[Response] -> PriceCalculateBody ->
ShoppingBasket -> LineItem -> LoyaltyReward ->
PriceDerivationRule -> ExternalAction
RetailTransactionLineItem -
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 35
Transaction Element Corresponding Message Element Note
SaleReturnLineItem PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDelivery|Cu
stomerOrderForPickup]
FrequentShopperPointsMo
difier
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDelivery|Cu
stomerOrderForPickup] -> FrequentShopperPointsModifier
RetailPriceModifier PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDelivery|Cu
stomerOrderForPickup] ->RetailPriceModifier
SaleReturnLineItemMercha
ndiseHierarchyGroup
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> MerchandiseHierarchy
SaleReturnLineItemModifie
rCoupon
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDe
livery|CustomerOrderForPickup] -> RetailPriceModifier ->
PriceDerivationRule -> Eligibility or
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket
-> LineItem ->
[Sale|SaleForPickup|SaleForDelivery|Return|ReturnForDelivery|R
eturnForPickup|CustomerOrderForDelivery|CustomerOrderForPic
kup] -> FrequentShopperPointsModifier -> PriceDerivationRule ->
Eligibility
SaleReturnLineItemModifie
rReference
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDelivery|Cu
stomerOrderForPickup] -> PromotionPriceDerivationRuleReference
SaleReturnLineItemPromoti
onTrigger
PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> [Sale|SaleForPickup|SaleForDelivery|
Return|ReturnForDelivery|ReturnForPickup|CustomerOrderForDelivery|Cu
stomerOrderForPickup] -> PromotionManualTrigger
PriceModificationLineItem PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> Discount
LoyaltyRewardLineItem PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket ->
LineItem -> LoyaltyReward
SDK Promotion Calculation Engine
36 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.4.3 Example: Adding ItemDomainSpecific into custom extension map
The class DataMappingRequest creates an dataMappingRequestCustomExtension object:
private DataMappingRequestCustomExtension dataMappingRequestCustomExtension = new
DataMappingRequestCustomExtension();
This object contains the custom extension map and an add-method for every custom extension. Here the
add-method for storing custom extensions for the saleReturnLineItem:
// The custom extension map
public Map<Object,Map<Class<?>, Object>> createCustomExtensionMap() {
return new HashMap<Object, Map<Class<?>, Object>>();
}
/**
* Add {@link SaleReturnLineItem} related custom extension elements to given map.
*
* @param customExtensionMap The extension map.
* @param saleReturnLineItemModifierCoupon The saleReturnLineItemModifierCoupon.
* @param priceDerivationRuleEligibility The priceDerivationRuleEligibility element
*
* PriceCalculate[Response] -> PriceCalculateBody -> ShoppingBasket -> LineItem ->
[Sale|SaleForPickup|SaleForDelivery|Return|ReturnForDelivery|ReturnForPickup|CustomerOrderFo
rDelivery|CustomerOrderForPickup]
*
*/
public void addSaleReturnLineItemRefs(Map<Object, Map<Class<?>, Object>>
customExtensionMap, SaleReturnLineItem saleReturnLineItem, ItemDomainSpecific
itemDomainSpecific) {
if(saleReturnLineItem == null) {
return;
}
if(!customExtensionMap.containsKey(saleReturnLineItem.getKey())) {
// Store the saleReturnLineItem key as key and an empty HashMap als value to the
custom extension map
customExtensionMap.put(saleReturnLineItem.getKey(), new HashMap<Class<?>,
Object>());
}
Map<Class<?>, Object> customExtensionSubMap =
customExtensionMap.get(saleReturnLineItem.getKey());
if(itemDomainSpecific == null) {
return;
}
// Add into the empty HashMap as key the pointer to the Reference class and as value the
corresponding ItemDomainSpecific.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 37
customExtensionSubMap.put(ItemDomainSpecific.class, itemDomainSpecific);
}
In the LoyaltyEngine, the custom extension map can be retrieved via the context, attribute
customExtensionMap.
4.5 Object factories
4.5.1 Introduction
This chapter gives an overview of the available object factories and describes how they can be extended.
4.5.2 Available Object factories
4.5.2.1 com.gk_software.loyalty_engine.api.LoyaltyEngineObjectFactory
4.5.2.1.1 Spring bean definition
<bean id="loyaltyEngineObjectFactory"
class="com.gk_software.loyalty_engine.api.LoyaltyEngineDefaultObjectFactory" />
4.5.2.2 com.gk_software.swee.ses.api.server.md.promotion.dto.so.IPromo
tionSOFactory
This type of factory is used inside the data access service/data mapping to create promotion data objects like
com.gk_software.swee.ses.api.server.md.promotion.dto.so.PromotionSO.
SDK Promotion Calculation Engine
38 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.5.2.2.1 Spring bean definition
<bean id="promotionSOFactory"
class="com.gk_software.swee.ses.api.server.md.promotion.dto.so.PromotionSODefaultFactory" />
4.5.3 Example
4.5.3.1 Implementation of new/extended LoyaltyEngineObjectFactory
The implementation of a new object factory must be performed in the following way:
1. There a two ways to create a new factory class:
Create a new class which implements specific factory interface.
Create a new class which extends the corresponding default factory implementation. 2. Override the existing method to provide extended objects (see example - createContext()) 3. Add new methods to create new custom objects.
package project.loyalty_engine;
public class CustomLoyaltyEngineObjectFactory extends LoyaltyEngineDefaultObjectFactory
implements LoyaltyEngineObjectFactory {
/**
* Override existing createContext to create own custom context
*/
@Override
public Context createContext() {
return new CustomContext();
}
/**
* New custom method to create custom object.
*/
public CustomObject createCustomObject() {
return new CustomObject();
}
}
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 39
4.5.3.2 Spring bean configuration
The new object factory must be registered within the Spring application context with same bean id as the
original one. In this case it is loyaltyEngineObjectFactory.
<bean id="loyaltyEngineObjectFactory"
class="project.loyalty_engine.CustomLoyaltyEngineObjectFactory" />
4.6 Data access layer
4.6.1 Introduction
The data access layer encapsulates the whole access to the master data provider to load promotional data
and map it into GK data objects.
It consists of the following elements:
DataAccessService: Main component which is called out of Promotion Calculation Engine to load master data.
DataProvider: Vendor specific component to load data, for example, from the database.
DataMapping: Component which is called after retrieving objects from the data provider to map to or create
GK data objects.
SDK Promotion Calculation Engine
40 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
The delegate pattern (see chapter API patterns) is used as default extension pattern.
4.6.1.1 Spring bean configuration
<bean id="dataAccessService"
class="com.gk_software.loyalty_engine.api.data_access.DataAccessServiceDelegate">
<property name="delegate" ref="dataAccessServiceSAP" />
</bean>
<bean id="dataAccessServiceSAP"
class="com.gk_software.pricing_engine.sapmapping.DataAccessServiceSAP">
<property name="promotionServiceSAP" ref="promotionServiceSAP" /> <!-- data provider --
>
<property name="dataMapping" ref="dataMappingSAP2GK" />
</bean>
4.6.2 Data mapping
The data mapping component maps data from vendor-specific data providers into GK data objects.
Therefore, for each data provider a specific data mapping component must be implemented.
The delegate pattern (see chapter API patterns) is used as default extension pattern.
4.6.2.1 Spring bean configuration
<bean id="dataMappingSAP2GK"
class="com.gk_software.pricing_engine.sapmapping.DataMappingSAP2GKDelegate">
<property name="delegate" ref="dataMappingSAP2GKImpl" />
</bean>
<bean id="dataMappingSAP2GKImpl"
class="com.gk_software.pricing_engine.sapmapping.DataMappingSAP2GKImpl">
<property name="promotionSOFactory" ref="promotionSOFactory" /> <!-- object factory -->
</bean>
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 41
4.6.2.2 Object factory
For object creation inside the data mapping, a factory instance of type
com.gk_software.swee.ses.api.server.md.promotion.dto.so.IPromotionSOFactory is used.
See chapter Object factories on how to extend and replace object factories.
4.7 Transaction analyzer
4.7.1 Introduction
The purpose of the transaction analyzer is to check the sales transaction for certain data needed for further
processing like loading of eligibilities or calculation of rules. The results are stored to
Context.transactionAnalyzerContext.
Examples of transaction analyzers:
ItemTransactionAnalyzer analyzes the registered line items and stores cumulated data based on item ids and
merchandise hierarchy group ids to the context.
CouponTransactionAnalyzer checks whether coupons are registered within the transaction and stores the
result to some structure in the context. The result is stored in
Context.transactionAnalyzerContext.couponNumberSet.
CustomerGroupTransactionAnalyzer checks whether customer groups are defined for registered customers.
The result is stored in Context.transactionAnalyzerContext.customerGroupIDSet.
4.7.2 Class diagram
SDK Promotion Calculation Engine
42 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.7.3 Spring bean configuration
All analyzers must be defined as single beans in the Spring application context, which are consolidated in a
specific list with bean id transactionAnalyzerList.
This list bean definition is injected to Loyalty Engine bean and the analyzers are executed in the order they
are specified.
Therefore, this list must be replaced when analyzers should be removed/exchanged or added.
<util:list id="transactionAnalyzerList" list-class="java.util.ArrayList">
<ref bean="itemTransactionAnalyzer"/>
<ref bean="externalPromotionsTransactionAnalyzer"/>
<ref bean="couponTransactionAnalyzer"/>
<ref bean="customerGroupTransactionAnalyzer"/>
</util:list>
4.7.4 Add new transaction analyzer
The following steps must be performed to create and add a new transaction analyzer:
1. Create a new class which implements the interface com.gk_software.loyalty_engine.api.TransactionAnalyzer.
2. Add the bean definition in the Spring application context for the new analyzer. 3. Overwrite the transactionAnalyzerList bean and add a reference to the analyzers.
4.7.5 Example
4.7.5.1 Implementation of new TransactionAnalyzer
package project.loyalty_engine.analyzer;
public class CustomCouponTransactionAnalyzer implements TransactionAnalyzer {
@Override
public void analyzeTransaction(Context context) {
// do something
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 43
}
}
4.7.5.2 Add bean definition in Spring application context for the new
analyzer
<bean id="customCouponTransactionAnalyzer"
class="project.loyalty_engine.analyzer.CustomCouponTransactionAnalyzer">
...
</bean>
4.7.5.3 Overwrite transactionAnalyzerList bean and add reference to
analyzers
<util:list id="transactionAnalyzerList" list-class="java.util.ArrayList">
<ref bean="itemTransactionAnalyzer"/>
<ref bean="externalPromotionsTransactionAnalyzer"/>
<ref bean="customCouponTransactionAnalyzer"/> <!-- replaced couponTransactionAnalyzer -
->
<ref bean="customerGroupTransactionAnalyzer"/>
</util:list>
SDK Promotion Calculation Engine
44 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.8 Eligibility loader
4.8.1 Introduction
The purpose of EligibilityLoader is to check/load eligibilities based on precalculated data from transaction
analyzers.
Examples of eligibility loaders:
CouponEligibilityLoader tries to find CouponPromotionConditionEligibilitySO for collected coupon data in
TransactionAnalyzerContext#getCouponNumberSet(). If CouponPromotionConditionEligibilitySO exists it will be
activated.
CustomerGroupEligibilityLoader tries to find CustomerGroupPromotionConditionEligibilitySO for collected coupon
data in TransactionAnalyzerContext#getCustomerGroupIDSet(). If
CustomerGroupPromotionConditionEligibilitySO exists it will be activated.
4.8.2 Class diagram
4.8.3 Spring bean configuration
All eligibility loaders must be defined as single beans in the Spring application context, which are
consolidated in a specific list with bean id eligibilityLoaderList.
This list bean definition is injected to the Loyalty Engine bean.
Therefore, this list must be replaced when eligibility loaders should be removed/exchanged or added.
<util:list id="eligibilityLoaderList" list-class="java.util.ArrayList">
<ref bean="couponEligibilityLoader" />
<ref bean="itemEligibilityLoader" />
<ref bean="merchandiseGroupEligibilityLoader" />
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 45
<ref bean="merchandiseSetEligibilityLoader" />
<ref bean="marketBasketAmountEligibilityLoader" />
<ref bean="customerGroupEligibilityLoader" />
</util:list>
4.8.4 Add new eligibility loader
The following steps must be performed to create and add a new eligibility loader:
1. Create a new class which implements the interface com.gk_software.loyalty_engine.api.EligibilityLoader.
2. Add a bean definition in the Spring application context for the new loader. 3. Overwrite eligibilityLoaderList bean and add a reference to the loader.
4.8.5 Example
4.8.5.1 Implementation of new EligibilityLoader
package project.loyalty_engine.eligibility_loader;
public class CustomXYZEligibilityLoader implements EligibilityLoader {
private CustomDataAccessService customDataAccessService;
@Override
public void execute(Context context) {
...
List<CustomXYZEligibilitySO> loadedEligibilities =
this.customDataAccessService.getCustomXYZEligibilities(context, ...);
...
}
public void setCustomDataAccessService(CustomDataAccessService customDataAccessService)
{
this.customDataAccessService = customDataAccessService;
}
}
SDK Promotion Calculation Engine
46 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.8.5.2 Add bean definition in Spring application context for the new
analyzer
<bean id="customXYZEligibilityLoader"
class="project.loyalty_engine.eligibility_loader.CustomXYZEligibilityLoader">
<property name="customDataAccessService" ref="customDataAccessService" />
...
</bean>
4.8.5.3 Overwrite eligibilityLoaderList bean and add reference to loader
<util:list id="eligibilityLoaderList" list-class="java.util.ArrayList">
<ref bean="couponEligibilityLoader" />
<ref bean="itemEligibilityLoader" />
<ref bean="merchandiseGroupEligibilityLoader" />
<ref bean="merchandiseSetEligibilityLoader" />
<ref bean="marketBasketAmountEligibilityLoader" />
<ref bean="customerGroupEligibilityLoader" />
<ref bean="customXYZEligibilityLoader" /> <!-- new custom eligibility loader -->
</util:list>
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 47
4.9 Calculation Rule
4.9.1 Introduction
The purpose of CalculationRule is to perform operations and modify the base flow based on calculation rules
(ERuleType).
Examples of condition rules:
MixAndMatchCalculationRule performs operations and modifies the base flow based on mix and match rules
(ERuleType.MM).
SimpleDiscountCalculationRule performs operations and modifies the base flow based on simple discount
rules (ERuleType.RB).
4.9.2 Class diagram
SDK Promotion Calculation Engine
48 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.9.3 Spring bean configuration
All condition rules must be defined as single beans in the Spring application context which are consolidated
in specific list with bean id calculationRules.
This list bean definition is injected to conditionLoader bean.
Therefore, this list must be replaced when condition rules shall be removed/exchanged or added.
<util:list id="calculationRules" list-class="java.util.ArrayList">
<ref bean="externalActionCalculationRule"/>
<ref bean="get3Pay2CalculationRule"/>
<ref bean="manualPriceCalculationRule"/>
<ref bean="mixAndMatchCalculationRule"/>
<ref bean="noDiscountCalculationRule"/>
<ref bean="simpleDiscountCalculationRule"/>
</util:list>
4.9.4 Add new calculation rule
The following steps must be performed to create and add a new calculation rule:
1. Create a new class which implements the interface com.gk_software.loyalty_engine.api.rule_type.CalculationRule.
2. Add a bean definition in the Spring application context for the new calculation rule. 3. Overwrite calculationRules bean and add a reference to the newly created calculation rule.
4.9.5 Example
4.9.5.1 Implementation of new CalculationRule
package project.loyalty_engine.rule_type;
public class CustomXYZCalculationRule implements CalculationRule {
private CustomCalculationRule customDataAccessService;
@Override
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 49
public PromotionConditionRuleSO loadPromotionConditionRule(Context context, long
ruleID) {
return customDataAccessService.getExternalActionRule(ruleID);
}
@Override
public String getPriceModificationMethodCode(PromotionConditionRuleSO
promotionConditionRuleSO) {
return PriceModificationMethodCode.NEW_RULE;
}
public void setCustomDataAccessService(CustomDataAccessService customDataAccessService)
{
this.customDataAccessService = customDataAccessService;
}
}
4.9.5.2 Add bean definition in Spring application context for the
calculation rule
<bean id="customXYZCalculationRule "
class="project.loyalty_engine.rule_type.CustomXYZCalculationRule ">
<property name="customDataAccessService" ref="customDataAccessService" />
...
</bean>
4.9.5.3 Overwrite eligibilityLoaderList bean and add reference to loader
<util:list id="calculationRules" list-class="java.util.ArrayList">
<ref bean="externalActionCalculationRule"/>
<ref bean="get3Pay2CalculationRule"/>
<ref bean="manualPriceCalculationRule"/>
<ref bean="mixAndMatchCalculationRule"/>
<ref bean="noDiscountCalculationRule"/>
<ref bean="simpleDiscountCalculationRule"/>
<ref bean="customXYZCalculationRule" /> <!-- new custom calculation rule -->
</util:list>
SDK Promotion Calculation Engine
50 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.10 Price Modification
4.10.1 Introduction
The purpose of PriceModification is to perform calculations based on price modification methods
(EPriceModificationMethod and EReductionMethodMixAndMatch).
Examples of price modifications:
PercentageDiscountPriceModification performs percentage discount calculations
(EPriceModificationMethod.RP).
AbsoluteDiscountPriceModification performs absolute discount calculations (EPriceModificationMethod.RS).
4.10.2 Class diagram
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 51
4.10.3 Spring bean configuration
All price modifications must be defined as single beans in the Spring application context, which are
consolidated in a specific list with bean id eligibilityLoaderList.
This list bean definition is injected to Loyalty Engine bean.
Therefore, this list must be replaced when eligibility loaders shall be removed/exchanged or added.
<util:list id="priceModifications" list-class="java.util.ArrayList">
<ref bean="absoluteDiscountPriceModification"/>
<ref bean="newPricePriceModification"/>
<ref bean="newTotalPricePriceModification"/>
<ref bean="totalAbsoluteDiscountPriceModification"/>
<ref bean="totalPercentageDiscountPriceModification"/>
<ref bean="totalPercentageDiscountRoundedTwicePriceModification"/>
<ref bean="percentageDiscountPriceModification"/>
</util:list>
4.10.4 Add new price modification
The following steps must be performed to create and add a new price modification:
1. Create a new class implementing the interface com.gk_software.loyalty_engine.price_modification_engine.PriceModification.
2. Add a bean definition in the Spring application context for the price modification. 3. Overwrite priceModifications bean and add a reference to the newly created price modification.
4.10.5 Example
4.10.5.1 Implementation of new PriceModification
package project.loyalty_engine.price_modification_engine;
public class CustomXYZPriceModification implements PriceModification {
@Override
public EPriceModificationMethod getPriceModificationMethod() {
return EPriceModificationMethod.NEW;
}
SDK Promotion Calculation Engine
52 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
@Override
public RuleCalculationResult calculatePositionNonTotalConditionValue(Context context,
Double usedQuantity,
Double usedAmount, PartialResult partialResult, LineItemSummaryResult
lineItemSummaryResult,
Double positionQuantity) {
...
}
}
4.10.5.2 Add bean definition in Spring application context for the new price
modification
<bean id="customXYZPriceModification"
class="project.loyalty_engine.price_modification_engine.CustomXYZPriceModification" />
4.10.5.3 Overwrite priceModifications bean and add reference to new price
modification
<util:list id="priceModifications" list-class="java.util.ArrayList">
<ref bean="absoluteDiscountPriceModification"/>
<ref bean="newPricePriceModification"/>
<ref bean="newTotalPricePriceModification"/>
<ref bean="totalAbsoluteDiscountPriceModification"/>
<ref bean="totalPercentageDiscountPriceModification"/>
<ref bean="totalPercentageDiscountRoundedTwicePriceModification"/>
<ref bean="percentageDiscountPriceModification"/>
<ref bean="customXYZPriceModification"/> <!-- new custom price modification -->
</util:list>
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 53
SDK Promotion Calculation Engine
54 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.11 Transaction update handler
4.11.1 Introduction
The TransactionUpdateHandler is responsible for cleaning promotional data and creating promotional data
on transaction.
It is called in the following phases:
Before processing: The promotional data is removed from the transaction. For example, normal
RetailPriceModifier/FrequentShopperPointsModifier are removed.
After processing: The calculated data is written back to the transaction. For example,
PriceModificationLineItems/LoyaltyRewardLineItems are created.
The delegate pattern (see chapter API patterns) is used as default extension pattern.
4.11.2 Class diagram
4.11.3 Spring bean configuration
<bean id="transactionUpdateHandler"
class="com.gk_software.loyalty_engine.api.transaction.TransactionUpdateHandlerDelegate">
<property name="delegate" ref="transactionUpdateHandlerImpl" />
</bean>
<bean id="transactionUpdateHandlerImpl"
class="com.gk_software.loyalty_engine.transaction_service.TransactionUpdateHandlerImpl">
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 55
...
</bean>
4.11.4 Exchange TransactionUpdateHandler
The following steps must be performed to exchange the TransactionUpdateHandler:
1. Create a new custom TransactionUpdateHandler. This can be done in two different ways: a. Implement complete new TransactionUpdateHandler by creating custom which implements the
interface com.gk_software.loyalty_engine.api.transaction.TransactionUpdateHandler. b. Extend existing
com.gk_software.loyalty_engine.api.transaction.TransactionUpdateHandlerDelegate and overwrite the desired methods.
2. Overwrite transactionUpdateHandler bean.
4.11.5 Example
4.11.5.1 Implementation of new TransactionUpdateHandlerDelegate class
package project.loyalty_engine.transaction;
public class CustomTransactionUpdateHandlerDelegate extends TransactionUpdateHandlerDelegate
{
@Override
public void createPriceDerivationRules(Context context) {
this.delegate.createPriceDerivationRules(context);
// do some post processing
}
}
SDK Promotion Calculation Engine
56 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
4.11.5.2 Override bean definition in Spring application context for the
default delegate
<bean id="customXYZEligibilityLoader"
class="project.loyalty_engine.transaction.CustomTransactionUpdateHandlerDelegate ">
<property name="delegate" ref="transactionUpdateHandlerImpl" />
...
</bean>
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 57
4.12 Promotion Condition Rule
4.12.1 Introduction
The following example shows the implementation of a new rule for a 50% discount on the second cheapest
item in the shopping basket.
4.12.2 Adaptation of pricing-engine-dataaccess-sap
The GK rule object PromotionConditionRuleSO currently supports the ChooseItemMethod for a discount on
the most and the least expensive item of the shopping basket.
A new rule object (for example, CustomPromotionConditionRuleSO) has to be created which extends the
existing rule object PromotionConditionRuleSO with a new ChooseItemMethod.
The new promotionSOFactory which can create the CustomPromotionConditionRuleSO object must be
registered in the Application Context. In doing so, the new promotionSOFactory has to either implement the
specific interface or to extend the default factory (see chapter Object factories).
To map the new ChooseItemMethod to the new CustomPromotionConditionRuleSO object, the relevant
method of class DataMappingSAP2GKDelegate has to be enhanced.
public void mapPriceDerivationRule(PriceDerivationRule ruleSAP, PromotionConditionRuleSO
ruleGK) {
this.delegate.mapPriceDerivationRule(ruleSAP, ruleGK);
// enhancement
CustomPromotionConditionRuleSO customRuleGK = (CustomPromotionConditionRuleSO) ruleGK;
customRuleGK.setCustChoosItemMethod(ruleSAP.getCustChoosItemMethod);
}
4.12.3 Adaptation of pricing-engine-core-services
The new parameter for ChooseItemMethod still has to be configurable in the configuration file, for example
itemChooseMethod=SecondLowest.
To ensure that the new parameter value "SecondLowest" can be interpreted by the Loyalty Engine, class
ConfigurationConverter has to be extended analogous to the existing itemChooseMethod parameters.
SDK Promotion Calculation Engine
58 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5 Domain Object Model
5.1 Domain Object - Transaction
5.1.1 Introduction
This document describes the transaction structure.
For a definition of the used domains/data types see chapter Domains.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 59
5.1.2 Relationship
5.1.2.1 ControlTransaction
SDK Promotion Calculation Engine
60 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.2.2 TenderControlTransaction
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 61
5.1.2.3 RetailTransaction
SDK Promotion Calculation Engine
62 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 63
5.1.3 Object Details
5.1.4 Data
5.1.4.1 entity Transaction
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned
identifier for a
group of
BusinessUnits
General New
TransactionID "IdentityTransactionExternalG
K"
yes A universally
unique identifier
(UUID) for the
Transaction. This
may be
assembled from
alternate key
members.
General New
OperatorID "IdentityAlphaNumeric" yes A unique,
automatically
assigned number
used to identify a
workstation
OPERATOR.
General New
WorkstationID "IdentityAlphaNumeric" yes The unique
identifier for the
WORKSTATION
General Special Workstation
IDs:
0 - Server
-1 - Self
Scanning
New
BusinessUnitID "IdentityUUID" yes The store id General New
BusinessDayDate "DateCalendar" yes The calendar date
of the
BusinessDay.
General New
SDK Promotion Calculation Engine
64 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
SequenceNumber INTEGER yes The sequence
number of the
transaction
(incremental
number for each
workstation). It is
formatted
according to
minimum and
maximum value
and it could be
reset every day to
minimum value.
So in comparison
to
InternalSequence
Number it must
not be unique for
business unit and
workstation.
It is used for
export, reporting,
search and
display.
General Receipt number New
TransactionTypeCode "Code6" no A code to denote
the type of
Transaction
Function
specific
Default:
RTLTRN
"RTLTRN" -
RetailTrans
action
"CNTTRN" -
ControlTra
nsaction
"TNCNTR" -
TenderCon
trolTransac
tion
RTLTRN
BeginDateTimestamp "TimeStampEffective" yes The time and
date a
transaction is
initiated
General New
EndDateTimestamp "TimeStampExpiration" no The time and
date stamp a
transaction is
completed
General Null in case of open
transaction.
Always filled for
finished transactions.
New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 65
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
CancelledFlag "Flag" yes A flag denoting
that this entire
transaction has
been cancelled
before it was
completed at the
POS
Function
specific
Default: false
Will be set by
function Receipt
Abort.
false
SuspendedFlag "Flag" yes Defines if the
transaction was
suspended
Function
specific
Default: false
false
TrainingFlag "Flag" yes A flag to signify
whether the
transaction was
created in
training mode
Function
specific
Default: false
Copy
KeyedOfflineFlag "Code2" no A code that
indicates the
online/offline
state when
transaction was
completed
General "OL" -
Online/Cen
tral
"SA" -
Offline/Loc
al
"BO" - Both
(Online/Off
line)
New
ReasonCode "Code" no A unique retailer
defined reason
code for an
action that is
taken (or not
taken) at a
Workstation
Function
specific
Void transaction
Receipt abort
Open drawer
New
ReasonDescription "DescriptionNarrative" no A narrative
description
describing the
uses of the
retailer assigned
reason code.
Corresponds to
Reason.Descripti
on
Function
specific
New
SDK Promotion Calculation Engine
66 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
XXCustom06 VARCHAR(256) no Customizable
information
XXCustom07 VARCHAR(256) no Customizable
information
XXCustom08 VARCHAR(256) no Customizable
information
XXCustom09 VARCHAR(256) no Customizable
information
XXCustom10 VARCHAR(256) no Customizable
information
XXCustom11 VARCHAR(256) no Customizable
information
XXCustom12 VARCHAR(256) no Customizable
information
XXCustom13 VARCHAR(256) no Customizable
information
XXCustom14 VARCHAR(256) no Customizable
information
XXCustom15 VARCHAR(256) no Customizable
information
WorkerID "IdentityAlphaNumeric40" no A unique system-
assigned
identifier for the
Worker
General New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 67
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
WorkerFirstName "NNameGK" no The worker's first
name
General New
WorkerLastName "NNameGK" no The worker's last
name
General New
SoftwareVersion "Name" no The software
version which
was used in order
to create the
transaction
General New
SuspendNumber "LineNumber" no Number for
suspending, can
be used for
multiple
transactions
Function
specific
null
ISOCurrencyCode "ISO_4217_CurrencyCode_ch
ar(3)"
yes Main currency of
the store
General Copy
InternalSequenceNu
mber
INTEGER no The sequence
number of the
transaction
(incremental
number for each
workstation). It is
unique for
business unit and
workstation.
General New
FiscalSequenceNumb
er
IdentityAlphaNumeric no The sequence
number being
created by the
fiscal printer
Function
specific
New
FiscalFlag Flag yes Determines
whether this is a
fiscal transaction
Function
specific
New
FiscalDayNumber IdentityAlphaNumeric no The fiscal day
counter
Function
specific
New
FiscalPrinterID Name no The identifier of
the fiscal printer
Function
specific
New
FiscalSignature SignatureGK no Fiscal signature of
the transaction
Function
specific
New
SDK Promotion Calculation Engine
68 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
TransactionTimestam
p
"Time" yes The time stamp
which is relevant
for the
transaction
processing.
Depending on
configuration,
this can be the
BeginDateTimest
amp or the
EndDateTimesta
mp.
General New
BeginDateTimestamp
UTC0
"TimeStampUTC0GK" yes The UTC0 time
and date a
transaction is
initiated
General New
EndDateTimestampU
TC0
"TimeStampUTC0GK" no The UTC0 time
and date stamp a
transaction is
completed
General Null in case of open
transaction.
Always filled for
finished transactions.
New
TransactionTimestam
pUTC0
"TimeStampUTC0GK" yes The UTC0 time
stamp which is
relevant for the
transaction
processing.
Depending on
configuration,
this can be the
BeginDateTimest
ampUTC0 or the
EndDateTimesta
mpUTC0.
General New
TransactionAdditional
PrintoutList
TransactionAdditionalPrintou
t[0..*]
no List of additional
printouts
Function
specific
New
TransactionAssociatio
nList
TransactionAssociation[0..*] no List of associated
transactions
Function
specific
New
TransactionBinaryDat
aList
TransactionBinaryData[0..*] no List of binary data Function
specific
New
TransactionCategoryLi
st
TransactionCategory[0..*] no List of transaction
categories
Function
specific
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 69
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
TransactionExtension
List
TransactionExtension[0..*] no List of transaction
extensions
Function
specific
New
TransactionResource
OverrideList
TransactionResourceOverride
[0..*]
no List of data for
authorization
related to
transaction level
Function
specific
New
RetailTransaction RetailTransaction no Retail transaction
data
Function
specific
Only one of these
entities can be filled.
Copy
ControlTransaction ControlTransaction no Control
transaction data
Function
specific
-
TenderControlTransac
tion
TenderControlTransaction no Tender control
transaction data
Function
specific
-
5.1.4.2 entity TransactionAdditionalPrintout
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned identifier
for a group of BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier
(UUID) for the Transaction. This may
be assembled from alternate key
members.
PrintoutSequenceNumber "LineNumber" yes Line number (incremental counter)
of the printout
TriggerID "IdentityAlphaNumeric40" yes The trigger type ident of the
additional printout (for example,
customer group, user function,
tender)
TriggerValue "Name" yes The trigger value for the additional
printout (for example, the number
of the customer group, the number
of user function, the tender class
code)
SDK Promotion Calculation Engine
70 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
ReportName "IdentityAlphaNumeric40" yes The name of the report template
PrintoutCount "QuantityShortCount" yes The count of printout copies
PrintoutContent "NDescriptionNarrativeGK" no Parameter / data for printout
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
5.1.4.3 entity TransactionAssociation
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes Business unit
group id of the
current
transaction
TransactionID "IdentityTransactionExternalGK" yes Transaction ID
of the current
Transaction
ToTransactionID "IdentityTransactionExternalGK" yes Transaction ID
of the
referenced
Transaction
ToBusinessUnitGroupID Identity yes Business unit
group id of the
referenced
transaction
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 71
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
TransactionAssociationTypeCode "Code4" yes A retailer
assigned code
denoting the
relationship
between the
two
transactions
"VOID" - link
from void
transaction to
voided
transaction
"PRNT" - link
from print
transaction to
original
transaction
"INDU" - link
from invoice
duplicate
transaction to
original
invoice
transaction
"INVO" - link
from invoice
transaction to
original
transaction
"SCMA" - link
from scale
mark down to
original
transaction
"OFRE" - link
from offline
rebooking to
original
transaction
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
72 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.4 entity TransactionBinaryData
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
BinaryDataSequenceNumber "LineNumber" yes A unique identifier
(within the context of
the Transaction) for
this binary data entry
Name "Name" yes The name of the
binary data entry
"Journal" -
printout
for journal
Content "Image" yes The binary object
ContentLength "QuantityTransactionCount" yes The length of the
binary object
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 73
5.1.4.5 entity TransactionCategory
Field Domain (Datatype) Manda-
tory Description
Calculatio
n Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
New
TransactionID "IdentityTransactionEx
ternalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may
be assembled from
alternate key members
New
SDK Promotion Calculation Engine
74 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
TransactionCategoryCo
de
"Code6" yes The code representing
the transaction
category
These codes are only
valid together with
the type code of the
transaction. First you
have to consider the
type code of the
transaction and then
the category adds
more details to the
concrete transaction
type.
Relevant codes for
RetailTransaction:
"RETURN" -
Return
Receipt
"WIC" - WIC
sale
Relevant codes for
TenderControlTransac
tion and
ControlTransaction:
"CHECK" -
Check
"DELIVE"-
Deliver
"MANUAL" -
Manual
"SETTLE" -
Accounting
"CLEAR" -
Clearing
"OPEN" -
Open
"PAYOUT" -
Pay out
"PAYIN" -
Pay in
"CREATE" -
Create
"DELETE" -
Delete
"INACC" -
Put back
loan after
till
accounting
"OUTACC" -
Remove
loan before
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 75
till
accounting
"BANK" -
Bank
payment or
Receiving
money
"FORCED" -
Forced
"TILSUM" -
till summary
"TILSTA" -
till statistics
"STOSUM" -
store
summary
"DEPOS" -
Deposit
"SUBSEQ" -
marks
transactions
of
subsequent
accounted
reporting
periods
"PRECLO" -
marks
transactions
of
preliminaril
y closed
reporting
periods
"FINANC" -
marks
transactions
of manual
or
automatic
store
accounts
"INDU" -
Invoice
duplicate
Relevant codes only
used for project
specific codes:
00-99
SDK Promotion Calculation Engine
76 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculatio
n Rule Comment
Invert
Transaction
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.6 entity TransactionExtension
Field Domain (Datatype) Mandator
y Description
Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier
(UUID) for the Transaction. This
may be assembled from
alternate key members.
ExtensionKey "IdentityAlphaNumeric40" yes The key of the key-value pair
ExtensionSequenceNum
ber
"LineNumber" yes Line number (incremental
counter) - there may exist
multiple rows per ExtensionKey.
ExtensionValue "NDescriptionShortGK" no The value of the key-value pair
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 77
5.1.4.7 Retail Transaction
5.1.4.7.1 entity RetailTransaction
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
General New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may be
assembled from alternate
key members
General New
SDK Promotion Calculation Engine
78 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
RetailTransactionTypeC
ode
"Code2" yes A retailer assigned code
denoting a type of
RetailTransaction
Function
specific
Default:
"SA"
"SA" - Sale
"PI" - Pay
In
"PO" - Pay
Out
"II" - Item
Informatio
n
"EX" -
Tender
Exchange
"SC" -
Scale
"IN" -
Inventory
"WO" -
Write Off
"IV" -
Invoice
"ER" -
Empties
Return
"SM" -
Scale
Markdow
n
"RE" -
Offline
Rebooking
Relevant codes only
used for project
specific codes:
00-99
Copy
TillID "Identity" no The unique identifier of
the till
General New
ReceiptDateTime "TimeStampAudit" yes The date and time that
was printed on the
receipt for this
transaction
General =
Transaction.EndDat
eTimestamp
New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 79
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
ReceiptPrintoutFlag BIT yes Determines whether for
this sales transaction a
receipt was printed.
Function
specific
Default:
false
New
PromotionTimestamp "Time" no The time stamp used for
promotion validity checks
and calculation
Function
specific
Default:
Transaction.
BeginDateTi
mestamp
Copy
FrequentShopperLostPo
intsCount
"Quantity" no The number of frequent
shopper points that HAD
been awarded for the
purchase in case the
customer HAD presented
a loyalty card
Function
specific
0
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
RetailTransactionLineIte
mList
RetailTransactionLineI
tem[0..*]
no List of line items Function
specific
Copy
RetailTransactionTotalLi
st
RetailTransactionTotal
[0..*]
no List of total amounts Function
specific
Copy
RetailTransactionPromo
tionTriggerList
RetailTransactionPro
motionTrigger[0..*]
no List of promotion triggers Function
specific
Copy
RetailTransactionExtern
alTriggerList
RetailTransactionExte
rnalTrigger[0..*]
no List of external triggers Function
specific
Copy
RetailTransactionCusto
merList
RetailTransactionCust
omer[0..*]
no List of customers Function
specific
Copy
RetailTransactionCoupo
nSummaryList
RetailTransactionCou
ponSummary[0..*]
no List of coupons Function
specific
Copy
RetailTransactionTaxEx
emptTrigger
RetailTransactionTaxE
xemptTrigger
no Tax exempt data Function
specific
Copy
SDK Promotion Calculation Engine
80 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
RetailTransactionPromo
tionPriceDerivationRule
List
RetailTransactionPro
motionPriceDerivatio
nRule[0..*]
no List of conditions Function
specific
Copy
RetailTransactionModifi
erCouponList
RetailTransactionMod
ifierCoupon[0..*]
no List of used coupons Function
specific
Copy
TenderAuthorizationList TenderAuthorization[
0..*]
no Terminal authorization
list
Function
specific
New
EmailRequestedFlag BIT no Send receipt as mail is
activated
Function
specific
New
EmailAddressLocalPart "EmailAddress" no Local part of entered e-
mail address
Function
specific
New
EmailAddressDomainPa
rt
"EmailAddress" no Domain part of entered e-
mail address
Function
specific
New
InvoicePrintoutTypeCod
e
"Code2" no Invoice printout is
activated
Function
specific
null
00:
Invoice is
printed.
Customer
data are
printed, if
they are
available.
01:
Invoice is
printed.
Instead of
customer
data
empty
rows are
printed.
02:
Simplified
invoice is
printed.
Customer
data are
printed, if
they are
available.
New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 81
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
InvoiceNumber "IdentityAlphaNumeri
c40"
no Number of the invoice Function
specific
New
ReceiptDateTimeUTC0 "TimeStampUTC0GK" yes The UTC0 time stamp
corresponding to the date
and time that was printed
on the receipt for this
transaction.
General =
Transaction.EndDat
eTimestampUTC0
New
PromotionTimestampU
TC0
"TimeStampUTC0GK" no The UTC0 time stamp
used for promotion
validity checks and
calculation
Function
specific
Default:
Transaction.
BeginDateTi
mestampUT
C0
Copy
5.1.4.7.2 Line items
5.1.4.7.2.1 entity RetailTransactionLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
BusinessUnitGrou
pID
Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
General New New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members
General New New
RetailTransactionL
ineItemSequence
Number
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
General Copy New
SDK Promotion Calculation Engine
82 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
ExternalCustomer
OrderID
"IdentityAlphaNumeric4
0"
no An external identifier
for the related
customer order
Function
specific
Copy Copy
CustomerOrderSe
quenceNumber
"LineNumber" no A unique system
assigned identifier for
the LineItem of the
CustomerOrder
Function
specific
Copy Copy
(Retriev
e,
Return,
Internal
Void)
New
(Repetit
ion)
BeginDateTimesta
mp
"TimeStampEffective" no The start time of the
RETAIL TRANSACTION
line item
General New Copy
(Retriev
e)
New
(Repetit
ion,
Return,
Internal
Void)
VoidFlag "Flag" yes A boolean indicator
that tells if this line
item is VOIDED or not
Function
specific
Default:
false
Copy Copy
EndDateTimestam
p
"TimeStampExpiration" no The end time of the
RETAIL TRANSACTION
line item
General New Copy
(Retriev
e)
New
(Repetit
ion,
Return,
Internal
Void)
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 83
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
EntryMethodCode "EntryMethodCode" no A retailer assigned
code to denote how
the
RetailTransactionLineI
tem was entered at
the Workstation. It is
filled just for retail
transaction line item.
Function
specific
"Scanne
d" -
Register
ed by
scanner
“KeyedP
erDuplic
ate” -
Register
ed by
line
item
repetitio
n
“Keyed”
-
Manuall
y
entered
"Item
Informa
tion" -
Register
ed by
Item
Informa
tion
Copy Copy
SDK Promotion Calculation Engine
84 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
RetailTransactionL
ineItemTypeCode
"Code2" yes A code to denote the
type of retail
transaction line item,
such as Sale/Return,
Void, Tender...
Function
specific
"SR" -
SaleRet
urnLineI
tem
"TL" -
TenderLi
neItem
"VL" -
VoidsLin
eItem
"RL" -
Roundin
gLineIte
m
"PM" -
PriceMo
dificatio
nLineIte
m
"LR" -
LoyaltyR
ewardLi
neItem
"TX" -
TaxLineI
tem
"WL" -
Worker
Discoun
tLineIte
m
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 85
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
VoidTypeCode "Code2" no Describes whether
the line item was
voided immediately
after registering it,
voided by another
line item or internally
voided
Function
specific
null -
not
voided
"00" -
Void
Line
"01" -
Immedi
ate Void
"02" -
Internal
Void
Will be set for
void and voided
line item.
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
XXCustom06 VARCHAR(256) no Customizable
information
XXCustom07 VARCHAR(256) no Customizable
information
XXCustom08 VARCHAR(256) no Customizable
information
XXCustom09 VARCHAR(256) no Customizable
information
XXCustom10 VARCHAR(256) no Customizable
information
XXCustom11 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
86 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
XXCustom12 VARCHAR(256) no Customizable
information
XXCustom13 VARCHAR(256) no Customizable
information
XXCustom14 VARCHAR(256) no Customizable
information
XXCustom15 VARCHAR(256) no Customizable
information
WorkstationID "IdentityAlphaNumeric" no Id of the workstation
where the line item
was created
General New Copy
(Retriev
e)
New
(Repetit
ion,
Return,
Internal
Void)
WorkstationType
Code
"Code4" no Type of the
workstation where
the line item was
created
General
Default: POS
POS -
POS
Client
MOB -
Mobile
Client
SCO -
Self
Checkou
t Client
WEB -
Websho
p
SSC -
Self
Scannin
g Client
New Copy
(Retriev
e)
New
(Repetit
ion,
Return,
Internal
Void)
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 87
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
KeyedOfflineCode Code2 no A code that indicates
the online/offline
state when
transaction was
completed
General "OL" -
Online/
Central
"SA" -
Offline/
Local
"BO" -
Both
(Online/
Offline)
New Copy
(Retriev
e)
New
(Repetit
ion,
Return,
Internal
Void)
BeginDateTimesta
mpUTC0
"TimeStampUTC0GK" no The UTC0 start time
of the RETAIL
TRANSACTION line
item
General New Copy
(Retriev
e)
New
(Repetit
ion,
Return,
Internal
Void)
EndDateTimestam
pUTC0
"TimeStampUTC0GK" no The UTC0 end time of
the RETAIL
TRANSACTION line
item
General New Copy
(Retriev
e)
New
(Repetit
ion,
Return,
Internal
Void)
SaleReturnLineIte
m
SaleReturnLineItem no Sale return line item Function
specific
Only one of these
entities can be
filled.
Copy Copy
TenderLineItem TenderLineItem no Tender line item Function
specific
Copy -
VoidsLineItem VoidsLineItem no Void line item Function
specific
Copy -
RoundingLineItem RoundingLineItem no Rounding line item Function
specific
Copy -
SDK Promotion Calculation Engine
88 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
PriceModification
LineItem
PriceModificationLineIt
em
no Transaction related
discount
Function
specific
Copy -
LoyaltyRewardLin
eItem
LoyaltyRewardLineItem no Transaction related
bonus points
Function
specific
Copy -
WorkerDiscountLi
neItem
WorkerDiscountLineIte
m
no Worker discount line
item
Function
specific
Copy -
TaxLineItem TaxLineItem no Transaction related
tax
Function
specific
Copy -
GiftCertificateLine
Item
GiftCertificateLineItem no Additional gift
certificate data for
SaleReturnLineItem,
TenderLineItem or
VoidsLineItem
Function
specific
Copy Copy
PrepaidLineItem PrepaidLineItem no Additional prepaid
data for
SaleReturnLineItem or
VoidsLineItem
Function
specific
Copy Copy
RetailTransactionL
ineItemFrequentS
hopperPointsRed
emption
RetailTransactionLineIte
mFrequentShopperPoin
tsRedemption
no Additional bonus
points redemption
data
Function
specific
Copy Copy
RetailTransactionL
ineItemAssociatio
nList
RetailTransactionLineIte
mAssociation[0..*]
no List of line item
associations
Function
specific
Copy Copy
RetailTransactionL
ineItemAdditional
ParameterList
RetailTransactionLineIte
mAdditionalParameter[
0..*]
no List of additional
parameters
Function
specific
Copy Copy
RetailTransactionL
ineItemBinaryDat
aList
RetailTransactionLineIte
mBinaryData[0..*]
no List of binary data Function
specific
Copy Copy
RetailTransactionL
ineItemI18NTextLi
st
RetailTransactionLineIte
mI18NText[0..*]
no List of translations for
line item texts
Function
specific
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 89
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
Copy
LineIte
m
RetailTransactionL
ineItemResource
OverrideList
RetailTransactionLineIte
mResourceOverride[0..
*]
no List of data for line
item related
authorizations
Function
specific
- Copy
(Retriev
e,
Internal
Void)
-
(Return,
Repetiti
on)
5.1.4.7.2.2 entity SaleReturnLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineI
temSequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
POSItemID "IdentityAlphaNumeri
c40"
no The ID used to
identify the item
Copy Copy
ItemID "IdentityUUID" no A unique identifier for
the item
Copy Copy
POSDepartmentID "IdentityAlphaNumeri
c40"
no A unique identifier for
the POS department
Copy Copy
SDK Promotion Calculation Engine
90 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
UnitOfMeasureCode "Code4" no The code used to
specify the unit of the
item
Copy Copy
ItemType "Code4" no The type code of the
line item
"CO" -
Common
"GC" - Gift
Certificate
"PI" - Pay In
"PO" - Pay
Out
"PR" -
Prepaid
"ER" -
Empties
Return
"SC" - Scale
Receipt
"DI" - Deposit
Item
"PG" -
Promotion
Gift
Certificate
"SO" - Sales
Order
"PU" - Sales
Order Pick-
Up
"DP" -
Downpaymen
t
"DC" -
Downpaymen
t Clearing
"II" - Item
Information
"IP" - Invoice
Payment
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 91
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
SubItemType "Code4" no The sub type code of
the line item
"MSTR" -
Merchandise
Category Sale
"SOVO" -
Sales Order
Void
Copy Copy
RegularUnitPrice "MoneyShortRetail" yes The regular per-unit
price
see chapter
Transaction
Calculation Rules
Copy Copy
ActualUnitPrice "MoneyShortRetail" yes The actual per-unit
price
see chapter
Transaction
Calculation Rules
Copy Copy
Quantity "QuantityIntegerGK" yes The single quantity of
a line item
Piece Item:
3 * item
Quantity = 3
Units = 1
Weight item:
3 * 1.234kg
* item
Quantity = 3
Units =
1.234
Item with deposit:
3 * six-pack
(1 six-pack
has 6 *
deposit
item)
six-pack:
Quantity =
3, Units = 1
deposit:
Quantity =
3, Units = 6
Invert Copy
(Retrie
ve,
Repetit
ion,
Interna
lVoid)
New
(Retur
n)
SDK Promotion Calculation Engine
92 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
Units "Quantity" no The units of the line
item
Piece Item:
3 * item
Quantity = 3
Units = 1
Weight item:
3 * 1.234kg
* item
Quantity = 3
Units =
1.234
Item with deposit:
3 * six-pack
(1 six-pack
has 6 *
deposit
item)
six-pack:
Quantity =
3, Units = 1
deposit:
Quantity =
3, Units = 6
Copy Copy
ExtendedAmount "Money" yes The product of
multiplying Quantity,
Units and
ActualUnitPrice
see chapter
Transaction
Calculation Rules
Invert New
ExtendedDiscountAm
ount
"MoneyShortRetail" no The monetary total of
all line item discounts
that were applied to
this Item
see chapter
Transaction
Calculation Rules
Invert New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 93
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
SellUnitRetailPriceEnt
ryMethodCode
"Code4" no A code that describes
how this line item's
retail selling unit price
is being entered
"PRIC" - price
from pricing
"BARC" -
price from
barcode
"SCAL" - price
from scale
Copy Copy
ActionCode "Code2" yes A code denoting the
sign of the line item
"RI" - Return
Item
"SI" - Sale
Item
Invert Copy
(Retrie
ve,
Repetit
ion,
Interna
lVoid)
Invert
(Retur
n)
ReasonCode "Code" no A unique retailer
defined reason code
(for example, reason
for Pay In / Pay Out)
Copy Copy
QuantityInputMethod "Code2" no Determines how the
input of quantity was
done on POS
01 - piece
02 - length
03 - area
04 - volume, space
05 - weight
06 - quantity with
decimal places,
automatic input
request
07 - quantity with
decimal places,
quantity button
Copy Copy
Length "Quantity" no The registered length Copy Copy
Width "Quantity" no The registered width Copy Copy
SDK Promotion Calculation Engine
94 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
Height "Quantity" no The registered height Copy Copy
ManualWeightInputFl
ag
BIT yes Describes how the
weight was registered
Copy Copy
ReceiptText "NNameGK" no The receipt printout
text
Copy Copy
ReceiptDescription "NDescriptionShortGK
"
no The item description Copy Copy
WICFlag BIT yes A flag denoting if this
Item is allowed in a
WIC transaction
Copy Copy
AllowFoodStampFlag BIT yes A flag to indicate
whether food stamps
can be tendered for
this item
Copy Copy
RegistrationNumber "DescriptionShort" no The complete number
which was registered
on the POS originally
Copy Copy
NegativeLineItemFlag BIT yes If this flag is set to
true, automatically a
negative line item is
created when
registering this item.
Corresponds to
ItemSellingRule.Negat
iveLineItemFlag.
Copy Copy
DiscountFlag BIT yes A flag to indicate
whether this ITEM can
be discounted.
Corresponds to
Item.DiscountFlag.
Copy Copy
FrequentShopperPoin
tsEligibilityFlag
BIT yes A flag to denote that
the Item is eligible for
frequent shopper
points.
Corresponds to
ItemSellingRule.Frequ
entShopperPointsEligi
bilityFlag.
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 95
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
DiscountTypeCode VARCHAR(1) no A code which is used
by the Promotion
Calculation Engine in
order to determine
whether the item can
get rebate/points;
possible values: 0..9
Corresponds to
ItemSellingRule.Disco
untTypeCode.
Copy Copy
PriceChangeTypeCod
e
"Code2" no Describes how the
price of the item can
be changed on POS.
Corresponds to
ItemSellingRule.Price
ChangeTypeCode.
'00'/null: POS function
"price change" behaves
as before, i.e. price
change is possible
inside the limits which
are given by the
function's properties,
but price change to
0,00 is impossible
'01': price change is
possible inside the
limits which are given
by the function's
properties, price
change to 0,00 is
possible, too
'02': absolutely no price
changes are possible
(also not to 0,00)
Copy Copy
PriceTypeCode "Code2" no The price type code Copy Copy
GrandExtendedAmou
nt
"Money" yes The line item total
including taxes and
discounts
see chapter
Transaction
Calculation Rules
Invert New
ReasonCodeGroupCo
de
"Code" no A retailer assigned
code denoting the
family of related
reason codes for
classifying data and
actions within the
systems of the retail
enterprise
Copy Copy
SDK Promotion Calculation Engine
96 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
ReasonDescription "DescriptionNarrative
"
no A narrative
description describing
the use of the retailer
assigned reason code
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
XXCustom06 VARCHAR(256) no Customizable
information
XXCustom07 VARCHAR(256) no Customizable
information
XXCustom08 VARCHAR(256) no Customizable
information
XXCustom09 VARCHAR(256) no Customizable
information
XXCustom10 VARCHAR(256) no Customizable
information
XXCustom11 VARCHAR(256) no Customizable
information
XXCustom12 VARCHAR(256) no Customizable
information
XXCustom13 VARCHAR(256) no Customizable
information
XXCustom14 VARCHAR(256) no Customizable
information
XXCustom15 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 97
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
NotConsideredByLoya
ltyEngineFlag
BIT yes Determines whether
the Promotion
Calculation Engine
should care about the
line item as a trigger.
this information is
needed because it
may happen that
another process (for
example, a return
regarding to an
existing transaction)
applies rules for the
line item which the
Promotion Calculation
Engine is not allowed
to change.
Copy Copy
MerchandiseHierarch
yGroupName
"Name" no The business name
for the merchandise
structure
Copy Copy
MerchandiseHierarch
yGroupDescription
"DescriptionShort" no A description of the
merchandise
structure
Copy Copy
ItemClassCode "Code4" no Item class code Copy Copy
ProhibitTaxExemptFla
g
BIT yes If this flag is set to
true, no tax
exemption is allowed
for the line item.
Copy Copy
ProhibitReturnFlag BIT yes A flag to denote
whether or not this
item may be returned
Copy Copy
WarrantyDuration "QuantityTransaction
Count"
no The duration of the
item's warranty (in
months)
Copy Copy
DepositTypeCode "Code2" no Deposit type of the
item
00/null - item is no
deposit item
02 - item is deposit on
refillable containers
("Mehrweg")
01 - item is deposit on
non-refillable
containers
Copy Copy
SDK Promotion Calculation Engine
98 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
TaxExemptCode "Code2" no A code to denote the
tax exemption status
from sales and use tax
Copy Copy
InvoiceID "IdentityAlphaNumeri
c40"
no The ident of the
invoice which is
related to this line
item
Copy Copy
MainPOSItemID "IdentityGTIN" no The main POS item id Copy Copy
MainMerchandiseHier
archyGroupIDQualifie
r
"Code4" no A qualifier which is
used to differ
between
MerchandiseHierarch
yGroups belonging to
different functions
but having the same
id
Copy Copy
MainMerchandiseHier
archyGroupID
"IdentityAlphaNumeri
c40"
no Unique system
assigned identifier for
the merchandise
group
Copy Copy
TaxReductionAmount "Money" yes The amount that
reduces the taxable
amount of a line item
Invert Copy
TaxGroupID "Code" no The id of the taxable
TaxableGroup
Copy Copy
TaxReceiptPrintCode "Code2" no A short code that is
printed on a receipt
to denote items that
are in this
TaxableGroup
Copy Copy
TareCount Quantity16_3GK no The tare weight of the
item
Copy Copy
OriginalTaxGroupID "Code" no The original id of the
taxable group
Copy Copy
ReturnLineItem ReturnLineItem no Additional return data Copy Copy
SaleReturnLineItemSa
lesOrder
SaleReturnLineItemSa
lesOrder
no Additional data for
sales order
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 99
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
SerializedUnitModifer SerializedUnitModifer no Serial number Copy Copy
SaleReturnLineItemEx
tensionList
SaleReturnLineItemEx
tension[0..*]
no List of line item
extensions
Copy Copy
SaleReturnLineItemCo
llectionList
SaleReturnLineItemCo
llection[0..*]
no List of related set
items
Copy Copy
SaleReturnLineItemPr
iceList
SaleReturnLineItemPri
ce[0..*]
no List of prices Copy Copy
SaleReturnTaxLineIte
mList
SaleReturnLineItemTa
x[0..*]
no List of line item
related taxes
Copy -
LineItemAssociate LineItemAssociate no Line item associate Copy Copy
(Retrie
ve,
Repetit
ion,
Interna
lVoid)
RetailPriceModifierLis
t
RetailPriceModifierLis
t[0..*]
no List of line item
discounts
Copy Partial
Copy -
MAPO
(Retrie
ve,
Repetit
ion,
Interna
lVoid)
-
(Retur
n)
FrequentShopperPoin
tsModifierList
FrequentShopperPoin
tsModifier[0..*]
no List of line item points
discounts
Copy -
SDK Promotion Calculation Engine
100 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Trans
action
CopyLi
neItem
SaleReturnLineItemPr
omotionTriggerList
SaleReturnLineItemPr
omotionTrigger[0..*]
no Line of line item
promotion triggers
Copy Copy
(Retrie
ve,
Repetit
ion,
Interna
lVoid)
-
(Retur
n)
SaleReturnTaxExempt
Trigger
SaleReturnTaxExempt
Trigger
no Tax exempt data Copy Copy
(Retrie
ve,
Repetit
ion,
Interna
lVoid)
-
(Retur
n)
SaleReturnLineItemCh
aracteristicList
SaleReturnLineItemCh
aracteristic[0..*]
no List of characteristics Copy Copy
SaleReturnLineItemM
odifierCouponList
SaleReturnLineItemM
odifierCoupon[0..*]
no List of used coupons Copy -
SaleReturnLineItemM
odifierReferenceList
SaleReturnLineItemM
odifierReference[0..*]
no List of line items that
caused a condition
Copy -
SaleReturnLineItemM
erchandiseHierarchyG
roupList
SaleReturnLineItemM
erchandiseHierarchyG
roup[0..*]
no List of merchandise
groups that are
directly linked to the
item
Copy Copy
5.1.4.7.2.3 entity ReturnLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
New New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 101
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may
be assembled from
alternate key members.
New New
RetailTransactionLineIte
mSequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
ReturnReasonCode "Code" no The code of the return
reason
Return
reason
Copy Copy
ReturnReasonDescriptio
n
"DescriptionNarrati
ve"
no A narrative description
describing the use of
the retailer assigned
return reason code
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.2.4 entity VoidsLineItem
Field Domain (Datatype) Manda-
tory Description Calculation Rule
Comme
nt
Invert
Transaction
BusinessUnitGroupID Identity Yes A unique system
assigned identifier for a
group of BusinessUnits
New
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may
be assembled from
alternate key members.
New
SDK Promotion Calculation Engine
102 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description Calculation Rule
Comme
nt
Invert
Transaction
RetailTransactionLineIte
mSequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
VoidsLineItemSequence
Number
"LineNumber" no Link to the sequence
number of the voided
line item
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.2.5 entity TenderLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Checke
d
Invert
Transactio
n
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
General Y New
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may be
assembled from alternate
key members.
General Y New
RetailTransactionLineIte
mSequenceNumber
"LineNumber" yes The sequence number of
line item within the
context of this
RetailTransaction
General Y Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 103
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Checke
d
Invert
Transactio
n
IsChangeFlag "Flag" yes If true, denotes that the
Tender is returned by the
retailer to the Customer.
General true - tender
is returned to
the customer
false -
customer
pays with the
tender
Y
default
value
Invert
TenderTypeCode "Code4" yes A code which uniquely
identifies the tender.
Corresponds to
Tender.TenderTypeCode
General Y Copy
TenderAccountNumber "IdentityAlphaNum
eric40"
no The tender account
number
Function
specific
Copy
ForeignCurrencyAmoun
t
"MoneyShortRetail" yes The monetary value (in
the currency submitted
by the Customer) of the
tender submitted by the
Customer.
Foreign
currency
amount.
For main
currency it is
filled by
main
currency
amount.
Y Invert
ExchangeRate "MoneyShortCost" no The exchange rate used
to convert the tendered
amount into the default
currency of the retail
enterprise
General Y Copy
TenderAmount "Money" yes The monetary value (in
the default currency of
the retail enterprise) of
the tender submitted by
the Customer
Function
specific
Y Invert
TenderGroupCode VARCHAR(20) yes The grouping of tenders
with similar (technical)
handling on POS side.
Corresponds to
TenderHandlingRule.Tend
erGroupCode.
General Y Copy
SDK Promotion Calculation Engine
104 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Checke
d
Invert
Transactio
n
TenderCount "QuantityShortCoun
t"
yes The count of the media
for the given tender
Function
specific
Default: 1
Y
default
value
Invert
TenderDescription "NDescriptionShort
GK"
no Text to be printed on the
receipt
General Y Copy
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
XXCustom06 VARCHAR(256) no Customizable information
XXCustom07 VARCHAR(256) no Customizable information
XXCustom08 VARCHAR(256) no Customizable information
XXCustom09 VARCHAR(256) no Customizable information
XXCustom10 VARCHAR(256) no Customizable information
XXCustom11 VARCHAR(256) no Customizable information
XXCustom12 VARCHAR(256) no Customizable information
XXCustom13 VARCHAR(256) no Customizable information
XXCustom14 VARCHAR(256) no Customizable information
XXCustom15 VARCHAR(256) no Customizable information
CashbackFlag BIT yes Boolean identifier for
cash back
Function
specific
Default:
false
Y (set
default
value)
Copy
ForeignISOCurrencyCod
e
"ISO_4217_Currenc
yCode_char(3)"
yes Currency code designated
by ISO to identify the
currency of the tender
General Tender.ISOCu
rrencyCode
Y Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 105
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Checke
d
Invert
Transactio
n
ExchangeRateMultiplyFl
ag
BIT yes Determines whether
inside the calculation
FromCurrencyID ->
ToCurrencyID the amount
is to be multiplied with
(true) or divided by (false)
the factor (ExchangeRate)
General Y Copy
CurrencySymbol "NNameGK" no Currency symbol of the
tender
General Y Copy
5.1.4.7.2.6 entity RoundingLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
New
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may be
assembled from alternate
key members.
New
RetailTransactionLineIte
mSequenceNumber
"LineNumber" yes The sequence number of
line item within the
context of this
RetailTransaction
Copy
RoundUpFlag "Flag" yes A flag denoting that the
amount was rounded up
Invert
Amount "MoneyShortRetail" yes The applied rounding
difference
Invert
TypeCode "Code2" yes Determines which part of
the transaction the
rounding applies to.
Possible values include
codes for change,
subtotal.
00 -
Subtotal
01 -
Change
Copy
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
SDK Promotion Calculation Engine
106 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
OverrideTimestampUTC
0
"TimeStampUTC0G
K"
no The UTC0 date and time
that a transaction line
item is being overridden
5.1.4.7.3 Authorization
5.1.4.7.3.1 entity TransactionResourceOverride
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
TransactionID "IdentityTransactionExternalG
K"
yes A universally unique
identifier (UUID) for the
Transaction. This may be
assembled from alternate
key members.
OverrideSequenceNumbe
r
"LineNumber" yes A unique identifier (within
the context of the
Transaction) for this
ResourceOverride
ResourceID "IdentityAlphaNumeric40" no A unique system assigned
identifier for the action to
which access may be
granted
OperatorID "IdentityAlphaNumeric" yes A unique, automatically
assigned number used to
identify a workstation
OPERATOR
OverrideTimestamp "TimeStampAudit" no The date and time that a
transaction line item is
being overridden
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 107
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
EntryMethodCode "Code2" no A code denoting how the
overriding Operator was
entered, for example,
Keyed, Scanned, MCR,
etc...
"KE" -
Keyed
"SC" -
Scanned
"MR" -
MSR
"FP" -
Fingerpri
nt
"KL" -
Keylock
ApproverName "NNameGK" no The name of the person
assigned to the WorkerID
that was used to approve
this
TransactionResourceOverri
de
ApproverFirstName "NNameGK" no The first name of the
person assigned to the
WorkerID that was used to
approve this transaction
resource override
WorkGroupID "IdentityAlphaNumeric40" no A unique system assigned
identifier for a set of
Operators with similar
resource access control
permissions
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
WorkerID "IdentityAlphaNumeric40" no A unique system-assigned
identifier for the Person
who is a particular Worker
SDK Promotion Calculation Engine
108 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.7.3.2 entity RetailTransactionLineItemResourceOverride
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Copy
LineItem
BusinessUnitGroupID Identity yes A unique system
assigned identifier
for a group of
BusinessUnits
New
TransactionID "IdentityTransactionExternalG
K"
yes A universally unique
identifier (UUID) for
the Transaction.
This may be
assembled from
alternate key
members.
New
RetailTransactionLineItem
SequenceNumber
"LineNumber" yes The sequence
number of line item
within the context
of this
RetailTransaction
New
ResourceOverrideSequen
ceNumber
INTEGER yes Line number
(incremental
counter)
New
ResourceID "IdentityAlphaNumeric40" no A unique system
assigned identifier
for the action to
which access may
be granted to some
Operators and
Workstations
Copy
OperatorID "IdentityAlphaNumeric" yes A unique,
automatically
assigned number
used to identify a
workstation
OPERATOR
Copy
OverrideTimestamp "TimeStampAudit" no The date and time
that a transaction
line item is being
overridden
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 109
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Copy
LineItem
EntryMethodCode "Code2" no A code denoting
how the overriding
Operator was
entered, for
example, Keyed,
Scanned, MCR, etc...
"KE" -
Keyed
"SC" -
Scann
ed
"MR"
- MSR
"FP" -
Finger
"KL" -
Keylo
ck
Copy
ApproverName "NNameGK" no The name of the
person assigned to
the WorkerID that
was used to
approve this
LineItemResourceO
verride
Copy
ApproverFirstName "NNameGK" no The first name of
the person assigned
to the WorkerID
that was used to
approve this line
item resource
override
Copy
WorkGroupID "IdentityAlphaNumeric40" no A unique system
assigned identifier
for a set of
WorkerID with
similar resource
access control
permissions
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
110 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Copy
LineItem
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
WorkerID "IdentityAlphaNumeric40" no A unique system-
assigned identifier
for the Person who
is a particular
Worker
Copy
OverrideTimestampUTC0 "TimeStampUTC0GK" no The UTC0 date and
time that a
transaction line
item is being
overridden
Copy
5.1.4.7.4 Discounts
5.1.4.7.4.1 entity RetailTransactionPromotionPriceDerivationRule
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
BusinessUnitGroupID Identity yes A unique system
assigned identifier
for a group of
BusinessUnits
New
TransactionID "IdentityTransactionExternalG
K"
yes A universally unique
identifier (UUID) for
the Transaction.
This may be
assembled from
alternate key
members
New
PromotionID "Identity" yes The unique
identifier of the
promotion
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 111
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
PriceDerivationRuleID "Identity" yes The unique
identifier of the
price derivation rule
Copy
PriceDerivationRuleEligibi
lityID
"Identity" yes The unique
identifier of the root
eligibility
Copy
PromotionDescription "NDescriptionShortGK" no Short description of
the promotion
Copy
ReceiptPrinterName "NNameGK" no Text to be printed
on the receipt
Copy
PromotionPriceDerivation
RuleSequence
BIGINT no Sequence - for
collision handling
Copy
PromotionPriceDerivation
RuleResolution
BIGINT no Resolution - for
collision handling
Copy
PromotionPriceDerivation
RuleTypeCode
"Code4" no The typecode of the
promotion price
derivation rule
Copy
SDK Promotion Calculation Engine
112 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
TransactionControlBreakC
ode
"Code2" no This type code
defines the base for
applying the
condition and it
defines the
calculation time.
line item
discount,
calculated
after each
line item
(„PO“)
line item
discount,
calculated
after
subtotal
(“PC”)
transactio
n discount,
calculated
after each
line item
(“SP”)
transactio
n discount,
calculated
after
subtotal
(„SU“)
Copy
PriceModificationMethod
Code
"Code2" no A code denoting the
method of
modifying the price
that is being applied
to the transaction
resp. line item
Copy
PriceDerivationRuleDescri
ption
"DescriptionShort" no Business description
for this price
derivation rule
Copy
PromotionOriginatorType
Code
"Code2" no The typecode of the
originator of the
promotion
Copy
ExternalPromotionID "DescriptionShort" no The external
identifier of the
promotion
Copy
ExternalPriceDerivationRu
leID
"DescriptionShort" no The external
identifier of the
price derivation rule
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 113
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
TriggerQuantity "Quantity" yes The quantity of
items fulfilling the
eligibility which is
required to be
purchased to trigger
the price derivation
rule
Copy
GiftCertificateExpirationD
ate
"DateCalendar" no End of the date
range in which the
gift certificate is
valid
Copy
SDK Promotion Calculation Engine
114 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
DiscountMethodCode "Code2" no Determines how the
discount influences
the transaction
00/null:
the rebate
reduces
the
transactio
n total
01: the
rebate
does not
influence
the
transactio
n total or
the
amount
the
customer
has to pay,
but the
customer
gets a gift
certificate
about the
rebate
amount
which he
can use for
payment
the next
time
02: the
rebate is
used as
tender for
the
current
transactio
n, i.e. it
reduces
the
amount
the
customer
still has to
pay
03: the
rebate
reduces
the
transactio
n total but
it will be
counterbal
anced by
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 115
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
some gift
certificate
sale.
04: a
coupon
will be
given to
the
customer
instead of
a rebate.
Transactio
n total will
not be
reduced.
05: an
action is to
be
performed
by the
client
which
invoked
the
Promotion
Calculation
Engine
FrequentShopperPointsFl
ag
BIT yes Determines
whether discount or
frequent shopper
points are awarded
by the price
derivation rule
Copy
CustomerGroupLoyaltyPo
intsDefaultQuantity
"Quantity" yes The count of default
loyalty points
assigned to the
customer group
Copy
SDK Promotion Calculation Engine
116 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
ProhibitPrintFlag BIT yes Determines
whether the result
of the applied price
derivation rule is to
be suppressed on
displays / not
printed on the
receipt; for
example, line item-
related default
points are not
printed after each
position, but only
summarized at the
end of the receipt.
Copy
TenderTypeCode "Code4" no A code which
uniquely identifies
the tender in case
of rebate as tender
Copy
PromotionTypeName "NNameGK" no Promotion type
name
Copy
CalculationBase "Code2" no Defines the
calculation base for
transaction related
discounts
Copy
PointsConversionAmount "Money" yes Exchange rate for
the conversion from
points into local
currency
Copy
NoEffectOnSubsequentPri
ceDerivationRulesFlag
BIT yes Determines
whether applying
this price derivation
rule influences the
calculation base of
subsequent price
derivation rules
(false) or not (true)
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 117
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
ProhibitTransactionRelate
dPriceDerivationRulesFlag
BIT yes Determines
whether applying
this price derivation
rule influences the
calculation base of
subsequent
transaction-related
price derivation
rules (false) or not
(true); is relevant
for line item-related
"money" price
derivation rules
only.
Copy
CouponPrintoutID "IdentityAlphaNumeric40" no The number of the
printout coupon
Copy
CouponPrintoutRule "Code2" no The type code of
the printout rule.
null / '00' - separate
receipt
'01' - print at the
end of the current
transaction receipt
Copy
CouponPrintoutText "Image" no The formatted text
of the printout
coupon
Copy
ExclusiveFlag BIT yes Determines
whether this price
derivation rule is an
exclusive one
Copy
RequireUserInteractionFl
ag
BIT yes Determines
whether an
additional user
interaction
(pressing a button)
is necessary in order
to fulfill the
eligibility for
applying the price
derivation rule
Copy
SDK Promotion Calculation Engine
118 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
ConsiderPreviousPriceDer
ivationRulesFlag
BIT yes Indicates whether
all price derivation
rules which were
applied before are
to be considered
(true) or not (false)
Copy
ConcurrenceControlVecto
r
"Code" no Determines how
this price derivation
rule works in
relation to other
applicable price
derivation rules
Copy
AppliedCount "QuantityShortCount" yes Describes how often
the current price
derivation rule was
applied
Copy
PrintoutValidityPeriod "QuantityDayCount" yes Describes how long
(how many days)
the printed
coupon/gift
certificate is valid
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
XXCustom06 VARCHAR(256) no Customizable
information
XXCustom07 VARCHAR(256) no Customizable
information
XXCustom08 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 119
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
XXCustom09 VARCHAR(256) no Customizable
information
XXCustom10 VARCHAR(256) no Customizable
information
XXCustom11 VARCHAR(256) no Customizable
information
XXCustom12 VARCHAR(256) no Customizable
information
XXCustom13 VARCHAR(256) no Customizable
information
XXCustom14 VARCHAR(256) no Customizable
information
XXCustom15 VARCHAR(256) no Customizable
information
ExternalActionID "Name60GK" no The ident of the
action which is to
be performed by
the client which
invoked the
Promotion
Calculation Engine
Copy
ExternalActionDescription "DescriptionShort" no The description of
the action which is
to be performed by
the client which
invoked the
Promotion
Calculation Engine
Copy
ExternalActionTextList RetailTransactionPromotionE
xternalActionText[0..*]
no The texts for the
action which is to
be performed by
the client which
invoked the
Promotion
Calculation Engine
Copy
SDK Promotion Calculation Engine
120 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment
Invert
Transactio
n
ExternalActionParameterL
ist
RetailTransacionPromotionEx
ternalActionParameter[0..*]
no The parameters for
the action which is
to be performed by
the client which
invoked the
Promotion
Calculation Engine
Copy
5.1.4.7.4.2 entity RetailTransactionPromotionExternalActionText
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier
for a group of
BusinessUnits
New
TransactionID "IdentityTransactionExternalG
K"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
PromotionID "Identity" yes The unique identifier
of the promotion
Copy
PriceDerivationRuleID "Identity" yes The unique identifier
of the price
derivation rule
Copy
PriceDerivationRuleEligibi
lityID
"Identity" yes The unique identifier
of the root eligibility
Copy
TextID "Name60GK" yes The text ident Copy
Text "DescriptionShort" yes The text itself Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 121
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment Invert
Transaction
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.4.3 entity RetailTransactionPromotionExternalActionParameter
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier
for a group of
BusinessUnits
New
TransactionID "IdentityTransactionExternalG
K"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
PromotionID "Identity" yes The unique identifier
of the promotion
Copy
PriceDerivationRuleID "Identity" yes The unique identifier
of the price
derivation rule
Copy
PriceDerivationRuleEligibi
lityID
"Identity" yes The unique identifier
of the root eligibility
Copy
ParameterID "Name60GK" yes The parameter ident Copy
ParameterValue "DescriptionShort" yes The parameter value Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
122 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calcul
ation
Rule
Comment Invert
Transaction
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.4.4 entity RetailPriceModifier
Field Domain (Datatype) Manda-
tory Description
Calculat
ion
Rule
Comment Invert
Transaction
CopyLine
Item
BusinessUnitGroupID Identity yes A unique system
assigned identifier
for a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally
unique identifier
(UUID) for the
Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineItem
SequenceNumber
"LineNumber" yes The sequence
number of line
item within the
context of this
RetailTransaction
New New
RetailPriceModifierSeque
nceNumber
"LineNumber" yes The sequence
number for this
RetailPriceModifie
r allowing more
than one price
modification to
occur on each
retail transaction
line item
Copy Copy
PromotionID "Identity" no The unique
identifier of the
promotion
Copy Copy
PriceDerivationRuleID "Identity" no The unique
identifier of the
price derivation
rule
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 123
Field Domain (Datatype) Manda-
tory Description
Calculat
ion
Rule
Comment Invert
Transaction
CopyLine
Item
PriceDerivationRuleEligibi
lityID
"Identity" no The unique
identifier of the
root eligibility
Copy Copy
ReasonCode "Code" no The reason code
for manual price
overrides
Copy Copy
PreviousPrice "MoneyShortRetail" no The unit price that
was valid before
manual price
override
Copy Copy
Percent "Percent" no The percentage
value in case of
percentage price
modifiers
Copy Copy
Amount "Money" yes The total amount
of the retail price
modifier
Invert Copy
CalculationMethodCode "Code4" no A type code used
to identity manual
price overrides
"MA
PO"
-
Man
ual
Price
Over
ride
Copy Copy
AdjustmentMethodCode "Code2" no A mnemonic code
denoting what
kind of adjustment
is being made to
the retail price of
the Item (Increase,
Decrease)
"IC"
-
Incre
ase
(surc
harg
e)
"DC"
-
Decr
ease
(disc
ount
)
Copy Copy
SDK Promotion Calculation Engine
124 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculat
ion
Rule
Comment Invert
Transaction
CopyLine
Item
NewPrice "MoneyShortRetail" no The unit price that
was the result of
the price
modification
Copy Copy
EligibilityTypeCode "Code4" no The type code of
the root eligibility
Copy Copy
ExtendedAmountBefore
Modification
"Money" yes The retail sale
total price of the
line item before
applying the
current price
modifier
Invert Copy
ExtendedAmountAfterMo
dification
"Money" yes The retail sale
total price of the
line item after
applying the
current price
modifier
Invert Copy
AppliedQuantity "Quantity" yes The quantity the
price modifier
applies to
Copy Copy
TriggerSequenceNumber "LineNumber" no The ident of the
manual trigger
(because one line
item can have
more than one
trigger)
Copy Copy
ReasonDescription "DescriptionNarrative" no A narrative
description
describing the
reason for manual
price overrides
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 125
Field Domain (Datatype) Manda-
tory Description
Calculat
ion
Rule
Comment Invert
Transaction
CopyLine
Item
XXCustom05 VARCHAR(256) no Customizable
information
ExtraAmount "Money" yes A monetary
amount which
results from
applying a price
modifier but does
not affect the line
item total
Invert Copy
RoundingAmount "Money" yes The monetary
amount that the
price modifier was
adjusted by
Invert Copy
ExternalSystemOriginator
Flag
BIT yes Determines
whether this entry
was created by an
external system - if
yes, it must not be
changed, but own
price modifications
with higher
sequence may be
applied
Copy Copy
ProrateFrom "LineNumber" no The sequence
number of the
PriceModificationL
ineItem.
Only filled for
discount shares of
transaction related
discounts.
Copy Copy
CalculationBaseAmount "Money" yes The amount which
was used as base
for calculation of
the price
modification
Invert Copy
SDK Promotion Calculation Engine
126 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.7.4.5 entity FrequentShopperPointsModifier
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may
be assembled from
alternate key members.
New
RetailTransactionLineItem
SequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
FrequentShopperPointsM
odifierSequenceNumber
"LineNumber" yes The sequence number
for this
FrequentShopperPoints
Modifier allowing more
than one points'
modification to occur
on each retail
transaction line item.
Copy
PromotionID "Identity" no The unique identifier of
the promotion
Copy
PriceDerivationRuleID "Identity" no The unique identifier of
the price derivation rule
Copy
PriceDerivationRuleEligibi
lityID
"Identity" no The unique identifier of
the root eligibility
Copy
TriggerSequenceNumber "LineNumber" no The ident of the manual
trigger (because one
line item can have more
than one trigger)
Copy
EligibilityTypeCode "Code4" no The type code of the
root eligibility
Copy
FrequentShopperPointsEa
rnedCount
"Quantity" yes The number of frequent
shopper points earned
Invert
FrequentShopperPointsEa
rnedAmount
"Money" yes The money equivalent
(expressed in local
currency) to the
number of frequent
shopper points earned
Invert
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 127
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
AppliedQuantity "Quantity" yes The quantity the points'
modifier applies to
Copy
ComputationBaseAmount "Money" yes The amount which was
used as base for the
points' calculation
Invert
ExternalSystemOriginator
Flag
BIT yes Determines whether
this entry was created
by an external system -
if yes, it must not be
changed, but own price
modifications with
higher sequence may
be applied
Copy
ProrateFrom "LineNumber" no The sequence number
of the
LoyaltyRewardLineItem.
Only filled for point
shares of transaction
related points
discounts.
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
PointsPercentage "PercentExtendedGK" no The points calculation
rule to be applied,
expressed as a
percentage of the
calculation base.
Corresponds to
ItemPriceDerivationRul
e.PriceModificationPerc
ent if available.
Copy
SDK Promotion Calculation Engine
128 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.7.4.6 entity PriceModificationLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may
be assembled from
alternate key members.
New
RetailTransactionLineItem
SequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
PromotionID "Identity" no The unique identifier of
the promotion
Copy
PriceDerivationRuleID "Identity" no The unique identifier of
the price derivation rule
Copy
PriceDerivationRuleEligibi
lityID
"Identity" no The unique identifier of
the root eligibility
Copy
Percentage "Percent" no The percentage value in
case of percentage
price modifiers
Copy
RoundingAmount "MoneyShortRetail" no The monetary amount
that the price
modification was
adjusted by (after
calculation from the
percentage)
Invert
Amount "Money" yes The monetary value of
the price modification
that was given
Invert
ProRatedFlag "Flag" yes Indicates if this price
modification was pro-
rated across all of the
Items in the
RetailTransaction.
Always true.
always
true
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 129
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
TriggerSequenceNumber "LineNumber" no The ident of the manual
trigger (because a
transaction item can
have more than one
trigger)
Copy
ExtendedAmountBefore
Modification
"Money" yes The retail sale total
price of the transaction
before applying the
current price
modification line item
Invert
ExtendedAmountAfterMo
dification
"Money" yes The retail sale total
price of the transaction
before applying the
current price
modification line item
Invert
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
ExtraAmount "Money" yes A monetary amount
which results from
applying a price
modification line item
but does not affect the
transaction total
Invert
ExternalSystemOriginator
Flag
BIT yes Determines whether
this entry was created
by an external system -
if yes, it must not be
changed, but own price
modifications with
higher sequence may
be applied
Copy
SDK Promotion Calculation Engine
130 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
CalculationBaseAmount "Money" yes The amount which was
used as base for
calculation of the price
modification
Invert
5.1.4.7.4.7 entity LoyaltyRewardLineItem
Field Domain (Datatype) Manda
tory Description
Calculation
Rule Comment
InvertTrans
action
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may
be assembled from
alternate key members.
New
RetailTransactionLineItem
SequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
PointsAwardedCount "Quantity" no The number of loyalty
points awarded
Invert
LoyaltyRewardTypeCode "Code2" no Describes the kind of
loyalty reward, possible
values include frequent
shopper points,
coupon, gift certificate
null or
"PO" -
Points
"GC" -
Gift
Certifica
te
"CO" -
Coupon
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 131
Field Domain (Datatype) Manda
tory Description
Calculation
Rule Comment
InvertTrans
action
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
PromotionID "Identity" no The unique identifier of
the promotion
Copy
PriceDerivationRuleID "Identity" no The unique identifier of
the price derivation
rule
Copy
PriceDerivationRuleEligibi
lityID
"Identity" no The unique identifier of
the root eligibility
Copy
FrequentShopperPointsEa
rnedAmount
"Money" yes The money equivalent
(expressed in local
currency) to the
number of frequent
shopper points earned
(PointsAwardedCount)
Invert
TriggerSequenceNumber "LineNumber" no The ident of the manual
trigger (because one
line item can have
more than one trigger)
Copy
ComputationBaseAmount "Money" yes The amount which was
used as base for the
points' calculation
Invert
ExternalSystemOriginator
Flag
BIT yes Determines whether
this entry was created
by an external system -
if yes, it must not be
changed, but own price
modifications with
higher sequence may
be applied
Copy
CouponNumber "IdentityAlphaNumeric40
"
no The number of the
coupon the customer
gets
Copy
CouponAmount "Money" yes The monetary value of
the coupon the
customer gets
Copy
SDK Promotion Calculation Engine
132 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda
tory Description
Calculation
Rule Comment
InvertTrans
action
GiftCertificateFaceValueA
mount
"Money" yes The monetary value
printed or embossed on
the GIFT CERTIFICATE
Copy
PointsPercentage "PercentExtendedGK" yes The points calculation
rule to be applied,
expressed as a
percentage of the
calculation base.
Corresponds to
ItemPriceDerivationRul
e.PriceModificationPerc
ent if available.
Copy
5.1.4.7.4.8 entity SaleReturnLineItemModifierReference
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
PromotionID "Identity" yes The unique identifier
of the promotion
Copy
PriceDerivationRuleID "Identity" yes The unique identifier
of the price derivation
rule
Copy
PriceDerivationRuleEligibil
ityID
"Identity" yes The unique identifier
of the root eligibility
Copy
RetailTransactionLineItem
SequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 133
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
ReferenceQuantity "Quantity" yes The quantity share of
that line item which
was necessary for
fulfilling the price
derivation rule
eligibilities
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.4.9 entity SaleReturnLineItemPromotionTrigger
Field Domain (Datatype) Manda-
tory Description
Calculat
ion Rule
Comme
nt
Invert
Transaction
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineItem
SequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
TriggerSequenceNumber "LineNumber" yes The ident of the
trigger (because one
line item can have
more than one trigger)
Copy Copy
SDK Promotion Calculation Engine
134 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculat
ion Rule
Comme
nt
Invert
Transaction
CopyLineIt
em
TriggerType "Code2" yes The type of the trigger
(referencing to POS
configuration)
Copy Copy
TriggerValue "NDescriptionShortGK" yes The value of the
trigger (referencing to
POS configuration)
Copy Copy
PrivilegeType "Code2" yes Defines the method
for price modification
Copy Copy
PrivilegeValue "Money" yes Reduction amount,
reduction percent or
new price amount
Copy Copy
ReasonCode "Code" no Reason code for the
manual discount
Copy Copy
ReasonDescription "DescriptionNarrative" no A narrative description
describing the manual
discount reason.
Copy Copy
Reference "NDescriptionShortGK" no An additional
information
concerning the trigger
Copy Copy
TriggerSequenceAddend "Identity" yes A value which is to be
added to the sequence
of the condition
(which comes from the
master data)
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 135
5.1.4.7.4.10 entity RetailTransactionPromotionTrigger
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionExte
rnalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
TriggerSequenceNumber "LineNumber" yes The ident of the
trigger (because a
transaction item can
have more than one
trigger)
Copy
TriggerType "Code2" yes The type of the trigger
(referencing to POS
configuration)
Copy
TriggerValue "DescriptionShort" yes The value of the
trigger (referencing to
POS configuration)
Copy
PrivilegeType "Code2" yes Defines the method
for price modification.
Copy
PrivilegeValue "Money" yes Reduction amount,
reduction percent or
new price amount
Copy
ReasonCode "Code" no Reason code for the
manual discount
Copy
ReasonDescription "DescriptionNarrative" no A narrative
description describing
the manual discount
reason.
Copy
Reference "DescriptionShort" no An additional
information
concerning the trigger
Copy
SDK Promotion Calculation Engine
136 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
TriggerSequenceAddend "Identity" yes A value which is to be
added to the
sequence of the
condition (which
comes from the
master data)
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.4.11 entity RetailTransactionExternalTrigger
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
TriggerTypeCode "Code2" yes The type of the
TriggerValue, for
example,
00 - turnover of the
(current) year
01 - rebate amount
which was granted
during the (current)
year
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 137
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
TriggerAmount "Money" yes The value (amount).
Its type is determined
by TriggerTypeCode
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.4.12 entity RetailTransactionCouponSummary
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
CouponNumber "Name" yes The coupon number Copy
InputCount INTEGER yes Count of registered
coupons
Copy
AppliedCount INTEGER no Number of used
coupons
Copy
PrivilegeType "Code2" no Determines how the
new price is to be
calculated in case that
rebate information is
given by
PrivilegeValue
Copy
SDK Promotion Calculation Engine
138 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
PrivilegeValue "Money" no Reduction amount,
reduction percent or
new price amount –
depending on the
chosen PrivilegeType
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
CustomerID IdentityAlphaNumeric
40
no A unique system
assigned identifier for
the Customer
Copy
CustomerAddressTypeCode Code2 no The customer type
code
Copy
5.1.4.7.4.13 entity SaleReturnLineItemModifierCoupon
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
RetailTransactionLineItemS
equenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 139
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
ModifierSequenceNumber "LineNumber" yes The sequence number
of the related
FrequentShopperPoin
tsModifier resp.
RetailPriceModifier
Copy
PromotionID "Identity" yes The unique identifier
of the promotion
Copy
PriceDerivationRuleID "Identity" yes The unique identifier
of the price derivation
rule
Copy
PriceDerivationRuleEligibilit
yID
"Identity" yes The unique identifier
of the root eligibility
Copy
CouponSequenceNumber "LineNumber" yes The sequential
number of the
coupon entry (starting
with 1), in case there
was more than one
coupon registered for
one modifier
Copy
CouponNumber "IdentityAlphaNumeri
c40"
yes The coupon number
that was used to
trigger the modifier
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
140 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.7.4.14 entity RetailTransactionModifierCoupon
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
PromotionID "Identity" yes The unique identifier
of the promotion
Copy
PriceDerivationRuleID "Identity" yes The unique identifier
of the price derivation
rule
Copy
PriceDerivationRuleEligibilit
yID
"Identity" yes The unique identifier
of the root eligibility
Copy
CouponSequenceNumber "LineNumber" yes The sequential
number of the
coupon entry (starting
with 1), in case there
was more than one
coupon registered for
one modifier
Copy
CouponNumber "IdentityAlphaNumeri
c40"
yes The coupon number
that was used to
trigger the modifier
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 141
5.1.4.7.4.15 entity WorkerDiscountLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
RetailTransactionLineItemS
equenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
WorkerID "IdentityAlphaNumeri
c40"
no A unique system-
assigned identifier for
the Person who is a
particular Worker
Copy
WorkerFirstName "NNameGK" no The worker's first
name
Copy
WorkerLastName "NNameGK" no The worker's last
name
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
142 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.7.5 Taxes
5.1.4.7.5.1 entity SaleReturnTaxLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
RetailTransactionLineItemS
equenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
TaxGroupRuleID "Identity" no System assigned
unique identifier for
the TaxGroupRule
Copy
TaxIncludedInPricesFlag "Flag" yes A flag denoting that
all applicable taxes
are included in the
prices for this line
item, and that
therefore this
SaleReturnTaxLineIte
m is merely a
summary of those
taxes.
Copy
TaxAtSourceFlag "Flag" yes A flag denoting that
the goods being sold
and shipped have
been taxed according
to the
TaxAuthorityShipping
Rule
Copy
TaxableAmount "Money" yes The monetary
amount for which tax
is applicable
Invert
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 143
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
TaxablePercent "Percent" no The percentage of the
taxable amount that
is liable for tax.
Usually this is 100%
but where an
aggregate item
contains taxed and
non-taxed goods this
value may be less
than 100%.
Copy
TaxPercent "Percent" yes The percentage of the
taxable portion of the
taxable amount that
is being collected as
tax by this LineItem
Copy
TaxAmount "Money" yes The monetary value
tax that is being
collected by this
LineItem
Invert
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
TaxSequenceNumber "LineNumber" yes Line number
(incremental counter)
of the tax entry
Copy
TaxAuthorityID "Identity" no A specific TAX
AUTHORITY that
establishes the tax
rate. The TAX
AUTHORITY is
normally a
government body
Copy
SDK Promotion Calculation Engine
144 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
TaxAuthorityName "NNameGK" no The name of the tax
authority. This is to be
printed on the receipt
in some cases.
Copy
ReceiptPrintCode "Code2" no A short code that is
printed on a receipt
to denote items that
are in this
TaxableGroup
Copy
SaleReturnTaxOverrideMod
ifier
SaleReturnTaxOverrid
eModifier
no Tax override data Copy
5.1.4.7.5.2 entity TaxLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
RetailTransactionLineItemS
equenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
TaxIncludedInPricesFlag "Flag" yes A flag denoting that
all applicable taxes
are included in the
prices for this line
item, and that
therefore this
SaleReturnTaxLineIte
m is merely a
summary of those
taxes
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 145
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
TaxAtSourceFlag "Flag" yes A flag denoting that
the goods being sold
and shipped have
been taxed according
to the
TaxAuthorityShipping
Rule
Copy
TaxablePercent "Percent" no The percentage of the
taxable amount that
is liable for tax.
Usually this is 100%
but where an
aggregate item
contains taxed and
non-taxed goods this
value may be less
than 100%.
Copy
TaxableAmount "Money" yes The monetary value
of the transaction for
which tax is being
calculated
Invert
TaxPercent "Percent" yes The percentage of the
taxable amount that
should is tax. Derived
by applying the
appropriate
TaxGroupRule and
TaxRateRule.
Copy
TaxAmount "Money" no The monetary
amount of sales Tax
calculated by applying
the appropriate
TaxGroupRule and
TaxRateRule
Invert
TaxGroupRuleID "Identity" no System assigned
unique identifier for
the TaxGroupRule
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
146 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
TaxAuthorityID "Identity" no A specific TAX
AUTHORITY that
establishes the tax
rate. The TAX
AUTHORITY is
normally a
government body.
Copy
TaxAuthorityName "NNameGK" no The name of the tax
authority. This is to be
printed on the receipt
in some cases.
Copy
TaxGroupID "Code" no A tax group which
links a TAX
AUTHORITY to the
merchandise to which
the tax applies
Copy
ReceiptPrintCode "Code2" no A short code that is
printed on a receipt
to denote items that
are in this
TaxableGroup
Copy
5.1.4.7.5.3 entity SaleReturnTaxOverrideModifier
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 147
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
RetailTransactionLineItemS
equenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
TaxGroupRuleID "Identity" yes System assigned
unique identifier for
the TaxGroupRule
Copy
TaxableAmount "MoneyShortRetail" no The monetary
amount for which tax
is applicable at the
new rate
Invert
OriginalTaxAmount "MoneyShortRetail" no The original amount
of Tax that should've
been collected but
wasn't because of this
TaxOverrideModifier
Invert
NewTaxAmount "MoneyShortRetail" no The new amount of
Tax that is being
collected because of
this
TaxOverrideModifier
Invert
OriginalTaxPercent "Percent" no The original tax rate
that should've been
collected but wasn't
because of this
TaxOverrideModifier
Copy
NewTaxPercent "Percent" no The new tax rate that
is being collected
because of this
TaxOverrideModifier
Copy
ReasonCode "Code" no A retailer assigned
reason code denoting
why this TaxOverride
is being granted
Copy
SDK Promotion Calculation Engine
148 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
Invert
Transaction
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
TaxSequenceNumber "LineNumber" yes Line number
(incremental counter)
of the tax entry
Copy
ReasonDescription "DescriptionNarrative
"
no A narrative
description describing
the use of the retailer
assigned tax override
reason code
Copy
5.1.4.7.5.4 entity SaleReturnTaxExemptTrigger
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
Invert
Transaction
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineItemS
equenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy
New
ReasonCode "Code" no Tax exempt reason
code
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 149
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
Invert
Transaction
CopyLineIt
em
ReasonDescription "DescriptionNarrative
"
no A narrative description
for the tax exempt
reason code
Copy Copy
TaxCertificateID "IdentityAlphaNumeri
c"
no The certificate number
assigned to a
purchaser by a tax
authority exempting
the purchaser from tax
in that authority
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.5.5 entity RetailTransactionTaxExemptTrigger
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for the
Transaction. This may be
assembled from alternate
key members.
New
ReasonCode "Code" no Tax exempt reason code Copy
ReasonDescription "DescriptionNarrative
"
no A narrative description
for the tax exempt
reason code
Copy
SDK Promotion Calculation Engine
150 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment InvertTransaction
TaxCertificateID "IdentityAlphaNumeri
c"
no The certificate number
assigned to a purchaser
by a tax authority
exempting the purchaser
from tax in that authority
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6 Additional Line Item data
5.1.4.7.6.1 entity RetailTransactionLineItemAssociation
Field Domain (Datatype) Manda-
tory Description
Calculat
ion Rule Comment
Invert
Transaction
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique system
assigned
identifier for a
group of
BusinessUnits
New New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally
unique identifier
(UUID) for the
Transaction
New New
LineItemSequenceNu
mber
"LineNumber" yes The sequence
number of line
item
Copy New
ToTransactionID "IdentityTransactionExt
ernalGK"
yes The transaction
id of the linked
transaction
*) *)
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 151
Field Domain (Datatype) Manda-
tory Description
Calculat
ion Rule Comment
Invert
Transaction
CopyLineIt
em
ToLineItemSequence
Number
"LineNumber" yes The sequence
number of the
linked line item
*) *)
SDK Promotion Calculation Engine
152 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
LineItemAssociationT
ypeCode
"Code4" yes A retailer
assigned code
denoting the
relationship
between the
two items
"DEPO" -
link from
deposit
line item
to parent
line item
"DEPH" -
link from
parent
line item
to
deposit
line
items
"LIRE" -
link for
line item
repetitio
n to
original
position
"RETU" -
link for
goods
return to
original
position
in sales
receipt
"EMPT" -
link for
empties
return to
position
in
empties
receipt
"SCAL" -
link for
scale
positions
to
position
in scale
receipt
"GIFT" -
link for
gift
basket
position
to
position
in gift
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 153
Field Domain (Datatype) Manda-
tory Description
Calculat
ion Rule Comment
Invert
Transaction
CopyLineIt
em
basket
receipt
"CASH" -
link for
Cashback
"SUSP" -
link for
suspende
d
transacti
ons
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
ToBusinessUnitGroupI
D
Identity yes A unique system
assigned
identifier for the
the business unit
group of the
linked
transaction
*) *)
*) Copy Handling
Records with LineItemAssociationTypeCode in (DEPO, DEPH, LIRE, CASH) are overtaken in the following way:
ToLineItemSequenceNumber is updated to the new LineItemSequenceNumber of the linked line item from
original transaction (this requires that all line items are overtaken and afterwards these association records are
created)
ToTransactionID is updated to new TransactionID
ToBusinessUnitGroupID is updated to new BusinessUnitGroupID
Other records are overtaken in the following way:
ToLineItemSequenceNumber is copied
ToTransactionID is copied
SDK Promotion Calculation Engine
154 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
ToBusinessUnitGroupID is copied
InvertTransaction:
All records are overtaken.
Retrieve:
Records with LineItemAssociationTypeCode in (SUSP) are not overtaken.
Repetition:
Records with LineItemAssociationTypeCode in (DEPO, DEPH, SCAL) are overtaken.
IntervalVoid:
All records are overtaken.
Return:
No records are overtaken.
5.1.4.7.6.2 entity SerializedUnitModifer
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for a
group of
BusinessUnits
New New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally
unique
identifier
(UUID) for the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequence
Number
"LineNumber" yes The sequence
number of
line item
within the
context of this
RetailTransact
ion
Copy New
SerializedItemID "IdentityUUID" yes Fix 0 Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 155
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
SerialNumber "Name" yes The serial
number of the
line item
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6.3 entity SaleReturnLineItemCollection
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for a
group of
BusinessUnits
New New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally
unique
identifier
(UUID) for the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequence
Number
"LineNumber" yes The sequence
number of
line item
within the
context of this
RetailTransact
ion
Copy New
SDK Promotion Calculation Engine
156 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
ItemID "IdentityUUID" yes A unique
identifier for
the item
Copy Copy
Quantity "QuantityIntegerGK" yes The single
quantity of
the item
Copy Copy
Units "Quantity" yes The units of
the item
Copy Copy
ReceiptText "NNameGK" no The receipt
printout text
Copy Copy
ItemBaggingUnitOfMeasureCode "Code4" yes The code used
to specify the
units of the
item
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6.4 entity LineItemAssociate
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for
a group of
BusinessUnits
New New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 157
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally
unique
identifier
(UUID) for the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequence
Number
"LineNumber" yes The sequence
number of
line item
within the
context of
this
RetailTransac
tion
Copy New
WorkerID "IdentityAlphaNumeric4
0"
no A unique
system-
assigned
identifier for
the Person
who is a
particular
Worker
Copy Copy
ActionDatetime "TimeStampAudit" yes The date and
time that the
associate
performed
the action for
which a
commission is
payable
New Copy
WorkerFirstName "NNameGK" no The first
name of the
worker who
served the
customer
Copy Copy
WorkerLastName "NNameGK" no The last name
of the worker
who served
the customer
Copy Copy
SDK Promotion Calculation Engine
158 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
ActionDatetimeUTC0 "TimeStampUTC0GK" yes The UTC0
date and time
that the
associate
performed
the action for
which a
commission is
payable
New Copy
5.1.4.7.6.5 entity GiftCertificateLineItem Can be filled for sale line items, return line items, void line items and tender line items. Will not be used
without one of these line items.
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTrans
action
CopyLin
eItem
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineI
temSequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 159
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTrans
action
CopyLin
eItem
GiftCertificateHandlin
gTypeCode
"Code2" no The type code of gift
certificate that
defines handling rules
for it
01 - gift
certificat
e
02 - gift
certificat
e card
03 -
foreign
gift
certificat
e
04 - gift
certificat
e issued
by the
POS
Copy Copy
GiftCertificateTypeCo
de
"Code2" no Identifies a gift
certificate type.
Corresponds to
GiftCertificateClass.Gi
ftCertificateTypeCode
Copy Copy
BookingSuccessfulTyp
eCode
"Code2" no Determines whether
the transaction
amount was
successfully posted to
the Stored Value
Server.
Stays null in case that
this information is not
relevant for the
current gift certificate
line item
00 - ok
01 -
error
Copy Copy
BookingCancellationT
ypeCode
"Code2" no Determines whether a
cancellation was
successfully posted to
the Stored Value
Server.
Stays null in case that
this information is not
relevant for the
current gift certificate
line item
00 - ok
01 -
error
Copy Copy
GCSTransactionUUID "IdentityUUID" no The gift certificate
server transaction ID
Copy Copy
SDK Promotion Calculation Engine
160 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTrans
action
CopyLin
eItem
ExternalSystemAdapt
erName
"Name" no The name of the
adapter of the
involved external
system
Copy Copy
ExpirationDate "DateCalendar" no The expiration date of
the gift certificate
Copy Copy
RemainingBalance "Money" yes The remaining
balance of the gift
certificate
Copy Copy
GiftCertificateSerialN
umber
"GiftCertificateSeria
lNumberGK"
no The serial number
that uniquely
identifies a GIFT
CERTIFICATE.
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6.6 entity PrepaidLineItem
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTr
ansactio
n
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 161
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTr
ansactio
n
CopyLineIt
em
RetailTransactionLineI
temSequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
BookingSuccessfulTyp
eCode
"Code2" no Determines whether
the prepaid
transaction was
confirmed.
Stays null in case that
this information is not
relevant for the
current prepaid line
item.
00 - ok
01 - error
Copy Copy
PrepaidProviderName "NNameGK" no The name of the
provider of the
prepaid service
Copy Copy
PrepaidTransactionID "IdentityTransaction
ExternalGK"
no The prepaid
transaction ID
Copy Copy
ExternalSystemAdapt
erName
"Name" no The name of the
adapter of the
involved external
system
Copy Copy
PrepaidID "IdentityAlphaNum
eric"
no The ident of the
prepaid PIN. The PIN
itself must not be
stored. The prepaid
ident is needed for
support purposes.
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
162 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.7.6.7 entity SaleReturnLineItemSalesOrder
Field Domain (Datatype) Mandat
ory Description
Calculation
Rule Comment
InvertTransa
ction
CopyLineI
tem
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineI
temSequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
SalesOrderTypeCode "Code2" no The type code of the
related sales order
"03" -
intern
al
down
paym
ent
"20" -
SAP
sales
order
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 163
Field Domain (Datatype) Mandat
ory Description
Calculation
Rule Comment
InvertTransa
ction
CopyLineI
tem
SalesOrderDeliveryTy
peCode
"Code2" no The delivery type
code of the related
sales order
00:
pick
up
own
store
01:
delive
ry
02:
imme
diate
pick
up
03:
pick
up
other
store
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
RequestedDeliveryDa
te
"DateCalendar" no The delivery date that
was requested by the
customer
Copy Copy
5.1.4.7.6.8 entity RetailTransactionLineItemFrequentShopperPointsRedemption
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
SDK Promotion Calculation Engine
164 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTransac
tion
CopyLineIt
em
TransactionID "IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineI
temSequenceNumber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
CustomerAccountID "IdentityAlphaNum
eric40"
yes The customer account
number
Copy Copy
RedemptionTransacti
onID
"IdentityTransaction
ExternalGK"
yes A universally unique
identifier (UUID) for
the redemption
transaction. This may
be assembled from
alternate key
members
Copy Copy
FrequentShopperPoin
tsRedeemedCount
"Quantity" yes The number of
frequent shopper
points redeemed
Invert Copy
(Retrieve,
Repetition
,
InternalVo
id)
Invert
(Return)
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6.9 entity RetailTransactionLineItemAdditionalParameter This entity allows storage of additional data entered for the line item.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 165
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupI
D
Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLin
eItemSequenceNum
ber
"LineNumber" yes The sequence number
of line item within the
context of this
RetailTransaction
Copy New
ExternalParameterI
D
"IdentityAlphaNumeri
c40"
yes The external
parameter ident (is
needed for export),
for example, ident of
an additional input
field
Copy Copy
ParameterName "Name" yes The name of the
parameter, for
example, the
name/title of an
additional input field
Copy Copy
ParameterValue "NDescriptionShortGK
"
no The value of the
parameter, for
example, user input
for an additional input
field
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
166 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.7.6.10 entity RetailTransactionLineItemBinaryData
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally
unique
identifier
(UUID) for
the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequenc
eNumber
"LineNumber" yes The sequence
number of
line item
within the
context of
this
RetailTransac
tion
Copy New
BinaryDataSequenceNumber "LineNumber" yes A unique
identifier
(within the
context of
the
Transaction)
for this binary
data entry
Copy Copy
Name "Name" yes The name of
the binary
data entry
Copy Copy
Content "Image" yes The binary
object
Copy Copy
ContentLength "QuantityTransactionCou
nt"
yes The length of
the binary
object
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 167
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6.11 entity RetailTransactionLineItemI18NText
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally
unique
identifier
(UUID) for
the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequenc
eNumber
"LineNumber" yes The sequence
number of
line item
within the
context of
this
RetailTransac
tion
Copy New
SDK Promotion Calculation Engine
168 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
TextSequenceNumber "LineNumber" yes Line number
(incremental
counter) of
the text
Copy Copy
LanguageID "LanguageCodeGK" yes A
combination
of ISO-639-1
and ISO-
3661-1 to
denote a
language as
spoken in a
particular
country
Copy Copy
Category "Name" yes Category
code of the
text
Copy Copy
Text NVARCHAR(1000) no The text in
the
nominated
language
Copy Copy
PictureFlag BIT yes Determines
whether Text
is a reference
to a picture
or whether
Text is
common text
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 169
5.1.4.7.6.12 entity SaleReturnLineItemCharacteristic
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally
unique
identifier
(UUID) for
the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequenc
eNumber
"LineNumber" yes The sequence
number of
line item
within the
context of
this
RetailTransac
tion
Copy New
CharacteristicID "IdentityAlphaNumeric" yes The identifier
of the
characteristic
Copy Copy
CharacteristicValueID "IdentityAlphaNumeric" yes The ident of
the
characteristic
's value
Copy Copy
CharacteristicValueName NVARCHAR(40) no The name of
the
characteristic
's value
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
170 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6.13 entity SaleReturnLineItemExtension
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally
unique
identifier
(UUID) for
the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequenc
eNumber
"LineNumber" yes The sequence
number of
line item
within the
context of
this
RetailTransac
tion
Copy New
ExtensionKey "IdentityAlphaNumeric40
"
yes The key of
the key-value
pair
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 171
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
ExtensionSequenceNumber "LineNumber" yes Line number
(incremental
counter) -
there may
exist multiple
rows per
ExtensionKey
Copy Copy
ExtensionValue "NDescriptionShortGK" no The value of
the key-value
pair
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.6.14 entity SaleReturnLineItemMerchandiseHierarchyGroup
Field Domain (Datatype) Mandat
ory Description
Calculat
ion Rule
Comm
ent
InvertTransa
ction
CopyLineI
tem
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExt
ernalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New New
RetailTransactionLineItemSeque
nceNumber
"LineNumber" yes The sequence
number of line item
within the context of
this RetailTransaction
Copy New
SDK Promotion Calculation Engine
172 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandat
ory Description
Calculat
ion Rule
Comm
ent
InvertTransa
ction
CopyLineI
tem
MerchandiseHierarchyGroupIDQ
ualifier
"Code4" yes Qualifier which is
used to differ
between
MerchandiseHierarch
yGroups belonging to
different functions
but having the same
id
Copy Copy
MerchandiseHierarchyGroupID VARCHAR(30) yes Unique system
assigned identifier for
the merchandise
group
Copy Copy
TimeStampEffective "TimeStampEffective" no The time stamp when
this assignment
becomes active
Copy Copy
TimeStampExpiration "TimeStampExpiration" no The last date and
time when this
assignment is
effective
Copy Copy
StatusCode "Code2Status" no Defines the current
status for the
assignment; examples
of valid codes include:
AC/null = Active, IA =
Inactive
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
TimeStampEffectiveUTC0 "TimeStampUTC0GK" no The UTC0 time stamp
when this assignment
becomes active
Copy Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 173
Field Domain (Datatype) Mandat
ory Description
Calculat
ion Rule
Comm
ent
InvertTransa
ction
CopyLineI
tem
TimeStampExpirationUTC0 "TimeStampUTC0GK" no The last UTC0 date
and time when this
assignment is
effective
Copy Copy
5.1.4.7.6.15 entity SaleReturnLineItemPrice
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for
a group of
BusinessUnits
New New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally
unique
identifier
(UUID) for
the
Transaction.
This may be
assembled
from
alternate key
members.
New New
RetailTransactionLineItemSequenc
eNumber
"LineNumber" yes The sequence
number of
line item
within the
context of
this
RetailTransac
tion
Copy New
PriceTypeCode "Code2" yes The price
type code
Copy Copy
PriceAmount "Money" yes The price Copy Copy
Description "NDescriptionShortGK" no An additional
information
concerning
the price
Copy Copy
XXCustom01 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
174 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
InvertTransac
tion
CopyLineIt
em
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.7 Additional Tender Line Item Data
5.1.4.7.7.1 entity TenderAuthorization
Field Domain (Datatype) Mandato
ry Description
Calculatio
n Rule
Comme
nt
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for the
Transaction. This may be
assembled from
alternate key members.
TenderAuthorizationSequenceNumber "LineNumber" yes A unique sequence
number for this
TenderAuthorization.
Required because a
particular
TenderLineItem may
have more than one
TenderAuthorization
attempt.
TenderLineItemSequenceNumber "LineNumber" no The sequence number of
line item within the
context of this
RetailTransaction
CardType "Code6" no A code denoting which
kind of card is being
accepted.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 175
Field Domain (Datatype) Mandato
ry Description
Calculatio
n Rule
Comme
nt
AccountNumber "Name" no The account number
appearing on a
debit/credit card and
identifying the card
issuer's customer
account to be charged or
credited for the
transaction
CardIssueSequenceNumber "Identity" no The IssueSequence
number of the credit
card being used
CardExpirationDate "Code4" no The expiration date of
the Credit or Debit card,
as taken from the card in
MMYY format
ReferenceNumber "IdentityAlphaNumeric" no A unique identifier
(which may be assigned
by the external
authorization agency) for
this TenderAuthorization
TerminalTransactionStatus INTEGER no The status of of the card
transaction
TerminalTransactionErrorNumber INTEGER no The last error message
sent by the terminal
TerminalTransactionType INTEGER no The type of the terminal
transaction
ForceOnlineFlag BIT no Denotes that the Tender
was authorized within
the retail enterprise
(usually because the
connection to the host
was down) and this
TenderAuthorization
must be approved by the
host when it comes
online.
RequestedAmount "MoneyShortRetail" no The monetary value of
the purchases for which
an authorization is being
requested
SDK Promotion Calculation Engine
176 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculatio
n Rule
Comme
nt
AuthorizationDatetime "TimeStampAudit" no The Date and Time the
TenderAuthorization was
made. This may be
assigned by the external
agency that is providing
the TenderAuthorization.
TerminalTransactionEndTimestamp "TimeStampAudit" no The system time when
the terminal transaction
ended
RelatedTenderAuthorizatonSequenceNu
mber
"LineNumber" no A unique sequence
number for this
TenderAuthorization.
Required because a
particular
TenderLineItem may
have more than one
TenderAuthorization
attempt.
TerminalSequenceNumber "IdentityAlphaNumeric40" no The transaction
sequence number of the
terminal
RequestedISOCurrencyNumber "ISO_4217_CurrencyCodeNumbe
r(3)"
no Numeric code assigned
by ISO to identify
national currencies
CardHolderVerificationTypeCode "Code" no A code denoting how a
CardHolder was verified
during a
TenderAuthorization
TenderAuthorizationTerminalID INTEGER no A unique identifier
(usually assigned by an
external agency that
provides
TenderAuthorizations)
that identifies the
terminal performing the
TenderAuthorization
TraceNumber INTEGER no Unique identifier of
terminal transaction
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 177
Field Domain (Datatype) Mandato
ry Description
Calculatio
n Rule
Comme
nt
TerminalType VARCHAR(25) no Used terminal defined in
POS configuration.
(for example, „REAECT“,
„Thales“, „Secpos“, ...)
If the payment is carried
out without a terminal or
the terminal is not
connected to the cash
register: "OFFLINE"
This information is
necessary for later
cancellation of the
terminal payment.
MerchantNumber "Name" no A financial institution
assigned identifier for
the Retail Enterprise or
RetailStore that is
conducting the
TenderAuthorization
ApprovalCode VARCHAR(25) no The terminal
authorization number
AdjudicationCode VARCHAR(40) no The adjudication code
returned by the external
agency to this
TenderAuthorizationReq
uest
AdjudicationText NVARCHAR(255) no An error message in text
form
HostAuthorizedFlag BIT no A flag denoting that this
TenderAuthorization was
authorized by an external
agency.
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
178 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculatio
n Rule
Comme
nt
XXCustom05 VARCHAR(256) no Customizable
information
ActivationSequenceNumber INTEGER no The activation sequence
number
TerminalTransactionReferenceNumber "IdentityAlphanumeric" no The transaction
reference number;
is used in the context of
purchase reservation and
reservation adjustment.
TerminalTransactionTypeCode "IdentityAlphanumeric40" yes The transaction type sent
back by the terminal;
possible transaction
types are debit and
credit
TerminalTenderDescription "NDescriptionShortGK" no The tender description
sent back by the terminal
ApplicationID "DescriptionShort" no The application identifier
sent back by the terminal
EncryptedPAN "IdentityAlphanumeric40" no The (coded) application
PAN sent back by the
terminal
TerminalTransactionCurrencyCode "ISOCurrencyNumberGK" no The transaction currency
code sent back by the
terminal
AuthorizationDatetimeUTC0 "TimeStampUTC0GK" no The UTC0 Date and Time
the TenderAuthorization
was made. This may be
assigned by the external
agency that is providing
the TenderAuthorization.
TerminalTransactionEndTimestampUTC
0
"TimeStampUTC0GK" no The system time
corresponding to UTC0
when the terminal
transaction ended
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 179
5.1.4.7.8 Totals
5.1.4.7.8.1 entity RetailTransactionTotal
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
InvertTransact
ion
BusinessUnitGroupID Identity yes A unique system
assigned
identifier for a
group of
BusinessUnits
New
TransactionID "IdentityTransactionExter
nalGK"
yes A universally
unique identifier
(UUID) for the
Transaction. This
may be
assembled from
alternate key
members.
New
TransactionTotalType
Code
"Code" yes A unique
assigned
mnemonic
identifier that
identifies the
TransactionTotal
Type
"SUBTOTAL" -
subtotal without
transaction
discounts
"SUBTOTAL_DISC
OUNT" - subtotal
with transaction
discounts
"TOTAL" -
transaction total
(includes taxes
that are not
included in prices)
see chapter Transaction
Calculation Rules
Copy
Amount INTEGER no The monetary
value of the
transaction total.
Invert
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
180 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
InvertTransact
ion
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.9 Customer
5.1.4.7.9.1 entity RetailTransactionCustomer
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTrans
action
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionE
xternalGK"
yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
CustomerID "IdentityAlphaNumeri
c40"
yes A unique system
assigned identifier for
the Customer
Copy
GenderType "Code2" no A code for specifying
a persons gender
Copy
BirthDayNumber INTEGER no A number in the
range 1-31denoting
the day of the month
part of the Person's
date of birth
Copy
BirthMonthNumber INTEGER no A number in the
range 1-12 denoting
the month part of the
Person's date of birth
Copy
BirthYearNumber INTEGER no The year part of the
Person's date of birth
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 181
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTrans
action
AddressTypeCode "Code2" yes The customer type
code
Copy
AddressTypeDescription "DescriptionShort" no The description of the
customer type code
Copy
GenericFlag BIT yes If true, the customer
is a dummy/unknown
customer
Copy
BusinessDescription "NDescriptionShortGK
"
no The description of the
business of the
customer; this
information is for
example, to be
printed on invoices in
Greece due to tax law
requirements
Copy
CustomerIDEntryMethod
Code
"Code4" No A code that describes
how this customer's
identification is being
entered (for example,
it is scanned, keyed,
etc.)
"KEY" -
manual
input
"SCAN" -
Scanner
"MSR" -
MSR
"SRCH" -
Customer
search
Copy
FirstName "NNameGK" no A person's first name Copy
LastName "NNameGK" no A person's last name Copy
SDK Promotion Calculation Engine
182 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTrans
action
PreferredReceiptPrintout
TypeCode
Code no Defines the preferred
printout settings for
the customer
null/CLIEN
T -
Printout
depends
on client
settings.
PRINTONL
Y -
Customer
wants to
have a
printed
receipt.
MAILONL
Y -
Customer
wants to
have the
receipt
per mail.
NOTHING
-
Customer
wants to
have
nothing.
PRINTAND
MAIL -
Customer
wants to
have a
printed
receipt
and a
mail.
Copy
RetailTransactionCustome
rAccountList
RetailTransactionCust
omerAccount[0..*]
no List of customer
accounts
Copy
RetailTransactionCustome
rGroupAssignmentList
RetailTransactionCust
omerGroupAssignme
nt[0..*]
no List of customer
groups
Copy
RetailTransactionCustome
rContactMethodList
RetailTransactionCust
omerContactMethod[
0..*]
no List of contact
methods (address,
phone, mail, ...)
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 183
Field Domain (Datatype) Manda-
tory Description
Calculation
Rule Comment
InvertTrans
action
RetailTransactionCustome
rIdentificationList
RetailTransactionCust
omerIdentification[0..
*]
no List of customer
identification
numbers
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
OrganizationName "NNameGK" no An ORGANIZATION's
legal trade name.
Copy
5.1.4.7.9.2 entity RetailTransactionCustomerAccount
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
InvertTransacti
on
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier
for a group
of
BusinessUn
its
New
TransactionID "IdentityTransactionExterna
lGK"
yes A
universally
unique
identifier
(UUID) for
the
Transaction
. This may
be
assembled
from
alternate
key
members
New
SDK Promotion Calculation Engine
184 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
InvertTransacti
on
CustomerID "IdentityAlphaNumeric40" yes A unique
system
assigned
identifier
for the
Customer
Copy
AddressTypeCode "Code2" yes The
customer
type code
Copy
CustomerAccountSequenceNum
ber
"LineNumber" yes Line
number
(increment
al counter)
Copy
CustomerAccountID "IdentityAlphaNumeric40" no The
customer
account
number
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 185
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
InvertTransacti
on
CustomerAccountTypeCode "Code2" yes Determines
what kind
of
customer
account
this is
00 -
turnover
of the
(current)
year
01 -
rebate
amount
which
was
granted
during
the
(current)
year
02 -
bonus
points
VP -
Valueph
one
transacti
on
GC - not
used /
partial
returned
gift
certificat
es
Copy
CustomerAccountBalance "Money" yes The current
balance of
the
customer
account
Copy
CustomerAccountQuerySuccessf
ulFlag
BIT yes Determines
whether
the request
of
customer
account
data was
completed
successfully
Copy
SDK Promotion Calculation Engine
186 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
InvertTransacti
on
XXCustom01 VARCHAR(256) no Customizab
le
information
XXCustom02 VARCHAR(256) no Customizab
le
information
XXCustom03 VARCHAR(256) no Customizab
le
information
XXCustom04 VARCHAR(256) no Customizab
le
information
XXCustom05 VARCHAR(256) no Customizab
le
information
CustomerAccountTransactionID IdentityTransactionExternal
GK
no The
external
ident of the
accounting
transaction
of the the
customer
account
Copy
5.1.4.7.9.3 entity RetailTransactionCustomerGroupAssignment
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment InvertTransaction
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
New
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
New
CustomerID "IdentityAlphaNumeric40" yes A unique system
assigned identifier for
the Customer
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 187
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment InvertTransaction
AddressTypeCode "Code2" yes The customer type
code
Copy
CustomerGroupID "IdentityAlphaNumeric40" yes A unique identification
number assigned to a
customer group
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.9.4 entity RetailTransactionCustomerContactMethod
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
BusinessUnitGroupID Identity yes A unique system
assigned
identifier for a
group of
BusinessUnits
New
TransactionID "IdentityTransactionExternalG
K"
yes A universally
unique identifier
(UUID) for the
Transaction. This
may be
assembled from
alternate key
members.
New
CustomerID "IdentityAlphaNumeric40" yes A unique system
assigned
identifier for the
Customer
Copy
AddressTypeCode "Code2" yes The customer
type code
Copy
SDK Promotion Calculation Engine
188 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
ContactPurposeTypeCo
de
"Code" yes A retailer
defined code
denoting a
reason for
contacting a
Party
Copy
ContactMethodTypeCod
e
"Code" yes A retailer
assigned code
denoting a
method of
contacting a
Party
Copy
ContactTypeCode "Code2" yes Describes the
type of contact.
Possible values
include e-mail
address,
address,
telephone,
internet URL.
AD -
addres
s
PH -
Phone
EM -
IN -
intern
et URL
Copy
EmailAddressLocalPart "EmailAddress" no The local-part
portion is a
domain-
dependent
string. In
addresses, it is
simply
interpreted on
the particular
host as a name
of a particular
mailbox.
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 189
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
EmailAddressDomainPar
t
"EmailAddress" no The domain
portion
identifies the
point to which
the mail is
delivered. In the
dot-atom form,
this is
interpreted as
an Internet
domain name
(either a host
name or a mail
exchanger
name) as
described in
[RFC1034],
[RFC1035], and
[RFC1123]. In
the domain-
literal form, the
domain is
interpreted as
the literal
Internet address
of the particular
host. In both
cases, how
addressing is
used and how
messages are
transported to a
particular host is
covered in
separate
documents, such
as [RFC5321].
Copy
CompletePhoneNumber "PhoneNumberComplete" no The complete
telephone
number
including the
CountryCode,
AreaCode,
Telephone
Number and
ExtensionNumb
er
Copy
InternetURL "DescriptionShort" no The internet URL Copy
SDK Promotion Calculation Engine
190 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
AddressLine1 "Address" no The first line of
the address,
normally the
street number
and name
Copy
AddressLine2 "Address" no The second line
of an address,
normally the Flat
or Building Suite
number
Copy
AddressLine3 "Address" no The third line of
the address
Copy
AddressLine4 "Address" no The fourth line
of the address
Copy
AddressLine5 "Address" no The fifth line of
the address.
It is normally
used for the
salutation.
Copy
City "City" no The city, town or
village
component of
the address
Copy
SubTerritoryName "Name" no This field is used
to specify the
territory or city
more concrete,
for example for
storing the
district or
suburb of a
certain city
Copy
PostalCode "PostalCode" no The postal or zip
code of the
address
Copy
PostalCodeExtension "Code4" no The extension of
the postal or zip
code that
further specifies
a particular
postal district
Copy
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 191
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
Territory "State" no The County,
State, Province,
Territory etc
component of
the address
Copy
TerritoryName "Name" no The name of the
County, State,
Province,
Territory etc.
component of
the address
Copy
ISOCountryCode "Code2" no The ISO-3166-1
two letter code
of the country
Copy
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.7.9.5 entity RetailTransactionCustomerIdentification
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for
a group of
BusinessUni
ts
New
SDK Promotion Calculation Engine
192 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
TransactionID "IdentityTransactionExternal
GK"
yes A universally
unique
identifier
(UUID) for
the
Transaction.
This may be
assembled
from
alternate
key
members.
New
CustomerID "IdentityAlphaNumeric40" yes A unique
system
assigned
identifier for
the
Customer
Copy
AddressTypeCode "Code2" yes The
customer
type code
Copy
PartyIdentificationTypeCo
de
"Code" yes A code
denoting a
form of
identificatio
n that the
customer
uses to
identify
themselves
TX - tax
number
BN -
business
number
CardNumb
er -
registered
card
number
Copy
Identifier "IdentityAlphaNumeric40" yes The number
or character
sequence on
the
identificatio
n that
identifies
the party
Copy
XXCustom01 VARCHAR(256) no Customizabl
e
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 193
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
InvertTransactio
n
XXCustom02 VARCHAR(256) no Customizabl
e
information
XXCustom03 VARCHAR(256) no Customizabl
e
information
XXCustom04 VARCHAR(256) no Customizabl
e
information
XXCustom05 VARCHAR(256) no Customizabl
e
information
5.1.4.8 Control Transaction
5.1.4.8.1 entity ControlTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for a
group of
BusinessUnits
General
TransactionID "IdentityTransactionExternalGK" yes A universally
unique
identifier
(UUID) for the
Transaction.
This may be
assembled
from alternate
key members.
General
SDK Promotion Calculation Engine
194 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
TypeCode "Code4" yes A code that
describes the
type of control
transaction
Function
specific
"SGON" -
Log In
"SGOF" -
Log Out
"STBR" -
Start Break
"ENBR" -
End Break
"TELO" -
Terminal
Log In
"TEOD" -
Terminal
End Of Day"
"TERP" -
Terminal
Reprint
"TEDI" -
Terminal
Diagnostic
"OPEN" -
Open Till
(No Sale)
"TISE" - Till
Tender
Settlement
"SASE" -
Store Safe
Tender
Settlement
"DBSE" -
Safebag
Settlement
(deposit bag
settlement)
"DBAG" -
Safebag
(deposit
bag)
"EOD" - End
of day
"INFO" -
Information
"PRNT" -
Printout
repetition
of original
receipt
Relevant codes only
used for project
specific codes:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 195
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
00-99
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
POSNoSaleTransaction POSNoSaleTransaction no Data for no
sale
transactions
Function
specific
SignOnTransaction SignOnTransaction no Data for sign
on
transactions
Function
specific
SignOffTransaction SignOffTransaction no Data for sign
off
transactions
Function
specific
TillTenderSettlementTransaction TillTenderSettlementTransaction no Data for till
tender
settlements
Function
specific
StoreSafeSettlementTransaction StoreSafeSettlementTransaction no Data for store
safe tender
settlements
Function
specific
DepositBagTransaction DepositBagTransaction no Data for
safebag status
changes
Function
specific
DepositBagSettlementTransaction DepositBagSettlementTransaction no Data for
safebag
settlements
Function
specific
SDK Promotion Calculation Engine
196 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.8.2 entity POSNoSaleTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned identifier for a
group of BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier (UUID) for
the Transaction. This may be assembled
from alternate key members.
TillID "Identity" no The unique identifier of the till
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
5.1.4.8.3 entity SignOnTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned identifier for a
group of BusinessUnits.
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier (UUID) for
the Transaction. This may be assembled
from alternate key members.
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
TillID "Identity" no The unique identifier of the till
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 197
5.1.4.8.4 entity SignOffTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned identifier for
a group of BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier (UUID)
for the Transaction. This may be
assembled from alternate key
members.
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
TillID "Identity" no The unique identifier of the till
LastWorkstationID "IdentityAlphaNumeric" no Last workstation where the till was
used. Only filled in case of forced log
out
LastWorkerID "IdentityAlphaNumeric40" no Last worker logged on till. Only filled in
case of forced log out
LastWorkerFirstName "NNameGK" no First name of last worker logged on till.
Only filled in case of forced log out
LastWorkerLastName "NNameGK" no Last name of last worker logged on till.
Only filled in case of forced log out
5.1.4.8.5 entity TillTenderSettlementTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
SDK Promotion Calculation Engine
198 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier
(UUID) for the Transaction. This
may be assembled from
alternate key members.
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
TillSettlementDocument TillSettlementDocument no Settlement details
TillSettlementTenderDetailList TillSettlementTenderDetail[0..*] no Settlement tender details
5.1.4.8.6 entity TillSettlementDocument
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier
(UUID) for the Transaction. This
may be assembled from
alternate key members.
TenderRepositoryID Identity yes The unique identifier for the
TENDER REPOSITORY Drawers
TillID of
the
drawer
Bank
-1
Safe
0
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 199
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
5.1.4.8.7 entity TillSettlementTenderDetail
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for the
Transaction. This may
be assembled from
alternate key members.
TenderRepositoryID "Identity" yes The unique identifier for
the TENDER
REPOSITORY
Drawers
TillI
D of
the
dra
wer
Bank
-1
Safe
0
TenderTypeCode "Code4" yes A code which uniquely
identifies the tender
OpenBalanceAmount "Money" yes The opening tender
balance
SDK Promotion Calculation Engine
200 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
OpenMediaUnitQuantity "QuantityInteger" no The opening number of
discrete tender media
(for example, currency
bills, coins, credit/debit
card signed slips, etc.)
CloseBalanceAmount "Money" yes The closing tender
balance in main
currency.
Corresponds to the
target values.
CloseMediaUnitQuantity "QuantityInteger" no The closing number of
discrete tender media
(for example, currency
bills, coins, credit/debit
card signed slips, etc.).
Corresponds to the
target values.
CountedBalanceAmount "Money" yes The counted tender
balance in main
currency
CountedMediaUnitQuantity "QuantityInteger" no The counted number of
discrete tender media
(for example, currency
bills, coins, credit/debit
card signed slips, etc.)
OverUnderBalanceAmount "Money" yes The variance between
closing balance amount
and counted balance
amount by subtracting
the
CloseBalanceAmount
from the
CountedBalanceAmount
OverUnderMediaUnitQuantity "QuantityInteger" no The variance between
closing media unit
quantity and counted
media unit quantity by
subtracting the
CloseMediaUnitQuantit
y from the
CountedMediaUnitQua
ntity.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 201
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
CurrencySymbol "NNameGK" no The currency symbol
TenderDescription "NDescriptionShortGK" no Description of the
tender
UnitCountRequiredFlag BIT yes A flag to signify that
specific tender type
units need to be
counted and recorded
by the operator
AmountCountRequiredFlag BIT yes A flag to signify that a
specific tender type
amount needs to be
counted and recorded
by the operator
TenderClassCode "Code2" no The tender class code
from master data
ExchangeRate "ExchangeRate" no The quantitative
conversion factor
between foreign
currency and local
currency
ExchangeRateMultiplyFlag BIT yes Determines whether
inside the calculation
foreign currency -> local
currency the amount is
to be multiplied with
(true) or divided by
(false) the
ExchangeRate factor
SDK Promotion Calculation Engine
202 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
ForeignCurrencyCountedBalanceA
mount
"Money" no The counted tender
balance expressed in
the currency of the
tender
Foreign
currency
amount.
For main
currency
it is filled
by main
currency
amount.
ForeignCurrencyCloseBalanceAmo
unt
"Money" no The closing tender
balance expressed in
the currency of the
tender
Foreign
currency
amount.
For main
currency
it is filled
by main
currency
amount.
ISOCurrencyCode "ISO_4217_CurrencyCode_char(3)
"
yes The currency code of
the tender
TillSettlementTenderDenominatio
nList
TillSettlementTenderDenominatio
n[0..*]
no Denomination list for
counted values
5.1.4.8.8 entity TillSettlementTenderDenomination
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 203
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
TenderRepositoryID "Identity" yes The unique identifier
for the TENDER
REPOSITORY
Drawers
TillID of
the
drawer
Bank
-1
Safe
0
TenderTypeCode "Code4" yes A code which
uniquely identifies
the tender
DenominationSequenceNumber "LineNumber" yes Line number
(incremental counter)
of the denomination
TypeCode "Code4" no The denomination
type code
coins =
"COIN"
notes =
"NOTE"
amount
=
"AMOU"
PieceValue "Money" yes Piece value
RollFlag BIT yes Determines whether
the
DenominationCount
value is expressed in
coin rolls (true) or
single coins/notes
(false)
RollCapacity "QuantityShortCount" yes Count of coins in the
roll
DenominationCount "QuantityShortCount" yes The count of the
denomination
DenominationAmount "Money" yes The total amount of
the denomination
SDK Promotion Calculation Engine
204 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.8.9 entity StoreSafeSettlementTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier
for a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally
unique identifier
(UUID) for the
Transaction. This
may be assembled
from alternate key
members.
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 205
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
XXCustom05 VARCHAR(256) no Customizable
information
StoreSafeSettlementTenderDetailList StoreSafeSettlementTenderDetail[0..*] no Tender details
5.1.4.8.10 entity StoreSafeSettlementTenderDetail
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
TenderRepositoryID "Identity" yes The unique identifier
for the TENDER
REPOSITORY
Drawers
TillI
D
of
the
dra
we
r
Bank
-1
Safe
0
TenderTypeCode "Code4" yes A code which
uniquely identifies
the tender
OpenBalanceAmount "Money" yes The opening tender
balance
SDK Promotion Calculation Engine
206 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule Comment
OpenMediaUnitQuantity "QuantityInteger" no The opening number
of discrete tender
media (for example,
currency bills, coins,
credit/debit card
signed slips, etc.)
CloseBalanceAmount "Money" yes The closing tender
balance in main
currency.
Corresponds to the
target values.
CloseMediaUnitQuantity "QuantityInteger" no The closing number of
discrete tender media
(for example,
currency bills, coins,
credit/debit card
signed slips, etc.)
CountedBalanceAmount "Money" yes The counted tender
balance in main
currency.
Corresponds to the
target values.
CountedMediaUnitQuantity "QuantityInteger" no The counted number
of discrete tender
media (for example,
currency bills, coins,
credit/debit card
signed slips, etc.)
OverUnderBalanceAmount "Money" yes The variance between
closing balance
amount and counted
balance amount by
subtracting the
CloseBalanceAmount
from the
CountedBalanceAmou
nt
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 207
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule Comment
OverUnderMediaUnitQuantity "QuantityInteger" no The variance between
closing media unit
quantity and counted
media unit quantity
by subtracting the
CloseMediaUnitQuant
ity from the
CountedMediaUnitQu
antity
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
CurrencySymbol "NNameGK" no The currency symbol
TenderDescription "NDescriptionShortGK" no Description of the
tender
UnitCountRequiredFlag BIT yes A flag to signify that
specific tender type
units need to be
counted and recorded
by the operator prior
to a pickup
AmountCountRequiredFlag BIT yes A flag to signify that a
specific tender type
amount needs to be
counted and recorded
by the operator prior
to a pickup
TenderClassCode "Code2" no The tender class code
from master data
SDK Promotion Calculation Engine
208 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule Comment
ExchangeRate "ExchangeRate" no The quantitative
conversion factor
between foreign
currency and local
currency
ExchangeRateMultiplyFlag BIT yes Determines whether
inside the calculation
foreign currency ->
local currency the
amount is to be
multiplied with (true)
or divided by (false)
the ExchangeRate
factor
ForeignCurrencyCountedBalanceAm
ount
"Money" no The counted tender
balance expressed in
the currency of the
tender
Foreign
currency
amount.
For main
currency
it is
filled by
main
currency
amount.
ForeignCurrencyCloseBalanceAmou
nt
"Money" no The closing tender
balance expressed in
the currency of the
tender
Foreign
currency
amount.
For main
currency
it is
filled by
main
currency
amount.
ISOCurrencyCode "ISO_4217_CurrencyCode_char(3)" yes The currency code of
the tender
StoreSafeSettlementTenderDenomi
nationList
StoreSafeSettlementTenderDenomin
ation[0..*]
no Denomination list for
counted values
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 209
5.1.4.8.11 entity StoreSafeSettlementTenderDenomination
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
TenderRepositoryID "Identity" yes The unique identifier
for the TENDER
REPOSITORY
Drawers
TillID of
the
drawer
Bank
-1
Safe
0
TenderTypeCode "Code4" yes A code which
uniquely identifies
the type of tender,
that is, cash, check,
credit card, etc.
DenominationSequenceNumber "LineNumber" yes Line number
(incremental counter)
of the denomination
TypeCode "Code4" no The denomination
type code
coins =
"COIN"
notes =
"NOTE"
amount
=
"AMOU"
PieceValue "Money" yes Piece value
SDK Promotion Calculation Engine
210 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
RollFlag BIT yes Determines whether
the
DenominationCount
value is expressed in
coin rolls (true) or
single coins/notes
(false)
RollCapacity "QuantityShortCount" yes Count of coins in the
roll
DenominationCount "QuantityShortCount" yes The count of the
denomination
DenominationAmount "Money" yes The total amount of
the denomination
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.8.12 entity DepositBagTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned identifier for a
group of BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier (UUID) for
the Transaction. This may be assembled
from alternate key members.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 211
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
DepositBagID IdentityAlphanumeric40 yes Automatically generated (with another
algorithm like reference number in bank
payment) unique Safebag ID
DepositBagNumber IdentityAlphanumeric40 yes Safe bag number entered by operator
that was used to transport the Tender
from the Safe to the ExternalDepository
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
5.1.4.8.13 entity DepositBagSettlementTransaction
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule
Commen
t
BusinessUnitGroupID Identity yes A unique system
assigned identifier
for a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally
unique identifier
(UUID) for the
Transaction. This
may be assembled
from alternate key
members.
DepositBagID IdentityAlphanumeric40 yes Automatically
generated (with
another algorithm
like reference
number in bank
payment) unique
Safebag ID
SDK Promotion Calculation Engine
212 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule
Commen
t
DepositBagNumber IdentityAlphanumeric40 yes Safe bag number
entered by
operator that was
used to transport
the Tender from
the Safe to the
ExternalDepositor
y
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
DepositBagSettlementTenderDetailLis
t
DepositBagSettlementTenderDetail[0..
*]
no Tender details
5.1.4.8.14 entity DepositBagSettlementTenderDetail
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
TenderTypeCode "Code4" yes A code which uniquely
identifies the tender
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 213
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
TenderDescription "NDescriptionShortGK" no Description of the
tender
TenderClassCode "Code2" no The tender class code
from master data
CurrencySymbol "NNameGK" no The currency symbol
ExchangeRate "ExchangeRate" no The quantitative
conversion factor
between foreign
currency and local
currency.
ExchangeRateMultiplyFlag BIT yes Determines whether
inside the calculation
foreign currency ->
local currency the
amount is to be
multiplied with (true)
or divided by (false)
the ExchangeRate
factor
UnitCountRequiredFlag BIT yes A flag to signify that
specific tender type
units need to be
counted and recorded
by the operator prior
to a pickup
AmountCountRequiredFlag BIT yes A flag to signify that a
specific tender type
amount needs to be
counted and recorded
by the operator prior
to a pickup
OpenBalanceAmount "Money" yes The opening tender
balance
OpenMediaUnitQuantity "QuantityInteger" no The opening number
of discrete tender
media (for example,
currency bills, coins,
credit/debit card
signed slips, etc.)
SDK Promotion Calculation Engine
214 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
CloseBalanceAmount "Money" yes The closing tender
balance in main
currency.
Corresponds to the
target values.
ForeignCurrencyCloseBalanceAmount "Money" no The closing tender
balance expressed in
the currency of the
tender
Foreign
currency
amount.
For main
currency
it is filled
by main
currency
amount.
CloseMediaUnitQuantity "QuantityInteger" no The closing number of
discrete tender media
(for example, currency
bills, coins,
credit/debit card
signed slips, etc.)
CountedBalanceAmount "Money" yes The counted tender
balance in main
currency
ForeignCurrencyCountedBalanceAmo
unt
"Money" no The counted tender
balance expressed in
the currency of the
tender
Foreign
currency
amount.
For main
currency
it is filled
by main
currency
amount.
CountedMediaUnitQuantity "QuantityInteger" no The counted number
of discrete tender
media (for example,
currency bills, coins,
credit/debit card
signed slips, etc.)
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 215
Field Domain (Datatype) Mandat
ory Description
Calculati
on Rule
Comme
nt
OverUnderBalanceAmount "Money" yes The variance between
closing balance
amount and counted
balance amount by
subtracting the
CloseBalanceAmount
from the
CountedBalanceAmou
nt
OverUnderMediaUnitQuantity "QuantityInteger" no The variance between
closing media unit
quantity and counted
media unit quantity by
subtracting the
CloseMediaUnitQuanti
ty from the
CountedMediaUnitQua
ntity.
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
ISOCurrencyCode "ISO_4217_CurrencyCode_char(3)" yes The currency code of
the tender
DepositBagSettlementTenderDenomi
nationList
DepositBagSettlementTenderDenomina
tion[0..*]
no Denomination list for
counted values
SDK Promotion Calculation Engine
216 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.8.15 entity DepositBagSettlementTenderDenomination
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
TenderTypeCode "Code4" yes A code which
uniquely identifies
the type of tender,
that is, cash, check,
credit card, etc.
DenominationSequenceNumber "LineNumber" yes Line number
(incremental counter)
of the denomination
TypeCode "Code4" no The denomination
type code
coins =
"COIN"
notes =
"NOTE"
amount
=
"AMOU"
PieceValue "Money" yes Piece value
RollFlag BIT yes Determines whether
the
DenominationCount
value is expressed in
coin rolls (true) or
single coins/notes
(false)
RollCapacity "QuantityShortCount" yes Count of coins in the
roll
DenominationCount "QuantityShortCount" yes The count of the
denomination
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 217
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
DenominationAmount "Money" yes The total amount of
the denomination
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.9 Tender Control Transaction
5.1.4.9.1 entity TenderControlTransaction
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
BusinessUnitGroupID Identity yes A unique
system
assigned
identifier for a
group of
BusinessUnits
General
TransactionID "IdentityTransactionExternalGK" yes A universally
unique
identifier
(UUID) for the
Transaction.
This may be
assembled
from alternate
key members.
General
SDK Promotion Calculation Engine
218 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
TenderControlTypeCode "Code2" yes A code to
denote the
type of the
tender control
transaction
Function
specific
"TP" -
Tender
Pickup
"TL" -
Tender
Loan
"TA" -
Tender
Amoun
t
Adjust
ment
"SP" -
Safe
pickup
"SD" -
Safe
deposit
"DB" -
Safeba
g
(deposi
t bag)
TenderPickupTransaction TenderPickupTransaction no Additional
pickup data
Function
specific
* Only one of
these entities can
be filled.
TenderLoanTransaction TenderLoanTransaction no Additional loan
data
Function
specific
* Only one of
these entities can
be filled.
TenderAmountAdjustmentTransactio
n
TenderAmountAdjustmentTransaction no Additional data
for tender
amount
adjustments
Function
specific
* Only one of
these entities can
be filled.
TenderDepositReceiptTransaction TenderDepositReceiptTransaction no Additional data
for
inbound/outbo
und safe
transactions
Function
specific
* Only one of
these entities can
be filled.
TenderControlTransactionTenderLin
eItemList
TenderControlTransactionTenderLineIt
em[0..*]
no List of tender
line items
Function
specific
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 219
Field Domain (Datatype) Mandato
ry Description
Calculati
on Rule Comment
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.1.4.9.2 entity TenderPickupTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier
(UUID) for the Transaction. This
may be assembled from
alternate key members.
InboundSafeID "Identity" no The unique identifier for the
TENDER REPOSITORY
Safe
0
OutboundTillID "Identity" yes The unique identifier of the till Drawers
TillID of
the
drawer
EnvelopeID "IdentityAlphaNumeric" no The identifier of the Envelope
that was used for this Pickup
XXCustom01 VARCHAR(256) no Customizable information
SDK Promotion Calculation Engine
220 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
5.1.4.9.3 entity TenderLoanTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned
identifier for a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier
(UUID) for the Transaction. This
may be assembled from
alternate key members.
OutboundSafeID "Identity" yes The unique identifier for the
TENDER REPOSITORY
Safe
0
InboundTillID "Identity" yes The unique identifier for the
TENDER REPOSITORY
Drawers
TillID of
the
drawer
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 221
5.1.4.9.4 entity TenderAmountAdjustmentTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system assigned identifier for a
group of BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique identifier (UUID) for
the Transaction. This may be assembled
from alternate key members.
TillID "Identity" yes The unique identifier of the till
XXCustom01 VARCHAR(256) no Customizable information
XXCustom02 VARCHAR(256) no Customizable information
XXCustom03 VARCHAR(256) no Customizable information
XXCustom04 VARCHAR(256) no Customizable information
XXCustom05 VARCHAR(256) no Customizable information
5.1.4.9.5 entity TenderDepositReceiptTransaction
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for
a group of
BusinessUnits
TransactionID "IdentityTransactionExternalGK" yes A universally unique
identifier (UUID) for
the Transaction. This
may be assembled
from alternate key
members.
SDK Promotion Calculation Engine
222 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
OutboundTenderRepositoryID "Identity" yes The unique identifier
for the TENDER
REPOSITORY
Drawers
TillID of
the
drawer
Safe
0
Bank
-1
Safe bag
-2
no tender
repository (in case
of safe pay-in)
-3
InboundTenderRepositoryID "Identity" yes The unique identifier
for the TENDER
REPOSITORY
Drawers
TillID of
the
drawer
Safe
0
Bank
-1
Safe bag
-2
no tender
repository (in case
of safe pay-out)
-3
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 223
Field Domain (Datatype) Mandatory Description Calculation
Rule Comment
DepositBagID IdentityAlphanumeric40 no Automatically
generated (with
another algorithm like
reference number in
bank payment) unique
Safebag ID
DepositBagNumber IdentityAlphanumeric40 no Safe bag number
entered by operator
that was used to
transport the Tender
from the Safe to the
ExternalDepository
SafeTenderMovementCode "Code" yes A code that indicates
the movement of
tender with respect to
a SAFE. It is used to
clarify whether tender
is being RECEIVED into
a store safe from an
external repository or
DEPOSITED from a
safe into an external
depository.
RECEIPT -
inbound
from
external
dep. to
safe
DEPOSIT -
outbound
from safe
to ext
dep.
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
DoubleCheckingWorkerID "IdentityAlphaNumeric40" no A unique system-
assigned identifier for
the Person who is a
particular Worker
SDK Promotion Calculation Engine
224 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.1.4.9.6 entity TenderControlTransactionTenderLineItem
Field Domain (Datatype) Manda
tory Description
Calcula
tion
Rule
Comment
BusinessUnitGroupID Identity yes A unique system
assigned
identifier for a
group of
BusinessUnits
Gener
al
TransactionID "IdentityTransactionExternalGK" yes A universally
unique identifier
(UUID) for the
Transaction. This
may be
assembled from
alternate key
members.
Gener
al
TenderTypeCode "Code4" yes A code which
uniquely
identifies the
type of tender
being moved in
the
TenderControlTr
ansaction
Gener
al
Tender.TenderT
ypeCode
ForeignCurrencyAmount "MoneyShortRetail" no The monetary
value (in
currency being
moved) of the
Tender being
moved by the
transaction
Foreig
n
curren
cy
amoun
t.
For
main
curren
cy it is
filled
by
main
curren
cy
amoun
t.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 225
Field Domain (Datatype) Manda
tory Description
Calcula
tion
Rule
Comment
Amount "Money" yes The monetary
value (in the
default system
currency) of the
Tender being
moved by the
transaction
Gener
al
Count "QuantityTransactionCount" yes The number of
tender units
being moved
Gener
al
TenderControlTransactionTenderLineIt
emDenominationList
TenderControlTransactionTenderLineIte
mDenomination[0..*]
no List of
denominations
Functi
on
specifi
c
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
ISOCurrencyCode "ISO_4217_CurrencyCode_char(3)" no Currency code of
the tender
Gener
al
Tender.ISOCurr
encyCode
CurrencySymbol "NNameGK" no Currency symbol Gener
al
TenderDescription "NDescriptionShortGK" no Description of
the tender
Gener
al
UnitCountRequiredFlag BIT yes A flag to signify
that specific
tender type units
need to be
counted and
recorded by the
operator prior to
a pickup
Gener
al
SDK Promotion Calculation Engine
226 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Manda
tory Description
Calcula
tion
Rule
Comment
AmountCountRequiredFlag BIT yes A flag to signify
that a specific
tender type
amount needs to
be counted and
recorded by the
operator prior to
a pickup
Gener
al
TenderClassCode "Code2" no The tender class
code from
master data
Gener
al
ExchangeRate "ExchangeRate" no The quantitative
conversion
factor between
foreign currency
and local
currency.
Gener
al
ExchangeRateMultiplyFlag BIT yes Determines
whether inside
the calculation
foreign currency
-> local currency
the amount is to
be multiplied
with (true) or
divided by (false)
the
ExchangeRate
factor
Gener
al
5.1.4.9.7 entity TenderControlTransactionTenderLineItemDenomination
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
BusinessUnitGroupID Identity yes A unique system
assigned identifier for a
group of BusinessUnits
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 227
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
TransactionID "IdentityTransactionExternalGK
"
yes A universally unique
identifier (UUID) for the
Transaction. This may be
assembled from
alternate key members.
TenderTypeCode "Code4" yes A code which uniquely
identifies the type of
tender being moved in
the
TenderControlTransactio
n
DenominationSequenceNumb
er
"LineNumber" yes Line number
(incremental counter) of
the denomination
TypeCode "Code4" yes The denomination type
code
coins =
"COIN"
notes =
"NOTE"
amount
=
"AMOU
"
PieceValue "Money" yes Piece value
RollFlag BIT yes Determines whether the
DenominationCount
value is expressed in coin
rolls (true) or single
coins/notes (false)
RollCapacity "QuantityShortCount" yes Count of coins in the roll
DenominationCount "QuantityShortCount" yes The count of the
denomination
DenominationAmount "Money" yes The total amount of the
denomination
XXCustom01 VARCHAR(256) no Customizable
information
XXCustom02 VARCHAR(256) no Customizable
information
SDK Promotion Calculation Engine
228 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Field Domain (Datatype) Mandator
y Description
Calculatio
n Rule Comment
XXCustom03 VARCHAR(256) no Customizable
information
XXCustom04 VARCHAR(256) no Customizable
information
XXCustom05 VARCHAR(256) no Customizable
information
5.2 Transaction Calculation Rules
5.2.1 Introduction
This document describes the rules to calculate the receipt.
5.2.2 Business Process
For complete transaction model see chapter Domain Object - Transaction.
5.2.2.1 Calculation
Quantities and amounts will be stored with sign. In addition to that there will be filled additional type codes
to allow easy reportings.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 229
transaction
level
transactio
n data
Persistenc
y database Sign of amount
Inver
t
Checke
d
Line Item single
quantity
yes SaleReturnLineItem.Quantity
For positive line
items (sale, pay
in, gift cert sale,
...): +
For negative line
items (return,
pay out, ...): -
yes
units yes SaleReturnLineItem.Units Always positive. no
total
quantity
INFO = SaleReturnLineItem.Quantity * SaleReturnLineItem.Units Same as single
quantity.
-
standard
price
yes SaleReturnLineItem.RegularUnitPrice Always positive. no
actual
price
yes SaleReturnLineItem.ActualUnitPrice
If special price (ItemSellingPrices.PriceTypeCode = 01) available
then special price
If standard price (ItemSellingPrices.PriceTypeCode = 00)
available then standard price
If no price available or price = 0 then manual entered price
Always positive. no
line item
total
before
price
override
and line
item
discounts
yes If SaleReturnLineItem.SellUnitRetailPriceEntryMethodCode in
(BARC, SCAL):
SaleReturnLineItem.ExtendedAmount will not be calculated. It
will be set by registration process by value from barcode or
scale. No POS process is allowed to change it afterwards.
Else:
SaleReturnLineItem.ExtendedAmount =
SaleReturnLineItem.Quantity * SaleReturnLineItem.Units *
SaleReturnLineItem.ActualUnitPrice
Same as single
quantity.
yes Y
line item
total after
price
override
INFO = SaleReturnLineItem.ExtendedAmount +
RetailPriceModifier.Amount with
RetailPriceModifier.CalculationMethodCode = MAPO
Same as single
quantity.
-
SDK Promotion Calculation Engine
230 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
transaction
level
transactio
n data
Persistenc
y database Sign of amount
Inver
t
Checke
d
line item
total after
price
override
and line
item
discounts
INFO = SaleReturnLineItem.ExtendedAmount +
SaleReturnLineItem.ExtendedDiscountAmount
Same as single
quantity.
-
line item
gross
amount
yes SaleReturnLineItem.GrandExtendedAmount =
SaleReturnLineItem.ExtendedAmount +
SaleReturnLineItem.ExtendedDiscountAmount +
sum(SaleReturnTaxLineItem.TaxAmount |
SaleReturnTaxLineItem.TaxIncludedInPricesFlag = false)
Same as single
quantity.
yes Y
Line Item
Discounts
manual
price
override
yes RetailPriceModifier.NewPrice
RetailPriceModifier.Amount
RetailPriceModifier.CalculationMethodCode = MAPO and
RetailPriceModifier.ProrateFrom = null
NewPrice: always
positive
Amount:
For
higher
price
positiv
e.
For
lower
price
negativ
e.
Depen
ds on
the
sign of
the line
item.
no
discounts yes RetailPriceModifier.Amount
RetailPriceModifier.CalculationMethodCode <> MAPO and
RetailPriceModifier.ProrateFrom = null
For surcharge
positive.
For discount
negative.
Depends on the
sign of the line
item.
yes
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 231
transaction
level
transactio
n data
Persistenc
y database Sign of amount
Inver
t
Checke
d
transactio
n
discount
share
yes RetailPriceModifier.Amount
RetailPriceModifier.ProrateFrom <> null
For surcharge
positive.
For discount
negative.
Depends on the
sign of the line
item.
yes
total line
item
discount
yes SaleReturnLineItem.ExtendedDiscountAmount =
sum(RetailPriceModifier.Amount |
RetailPriceModifier.ProrateFrom = null)
yes Y
Line Item
Taxes
tax
amount
yes SaleReturnTaxLineItem.TaxAmount For positive line
items (sale, pay
in, gift cert sale,
...): +
For negative line
items (return,
pay out, ...): -
yes
Rounding subtotal
rounding
yes RoundingLineItem.Amount
TypeCode 00
Round up: +
Round down: -
yes
change
rounding
yes RoundingLineItem.Amount
TypeCode 01
Round up: +
Round down: -
yes
Subtotal
before
transaction
discounts
subtotal
(1)
yes RetailTransactionTotal.Amount =
sum(SaleReturnLineItem.ExtendedAmount +
SaleReturnLineItem.ExtendedDiscountAmount |
RetailTransactionLineItem.VoidFlag = false and
SaleReturnLineItem.ItemType <> SO (sales order))
RetailTransactionTotal.TransactionTotalTypeCode = SUBTOTAL
yes Y
Transactio
n
Discounts
discounts yes PriceModificationLineItem.Amount
For surcharge
positive. For
discount
negative.
yes
SDK Promotion Calculation Engine
232 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
transaction
level
transactio
n data
Persistenc
y database Sign of amount
Inver
t
Checke
d
Subtotal
after
transaction
discounts
subtotal
(2)
yes RetailTransactionTotal.Amount =
subtotal (1) + sum(PriceModificationLineItem.Amount)
RetailTransactionTotal.TransactionTotalTypeCode =
SUBTOTAL_DISCOUNT
yes Y
Transactio
n Tax
tax
amount
yes TaxLineItem.TaxAmount yes
Transactio
n Total
transactio
n total
yes RetailTransactionTotal.Amount =
subtotal (2) + sum(TaxLineItem.TaxAmount |
TaxLineItem.TaxIncludedInPricesFlag = false) + subtotal
rounding
RetailTransactionTotal.TransactionTotalTypeCode = TOTAL
yes Y
Tender tender
amount
yes TenderLineItem.TenderAmount If the customer
pays something:
+
If the customer
gets back the
tender: -
yes
Line Item
Bonuspoin
ts
bonus
points
yes FrequentShopperPointsModifier.FrequentShopperPointsEarned
Count
FrequentShopperPointsModifier.ProrateFrom = null
Depends on the
sign of the line
item.
yes
transactio
n bonus
points
share
yes FrequentShopperPointsModifier.FrequentShopperPointsEarned
Count
FrequentShopperPointsModifier.ProrateFrom <> null
Depends on the
sign of the line
item.
yes
Transactio
n
Bonuspoin
ts
bonus
points
yes LoyaltyRewardLineItem.PointsAwardedCount Depends on the
sign of the line
items.
yes
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 233
5.3 Domain Object - Promotion
5.3.1 Introduction
This document describes the promotion master data.
For a definition of the used domains/datatypes see chapter Domains.
5.3.2 Data
5.3.2.1 Root entities
5.3.2.1.1 PromotionConditionTypeSO
Entity PromotionConditionTypeSO
Description This object is used for internal loading of condition header of a specific type. The object is not filled in the
import.
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
typeCode Code4 no Code of the condition type
description DescriptionShort no Description of the condition type
sequence Identity yes Sequence - for collision handling
resolution Identity yes Resolution - for collision handling
receiptPrinterName Name no Receipt text
SDK Promotion Calculation Engine
234 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionTypeSO
notShowingFlag Flag yes false Determines whether the result of the
applied condition is to be suppressed
on displays / not printed on the
receipt; for example, position-
dependent default points are not
printed after each position, but only
summarized at the end of the receipt.
5.3.2.1.2 PromotionSO
Entity PromotionSO
Description This domain object contains the promotion data relevant for the Promotion Calculation Engine.
Import from:
The imports from masterData_Promotion.xml and masterData_CustomerPromotion.xml are not intended
for further use.
Attributes
Name Domain Require
d
Multiplicit
y
Defaul
t
Description Calculatio
n Rule
Commen
t
@businessUnitGroupID Identity no No documentation
promotionID DescriptionShort no External ident of the
promotion
Import:
effectiveDateTime TimeStampEffective no Date and time when the
promotion becomes effective
Import:
expirationDateTime TimeStampExpiration no The last date and time when
this promotion is effective
Import:
operatorDisplayName Name no Text to be displayed to the
operator
customerDisplayName Name no Text to be displayed to the
customer
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 235
Entity PromotionSO
receiptPrinterName Name yes Text which is to be printed on
the receipt
origin Code2 yes 01 Origin of the promotion
description DescriptionShort no Promotion description
promotionTypeID Name no Promotion type
Import:
internalPromotionID Identity no The unique identifier for a
promotion
Not imported, generated.
packageID Identity no Internal identification of the
import package (for example,
IDoc file). The identification is
used for monitoring
purposes.
Not imported, generated.
tid TID no Translation identifier - used
for the unique identification
of translations in the
common translation table
Generated, not imported.
XXCustom01 CustomField no Additional field for custom
development.
Import from
masterdata_Promotion_SE.x
ml only.
XXCustom02 CustomField no Additional field for custom
development.
Import from
masterdata_Promotion_SE.x
ml only.
XXCustom03 CustomField no Additional field for custom
development.
Import from
masterdata_Promotion_SE.x
ml only.
SDK Promotion Calculation Engine
236 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionSO
XXCustom04 CustomField no Additional field for custom
development.
Import from
masterdata_Promotion_SE.x
ml only.
XXCustom05 CustomField no Additional field for custom
development.
Import from
masterdata_Promotion_SE.x
ml only.
Sub-entities
Name Domain Require
d
Multiplicit
y
Defaul
t
Description Calculatio
n Rule
Commen
t
conditionList PromotionConditionSO no 1..* List of promotion conditions
promotionTranslationLi
st
PromotionTranslationS
O
no 0..* List of translations
5.3.2.1.3 RebatePromotionConditionRuleSO
Entity RebatePromotionConditionRuleSO
Description extends PromotionConditionRuleSO
Simple discount
Import from Promotion.Condition.Rule.SimpleRebate
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
priceModificationMethodCode PriceModificationMethod yes A code denoting
the method of
modifying the
price that is
being applied to
the transaction.
Import:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 237
Entity RebatePromotionConditionRuleSO
priceModificationAmount Money no The
modification to
be applied to
the price of the
item being
changed,
expressed as a
monetary
amount.
Import:
priceModificationPercent @PercentExtended no The
modification to
be applied to
the price of the
item being
changed,
expressed as a
percentage of
the original
price
Import:
newPriceAmount Money no The reduction to
be applied to
the item being
marked down,
expressed as the
new price for
the item
Import:
adjustmentMethodCode AdjustmentMethodCode no DECREASE A mnemonic
code denoting
what kind of
adjustment is
being made to
the retail price
of the Item.
Import:
SDK Promotion Calculation Engine
238 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.3.2.1.4 Get3Pay2PromotionConditionRuleSO
Entity Get3Pay2PromotionConditionRuleSO
Description extends PromotionConditionRuleSO
Rule: Get 3 Pay 2
Attributes
Name Domain Required Multiplicity Default Description Calculation Rule Comment
toBePaidQuantity Quantity yes Number of items which is to be paid
Import:
5.3.2.1.5 MixAndMatchPromotionConditionRuleSO
Entity MixAndMatchPromotionConditionRuleSO
Description extends PromotionConditionRuleSO
Mix and Match
Import:
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
limitCount Quantity yes 0.0 The maximum number
of mix and matched
items that may be
purchased along with
the item that triggered
the price derivation
rule. For example a
bread maker may be
sold with an offer to
acquire any 3 of 24
varieties of bread mix
for half price. The 3
varieties represent the
mix-and-match-limit-
count.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 239
Entity MixAndMatchPromotionConditionRuleSO
combinationCode MixAndMatchCombinationType yes OR Determines how the
matching items
belonging to the rule
can be combined;
Possible values:
Import:
newSetPriceAmount Money no New price of the set
which is defined by the
matching items of the
condition; is only
relevant for
CombinationCode "ST"
Import:
Sub-entities
Name Domain Required Multiplicity Default Description
matchingItemList MatchingItemSO yes 1..* List of matching items
Import:
5.3.2.1.6 CombinationPromotionConditionEligibilitySO
Entity CombinationPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Combination of eligibilities
Attributes
Name Domain Requir
ed
Multiplici
ty
Default Description Calculati
on Rule
Comme
nt
combinationCode Combination yes A retailer assigned code
denoting the style of
combination that is to be applied
across the child eligibilities that
have been defined in
MultiplePriceDerivationRuleEligi
bilities.
Import:
SDK Promotion Calculation Engine
240 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity CombinationPromotionConditionEligibilitySO
thresholdTypeCode ThresholdType no A code for the type of threshold
which applies to a price
derivation rule eligibility.
Import: Not imported.
thresholdQuantity Quantity yes 0.0 A quantity of items within a
single merchandise structure
level required to be purchased
to trigger this price derivation
rule.
Import: Not imported.
thresholdAmount Money yes 0.0 A monetary amount within a
single merchandise structure
level required to be purchased
to trigger this price derivation
rule.
Import: Not imported.
intervalQuantity Quantity yes 0.0 An interval quantity for which
this price derivation rule is
eligible.
Import: Not imported.
intervalAmount Money yes 0.0 An interval monetary amount for
which this price derivation rule is
eligible.
Import: Not imported.
limitQuantity Quantity yes 999999
.0
The maximum number of items
within a merchandise structure
level for which this price
derivation rule is eligible.
Import: Not imported.
limitAmount Money yes 999999
.0
The maximum monetary amount
within a merchandise structure
level for which this price
derivation rule is eligible.
Import: Not imported.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 241
Entity CombinationPromotionConditionEligibilitySO
thresholdForSingleIte
mFlag
Flag no false Determines whether the
threshold values
(quantity/interval or
amount/interval) need to be
valid for a single item within the
merchandise structure
Import: Not imported.
Sub-entities
Name Domain Requir
ed
Multiplici
ty
Default Description Calculati
on Rule
Comme
nt
childEligibilityList PromotionConditionEligibil
itySO
no 0..* List of child eligibilities
Import: Eligibilities from
Promotion.Condition.Eligibility
5.3.2.1.7 CouponPromotionConditionEligibilitySO
Entity CouponPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Eligibility for coupon
Import from PromotionCPD.xml only. If the Promotion.Condition.Eligibility.Coupon.IDList contains more
coupon ID's, one eligibility is created for each ID and the eligibilities are connected via a combination
eligibility of the type OR.
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
couponNumber CouponNumber yes Coupon number
Import:
consumptionTypeCode CouponConsumptionType no Controls the
consumption of
coupons:
SDK Promotion Calculation Engine
242 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.3.2.1.8 CustomerGroupPromotionConditionEligibilitySO
Entity CustomerGroupPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Eligibility for customer group
Import from PromotionCPD.xml only.
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
customerGroupID IdentityAlphaNumeric40 yes Reference to the customer
group
5.3.2.1.9 ExternalTriggerValuePromotionConditionEligibilitySO
Entity ExternalTriggerValuePromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Eligibility for external trigger
Import from PromotionCPD.xml only.
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
triggerValueTypeCode TriggerValueTypeCode yes The type of the
trigger value
Enum does not
work for
OmniPOS,
however, it has
to stay due to
compatibility
reasons
triggerValue Money yes The value
(amount). Its type
is determined by
ValueTypeCode.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 243
Entity ExternalTriggerValuePromotionConditionEligibilitySO
freeTriggerValueTypeCode Code2 no The external
trigger value type
code
This is the correct
- free - typecode
which is used by
OmniPOS
5.3.2.1.10 ItemPromotionConditionEligibilitySO
Entity ItemPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Item eligibility
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
itemID IdentityUUID no The item ID
Import:
unitOfMeasureCode Code4 no The unit of measure code
Import:
thresholdTypeCode ThresholdType no A code for the type of threshold
which applies to a price derivation
rule eligibility.
Import:
thresholdQuantity Quantity no A quantity of items within a single
merchandise structure level required
to be purchased to trigger this price
derivation rule.
Import:
thresholdAmount Money no A monetary amount required to be
purchased to trigger this price
derivation rule
Import:
intervalQuantity Quantity no An interval quantity for which this
price derivation rule eligible
Import:
SDK Promotion Calculation Engine
244 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity ItemPromotionConditionEligibilitySO
intervalAmount Money no An interval monetary amount for
which this price derivation rule
eligible
Import:
limitQuantity Quantity no 999999.0 The maximum number of items for
which this price derivation rule is
eligible
Import:
limitAmount Money no 999999.0 The maximum monetary amount
within a merchandise structure level
for which this price derivation rule is
eligible.
Import:
5.3.2.1.11 ManualPromotionConditionEligibilitySO
Entity ManualPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Manual eligibility
Import from PromotionCPD.xml only, from the
Promotion.Condition.Eligibility.ManualRebateTrigger.ManualTrigger and
Promotion.Condition.Eligibility.ManualRebateTrigger.AutomaticalTrigger elements.
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
triggerType Code2 yes 00 Trigger type - reference to the POS
configuration
ManualTrigger.TypeCode or "LS" in
case of AutomaticalTrigger.
triggerValue DescriptionShort yes 0 Trigger value - Reference to the
POS configuration
thresholdValue Money yes 0.0 Start value (lower border) for
choosing; is only considered in
case of TriggerType "LS"
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 245
Entity ManualPromotionConditionEligibilitySO
intervalValue Money yes 0.0 Interval value for choosing; is only
considered in case of TriggerType
"LS"
limitValue Money yes 0.0 Limit value (upper border) for
choosing; is only considered in
case of TriggerType "LS"
privilegeType PrivilegeType no Type of rebate:
is only considered in case of
TriggerType "LS"
userActionRequiredFlag Flag yes false Determines whether additionally it
is necessary that the user presses a
button in order that the eligibility
is fulfilled; is used only in case of
TriggerType "LS"
Import: Not imported.
5.3.2.1.12 MHGPromotionConditionEligibilitySO
Entity MHGPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Merchandise hierarchy group eligibility
Import: Eligibilities from
Promotion.Condition.Eligibility.MerchandiseHierarchyGroupList|MerchandiseHierarchyGroup. Eligibilities
from Promotion.Condition.Eligibility.ItemList|Item in case the eligibility contains more then one item.
Attributes
Name Domain Req
uire
d
Multi
plicity
Defa
ult
Description Calcul
ation
Rule
Com
ment
merchandiseHierarch
yGroupIDQualifier
Code4 no Qualifier of the merchandise group.
Import:
SDK Promotion Calculation Engine
246 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity MHGPromotionConditionEligibilitySO
merchandiseHierarch
yGroupID
MerchandiseHier
archyGroupID
no ID of the merchandise group
Import: If the eligibility contains a list of MHGs or a list of
items, a virtual MHG is created for the list. The ID of the
virtual MHG is filled in this field in. Otherwise from
Promotion.Condition.Eligibility.MerchandiseHierarchyGro
upList|MerchandiseHierarchyGroup.IDList.ID.
thresholdTypeCode ThresholdType no A code for the type of threshold which applies to a price
derivation rule eligibility.
Import:
thresholdQuantity Quantity no A quantity of items within a single merchandise structure
level required to be purchased to trigger this price
derivation rule.
Import:
thresholdAmount Money no A monetary amount required to be purchased to trigger
this price derivation rule
Import:
intervalQuantity Quantity no An interval quantity for which this price derivation rule
eligible
Import:
intervalAmount Money no An interval monetary amount for which this price
derivation rule eligible
Import:
limitQuantity Quantity no 9999
99.0
The maximum number of items for which this price
derivation rule is eligible
Import:
limitAmount Money no 9999
99.0
The maximum monetary amount within a merchandise
structure level for which this price derivation rule is
eligible.
Import:
thresholdForSingleIte
mFlag
Flag no false Determines whether the threshold values
(quantity/interval or amount/interval) need to be valid
for a single item within the merchandise structure
Import:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 247
5.3.2.1.13 PositionTypePromotionConditionEligibilitySO
Entity PositionTypePromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Eligibility for position type
Import from PromotionCPD.xml only.
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
positionType PositionTypeCode yes Line item type
(SaleReturnLineItem.ItemType from the
selling transaction)
5.3.2.1.14 CustomerPromotionConditionEligibilitySO
Entity CustomerPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Eligibility for customers
Import from PromotionCPD.xml only, from the Promotion.Condition.Eligibility.CustomerID.
Attributes
Name Domain Required Multiplicity Default Description Calculation Rule Comment
customerID IdentityAlphaNumeric40 yes Reference to the customer
5.3.2.1.15 MarketBasketAmountEligibilitySO
Entity MarketBasketAmountEligibilitySO
Description extends PromotionConditionEligibilitySO
Eligibility for market basket amount
Import from Promotion.Condition.Eligibility.MarketBasketThresholdAmount.
SDK Promotion Calculation Engine
248 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity MarketBasketAmountEligibilitySO
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
marketBasketThresholdAmount Money yes The extended retail value of sell
units required to cause application
of this price change rule - before
application of this rule.
5.3.2.1.16 WorkerDiscountGroupPromotionConditionEligibilitySO
Entity WorkerDiscountGroupPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Eligibility for workers
Import from PromotionCPD.xml only, from the Promotion.Condition.Eligibility.EmployeeGroupID.
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
employeeDiscountGroupID Identity yes 0 The identifier for a specific employee
discount group
Import:
5.3.2.1.17 @PromotionItemSearchSO
Entity @PromotionItemSearchSO
Description No documentation
Sub-entities
Name Domain Required Multiplicity Default Description Calculation Rule Comment
@conditionList @PromotionItemSearchConditionSO no 1..* No documentation
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 249
5.3.2.2 Non-root entities
5.3.2.2.1 PromotionTranslationSO
Entity PromotionTranslationSO
Description Translation of the promotion texts in one language
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
languageID Code10 yes Language id
Import:
operatorDisplayName Name no Translation of the text to be
displayed to the operator.
Import:
customerDisplayName Name no Translation of the text to be
displayed to the customer.
Import:
receiptPrinterName Name no Translation of the text to be
printed on the receipt
Import:
description DescriptionShort no Translation of the short
description
Import:
5.3.2.2.2 PromotionConditionSO
Entity PromotionConditionSO
Description Condition of the promotion
Attributes
Name Domain Requir
ed
Multipli
city
Default Description Calculat
ion Rule
Comm
ent
SDK Promotion Calculation Engine
250 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionSO
promotionID Identity no The unique identifier
for a promotion.
Mapped from
promotion.
conditionID Identity no A identifier for a
condition.
Generated, not
imported.
internalRuleID Identity no A identifier for a
specific price derivation
rule.
Generated, not
imported.
internalEligibilityID Identity no A unique identifier for
a Price Derivation Rule
eligibility. It is the ID of
the root eligibility of
the condition. (useful if
the combination
eligibility is used).
typeCode Code4 no Code of the condition
type
sequence Identity yes Sequence - for collision
handling
resolution Identity yes Resolution - for
collision handling
notShowingFlag Flag yes false Determines whether
the result of the
applied condition is to
be suppressed on
displays / not printed
on the receipt; for
example, position-
dependent default
points are not printed
after each position, but
only summarized at the
end of the receipt.
description DescriptionShort no Short description
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 251
Entity PromotionConditionSO
receiptPrinterName Name no Receipt text
(overwrites the receipt
text of the promotion)
operatorDisplayName Name no Operator display text
(overwrites the
operator display text of
the promotion)
customerDisplayName Name no Customer display text
(overwrites the
customer display text
of the promotion)
itemDiscountControlVecto
r
Code10 no "vector" which
describes which
discount typecodes are
allowed for usage by
the loyalty server;
Item.DiscountTypeCod
e is used as an index in
order to find the right
position inside the
vector; Possible values
for each position are:
saleReturnTypeCode SaleReturnTypeCode no SALES_RETURNS Determines whether
the condition can be
used only for sales,
only for returns, or for
both:
amendmentTypeCode AmendmentTypeCode no SALES_AMEND
MENTS
Determines whether
the condition can be
used only for sales,
only for amendments,
or for both:
exclusiveFlag Flag yes false Determines whether
this condition is an
exclusive condition
Import:
iconID DescriptionShort no ID of the icon that
should be displayed as
sales information on
POS
Import:
SDK Promotion Calculation Engine
252 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionSO
concurrenceControlVector Code10 no Determines how this
condition works in
relation to other
applicable conditions
tid TID no Translation identifier -
used for the unique
identification of
translations in the
common translation
table.
Generated, not
imported.
XXCustom01 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion
_SE.xml only.
XXCustom02 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion
_SE.xml only.
XXCustom03 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion
_SE.xml only.
XXCustom04 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion
_SE.xml only.
XXCustom05 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion
_SE.xml only.
Sub-entities
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 253
Entity PromotionConditionSO
Name Domain Requir
ed
Multipli
city
Default Description Calculat
ion Rule
Comm
ent
timeGroup PromotionConditionTime
GroupSO
no Time restrictions
Import:
rule PromotionConditionRuleS
O
yes Rule data
eligibility PromotionConditionEligibi
litySO
yes Eligibility data (tree)
promotionConditionTransl
ationList
PromotionConditionTrans
lationSO
no 0..* List of translations
5.3.2.2.3 PromotionConditionTranslationSO
Entity PromotionConditionTranslationSO
Description Translation of condition texts in one language
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
languageID Code10 yes Language id
operatorDisplayName Name no Translation of the operator
display text.
customerDisplayName Name no Translation of the customer
display text.
receiptPrinterName Name no Translation of the receipt text.
description DescriptionShort no Translation of the short
description
SDK Promotion Calculation Engine
254 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.3.2.2.4 PromotionConditionTimeGroupSO
Entity PromotionConditionTimeGroupSO
Description Time restriction
Attributes
Name Domain Required Multiplicity Default Description Calculation Rule Comment
internalTimeGroupID Identity no ID of the time group
Generated, not imported.
Sub-entities
Name Domain Required Multiplicity Default Description Calculation Rule Comment
timePeriodList TimePeriodSO no 0..* List of time periods
Import:
5.3.2.2.5 TimePeriodSO
Entity TimePeriodSO
Description Time period
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
dayOfWeek Weekday no A 2 character code
denoting the day of the
week that the time
period falls on
Import:
startTime DateTime no The time of day that the
time period commences
duration QuantityShortCountMinutes no The duration included in
the time period from the
start time
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 255
Entity TimePeriodSO
internalTimePeriodID Identity no ID of the time period
Generated, not
imported.
5.3.2.2.6 PromotionConditionRuleSO
Entity PromotionConditionRuleSO
Description Promotion condition rule
Attributes
Name Domain Requ
ired
Multip
licity
Def
ault
Description Calculation Rule Comm
ent
internalRuleID Identity no A identifier for a
specific price
derivation rule.
Generated, not
imported.
name Name no Price derivation
rule name
Not imported.
description DescriptionShort no Business
description for
this price
derivation rule.
Import:
SDK Promotion Calculation Engine
256 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionRuleSO
transactionControlBreakCode RuleControlType no This is a special
code that
determines when,
during the entry
of a sale
transaction, this
rule will be
applied. For
example a price
change rule may
be applied on a
line item by line
item basis (which
is DETAIL TIME), a
price change rule
may be triggered
after a
transaction is
totaled -- but
before tax and
tender entry (i.e.
MERCHANDISE
SUBTOTAL TIME).
Import:
statusCode Code2Status no Defines the
current status for
the price
derivation rule.
Examples of valid
codes include:
Pending, Active,
Canceled, Inactive
Import:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 257
Entity PromotionConditionRuleSO
typeCode RuleType yes Defines the type
of price
derivation rule.
The following
type is reserved
for usage by
Promotion
Calculation
Engine itself. It
cannot be used in
promotion
master data.
Import: The value
is filled according
to the used rule
type from
Promotion.Condit
ion.Rule.
ruleID DescriptionShort no External ident of
the price
derivation rule
Import:
bonusPointsFlag Flag yes fals
e
Determines
whether rebate
or bonus points
are awarded by
the rule
Import:
roundingMethodCode RoundingMethodCode no Determines how
the calculated
reduction amount
is to be rounded;
PriceDerivationRule.Rounding
MethodCode
deprec
ated,
but
still
neede
d for
old
POS
decimalPlacesCount @QuantityShortCount yes 2 Requested
number of
decimal places of
the calculated
reduction
amount;
PriceDerivationRule.DecimalPl
acesCount
deprec
ated,
but
still
neede
d for
old
POS
SDK Promotion Calculation Engine
258 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionRuleSO
roundDestinationValue @QuantityShortCount yes 1 Additional
information for
rounding,
possible values:
PriceDerivationRule,RoundDes
tinationValue
deprec
ated,
but
still
neede
d for
old
POS
discountMethodCode Code2 no Determines how
the rebate
influences the
transaction:
Import:
giftCertificateExpirationDate DateCalendar no End of the date
range in which
the gift certificate
is valid
Import:
tenderTypeCode Code4 no A code which
uniquely
identifies the type
of tender, ie cash,
check, credit card,
etc.
Import:
prohibitTransactionRelatedPr
omotionConditionFlag
Flag yes fals
e
Determines
whether applying
this condition
influences the
calculation base
of subsequent
transaction-
related conditions
(false) or not
(true); is relevant
for position-
related "money"
conditions only
Import:
chooseItemMethod ChooseItemMethod no Determines, in
which sequence
items get rebate:
Import:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 259
Entity PromotionConditionRuleSO
noEffectOnSubsequentPromo
tionConditionFlag
Flag no fals
e
Determines
whether applying
this condition
influences the
calculation base
of subsequent
conditions (false)
or not (true); is
relevant for
position-related
"money"
conditions only
Import:
deprec
ated
calculationBase CalculationBaseType no Base of the
calculation:
couponPrintoutID Name no number of the
printout coupon
Import:
couponPrintoutRule CouponPrintoutRule no Type code of the
printout rule
Import:
couponPrintoutText Image no Formatted Text of
the printout
coupon
Import:
considerPreviousPromotionC
onditionFlag
Flag yes fals
e
Indicates whether
all conditions are
to be considered
which were
applied before
(true) or not
(false).
Import:
deprec
ated
printoutValidityPeriod @QuantityDayCount no Validity period for
printout coupons
or gift certificates
Import:
SDK Promotion Calculation Engine
260 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionRuleSO
tid TID no Translation
identifier - used
for the unique
identification of
translations in the
common
translation table.
Generated, not
imported.
externalConditionRuleID CustomField no External ID of the
condition rule
(filled with
PromotionConditi
onID)
XXCustom01 CustomField no Additional field
for custom
development.
Import from
masterdata_Prom
otion_SE.xml
only.
XXCustom02 CustomField no Additional field
for custom
development.
Import from
masterdata_Prom
otion_SE.xml
only.
XXCustom03 CustomField no Additional field
for custom
development.
Import from
masterdata_Prom
otion_SE.xml
only.
XXCustom04 CustomField no Additional field
for custom
development.
Import from
masterdata_Prom
otion_SE.xml
only.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 261
Entity PromotionConditionRuleSO
XXCustom05 CustomField no Additional field
for custom
development.
Import from
masterdata_Prom
otion_SE.xml
only.
SDK Promotion Calculation Engine
262 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
calculationBaseSequence Identity no Determines which
one of the
previously applied
modifiers is to be
considered as
calculation base
for the current
modification. In
detail, the
calculation base
for the current
price derivation
rule is to be
determined as
following:
- In case that no
price derivation
rules were
applied before, it
is the original
price/total.
- Null: all price
derivation rules
which were
applied before
the current price
derivation rule
are to be
considered, i.e.
the calculation
base for the
current price
derivation rule
equals to the new
price of the price
derivation rule
which was
applied just
before it = as
latest.
- Otherwise, the
calculation base
for the current
price derivation
rule equals to the
new price of that
price derivation
rule which was
applied one or
more steps
before it having
the highest
PriceDerivationRule.Calculatio
nBaseSequenceGK
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 263
Entity PromotionConditionRuleSO
sequence <=
CalculationBaseSe
quence (or the
original price if no
such price
derivation rule
was applied).
roundingRuleID Identity No The system-
generated
identifier of the
rounding rule
which applies for
discounts/bonus
points counts
resulting from
applying the price
derivation rule
PriceDerivationRule.RoundingR
uleIDGK
shareRoundingRuleID Identity No The system-
generated
identifier of the
rounding rule
which applies for
shares resulting
from prorating
basket-related
discounts or
bonus points
resulting from
applying the price
derivation rule
PriceDerivationRule.ShareRoun
dingRuleIDGK
pointsAmountRoundingRuleI
D
Identity No The system-
generated
identifier of the
rounding rule
applies for
monetary
equivalents to
bonus points
counts resulting
from applying the
price derivation
rule
PriceDerivationRule.PointsAmo
untRoundingRuleIDGK
Sub-entities
Name Domain Requ
ired
Multip
licity
Def
ault
Description Calculation Rule
Comm
ent
SDK Promotion Calculation Engine
264 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionRuleSO
promotionConditionRuleTran
slationList
PromotionConditionR
uleTranslationSO
no 0..* List of
translations
5.3.2.2.7 PromotionConditionRuleTranslationSO
Entity PromotionConditionRuleTranslationSO
Description Translation of condition rule texts in one language
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
languageID Code10 yes Language id
name Name no Translation of the rule name
description DescriptionShort no Translation of the description
couponPrintoutText DescriptionShort no Translation of the printout coupon
text
5.3.2.2.8 MatchingItemSO
Entity MatchingItemSO
Description Matching item
Attributes
Name Domain Requir
ed
Multiplici
ty
Defau
lt
Description Calculati
on Rule
Comme
nt
internalRuleID Identity no A identifier for a specific
price derivation rule.
priceModificationPercent Percent no The percentage
modification each time
this rule is applied.
Import:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 265
Entity MatchingItemSO
priceModificationAmount Money no The monetary amount of
the modification each
time this rule is applied.
Import:
newPriceAmount Money no A price modification
expressed as a new price.
Import:
priceModificationAllocationP
ercent
Percent no The percentage of the
total modification from
the promotion that is to
be applied to this item.
Example: Burger normally
costs $2.00 with Fries &
Coke normally $1.00 each.
When combined in a Mix
'n Match Promotion at
$3.50 the missing 50cents
may need to be allocated
back to the constituent
parts for taxation and
other reasons.
Import:
reductionMethodCode ReductionMethodMixAnd
Match
yes A code denoting the
method of modifying the
price that is being applied
to the transaction.
adjustmentMethodCode AdjustmentMethodCode no A mnemonic code
denoting what kind of
adjustment is being made
to the retail price of the
item.
Import: Not imported.
value Money yes The percentage
modification,
modification amount or
new price amount
according to the
reduction method code.
requiredQuantity Quantity no The count of that mix &
match item which is
needed in the context of
the mix & match rule
SDK Promotion Calculation Engine
266 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity MatchingItemSO
XXCustom01 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_S
E.xml only.
XXCustom02 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_S
E.xml only.
XXCustom03 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_S
E.xml only.
XXCustom04 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_S
E.xml only.
XXCustom05 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_S
E.xml only.
Sub-entities
Name Domain Requir
ed
Multiplici
ty
Defau
lt
Description Calculati
on Rule
Comme
nt
itemList MatchingItemRelationSO no 0..* Promotional product -
items
mhgList MatchingMhgRelationSO no 0..*
merchandiseSet MerchandiseSetSO no 0..1 Promotional product -
merchandise set
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 267
5.3.2.2.9 MatchingItemRelationSO
Entity MatchingItemRelationSO
Description Promotional items.
Attributes
Name Domain Required Multiplicity Default Description Calculation Rule Comment
itemID IdentityUUID yes The item ID
Import:
UOMCode Code4 no The unit of measure code
Import:
5.3.2.2.10 MatchingMhgRelationSO
Entity MatchingMhgRelationSO
Description Promotional merchandise groups
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
mhgID MerchandiseHierarchyGroupID yes ID of the merchandise
hierarchy group.
mhgQualifier Code4 yes MAIN Qualifier of the merchandise
group.
5.3.2.2.11 PromotionConditionEligibilitySO
Entity PromotionConditionEligibilitySO
Description Promotion eligibility
Attributes
SDK Promotion Calculation Engine
268 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity PromotionConditionEligibilitySO
Name Domain Requir
ed
Multiplic
ity
Defau
lt
Description Calculation Rule Comme
nt
internalEligibilit
yID
Identity no A unique identifier for
the rule eligibility
Generated, not
imported.
typeCode EligibilityType yes A code that indicates the
type of Price Derivation
Rule Eligibility. Possible
types:
Import:
rootEligibilityID Identity no Reference to the root
eligibility of the
condition eligibility tree
Not imported.
parentEligibility
ID
Identity no Reference to the parent
eligibility in the
condition eligibility tree
Not imported.
levelID @LevelId no Level in the eligibility
tree the eligibility
belongs to
Not imported.
effectiveDateTi
me
TimeStampEffect
ive
no The time stamp this
eligibility becomes active
Not imported.
expirationDate
Time
TimeStampExpir
ation
no The last date and time
that this eligibility is
effective
Not imported.
statusCode Code2 no Defines the current
status for the eligibility.
Examples of valid codes
include: AC/null = Active,
IA = Inactive
Import:
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 269
Entity PromotionConditionEligibilitySO
XXCustom01 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_
SE.xml only.
XXCustom02 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_
SE.xml only.
XXCustom03 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_
SE.xml only.
XXCustom04 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_
SE.xml only.
XXCustom05 CustomField no Additional field for
custom development.
Import from
masterdata_Promotion_
SE.xml only.
negationFlag Flag yes false Determines whether the
eligibility must be
fulfilled (false) or not
(true) in order that the
price derivation rule can
be applied
PriceDerivationRuleEligibility.Negati
onFlagGK
SDK Promotion Calculation Engine
270 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.3.2.2.12 ExternalActionPromotionConditionRuleSO
Entity ExternalActionPromotionConditionRuleSO
Description extends PromotionConditionRuleSO
An action is to be performed by the client which invoked the Promotion Calculation Engine in case that the
price derivation rule applies
Attributes
Name Domain Requir
ed
Multiplic
ity
Defa
ult
Descripti
on
Calculation Rule Comm
ent
externalActionID Name60GK yes The
ident of
the
external
action
ExternalActionPriceDerivationRuleGK.Exte
rnalActionID
externalActionDescrip
tion
DescriptionShort No The
descripti
on of the
external
action
ExternalActionPriceDerivationRuleGK.Desc
ription
Sub-entities
Name Domain Requir
ed
Multiplic
ity
Defa
ult
Descripti
on
Calculation Rule Comm
ent
externalActionParame
terList
ExternalActionParam
eterSO
No 0..* List of
paramet
ers of
the
external
action
externalActionTextList ExternalActionTextSO No 0..* List of
texts of
the
external
action
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 271
5.3.2.2.13 ExternalActionParameterSO
Entity ExternalActionParameterSO
Description Contains information about parameters for the action to be performed by the client which invoked the Promotion
Calculation Engine in case that the price derivation rule applies
Attributes
Name Domain Require
d
Multiplicit
y
Defaul
t
Descriptio
n
Calculation Rule Commen
t
parameterID Name60GK Yes The
parameter
ident
ExternalActionParameterGK.ParameterID
parameterValu
e
DescriptionShor
t
Yes The value
of the
parameter
ExternalActionParameterGK.ParameterValu
e
XXCustom01 XXCUSTOMGK No ExternalActionParameterGK.XXCustom01
XXCustom02 XXCUSTOMGK No ExternalActionParameterGK.XXCustom02
XXCustom03 XXCUSTOMGK No ExternalActionParameterGK.XXCustom03
XXCustom04 XXCUSTOMGK No ExternalActionParameterGK.XXCustom04
XXCustom05 XXCUSTOMGK No ExternalActionParameterGK.XXCustom05
5.3.2.2.14 ExternalActionTextSO
Entity ExternalActionTextSO
Description Contains information about texts for the action to be performed by the client which invoked the Promotion
Calculation Engine in case that the price derivation rule applies
Attributes
Name Domain Required Multiplicity Default Description Calculation Rule Comment
textID Name60GK Yes The text
ident
ExternalActionTextGK.TextID
text DescriptionShort Yes The text
itself
ExternalActionTextGK.Text
SDK Promotion Calculation Engine
272 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity ExternalActionTextSO
XXCustom01 XXCUSTOMGK No ExternalActionTextGK.XXCustom01
XXCustom02 XXCUSTOMGK No ExternalActionTextGK.XXCustom02
XXCustom03 XXCUSTOMGK No ExternalActionTextGK.XXCustom03
XXCustom04 XXCUSTOMGK No ExternalActionTextGK.XXCustom04
XXCustom05 XXCUSTOMGK No ExternalActionTextGK.XXCustom05
5.3.2.2.15 MerchandiseSetPromotionConditionEligibilitySO
Entity MerchandiseSetPromotionConditionEligibilitySO
Description extends PromotionConditionEligibilitySO
Defines a merchandise set resulting from the application of set operations to merchandise hierarchy groups and/or
items and the further conditions regarding to quantities and amounts which govern the application of the associate
rule to an item falling under the resulting merchandise set at the time an instance of the item is recorded as a line
item in a sale/return.
Attributes
Name Domain Requir
ed
Multiplic
ity
Defaul
t
Descripti
on
Calculation Rule Comme
nt
merchandiseSe
t
MerchandiseS
etSO
yes The
merchand
ise set
thresholdType
Code
ThresholdType yes A code
for the
type of
threshold
which
applies to
a price
derivatio
n rule
eligibility.
MerchandiseSetPriceDerivationRuleEligibilityGK.Thres
holdTypeCode
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 273
Entity MerchandiseSetPromotionConditionEligibilitySO
thresholdQuan
tity
Quantity16_3
GK
no A
quantity
of items
within a
merchand
ise set
required
to be
purchase
d to
trigger
this price
derivatio
n rule.
MerchandiseSetPriceDerivationRuleEligibilityGK.Thres
holdQuantity
thresholdAmo
unt
Money no A
monetary
amount
within a
merchand
ise set
required
to be
purchase
d to
trigger
this price
derivatio
n rule.
MerchandiseSetPriceDerivationRuleEligibilityGK.Thres
holdAmount
intervalQuantit
y
Quantity16_3
GK
no An
interval
quantity
for which
this price
derivatio
n rule is
eligible.
MerchandiseSetPriceDerivationRuleEligibilityGK.Inter
valQuantity
intervalAmoun
t
Money no An
interval
monetary
amount
for which
this price
derivatio
n rule is
eligible.
MerchandiseSetPriceDerivationRuleEligibilityGK.Inter
valAmount
SDK Promotion Calculation Engine
274 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity MerchandiseSetPromotionConditionEligibilitySO
limitQuantity Quantity16_3
GK
no 99999
9.0
The
maximum
number
of items
within a
merchand
ise set for
which this
price
derivatio
n rule is
eligible.
MerchandiseSetPriceDerivationRuleEligibilityGK..Limi
tQuantity
limitAmount Money no 99999
9.0
The
maximum
monetary
amount
within a
merchand
ise set for
which this
price
derivatio
n rule is
eligible.
MerchandiseSetPriceDerivationRuleEligibilityGK.Limit
Amount
5.3.2.2.16 MerchandiseSetSO
Entity MerchandiseSetSO
Description A merchandise set. (I.e. the reference to the root element of the merchandise set.)
Attributes
Name Domain Requi
red
Multipl
icity
Defa
ult
Descrip
tion
Calculation Rule Com
ment
internalMerchandise
SetGroupID
Identity Yes Unique
identifie
r for the
mercha
ndise
set.
MerchandiseSetPriceDerivationRuleEligibilit
yGK.MerchandiseSetGroupID in eligibility
context
PromotionalProduct.MerchandiseSetGroupI
DGK in matching item context
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 275
Entity MerchandiseSetSO
merchandiseSetID Identity Yes Unique
identifie
r for the
mercha
ndise
set
element
MerchandiseSetPriceDerivationRuleEligibilit
yGK.MerchandiseSetID in eligibility context
PromotionalProduct.MerchandiseSetIDGK
in matching item context
Sub-entities
Name Domain Requi
red
Multipl
icity
Defa
ult
Descrip
tion
Calculation Rule Com
ment
merchandiseSetElem
entList
MerchandiseSetR
elationSO
Yes 1..* The
element
s of the
mercha
ndise
set
5.3.2.2.17 MerchandiseSetRelationSO
Entity MerchandiseSetRelationSO
Description An association between two elements within a merchandise set that establishes one as the higher and one as
the lower level.
Attributes
Name Domain Requir
ed
Multiplic
ity
Defa
ult
Descripti
on
Calculation Rule Comme
nt
childMerchandiseSe
tID
Identity Yes Unique
identifier
for the
child
merchan
dise set
element
MerchandiseSetAssociationGK.ChildMercha
ndiseSetID
parentMerchandise
SetID
Identity Yes Unique
identifier
for the
parent
merchan
dise set
element
MerchandiseSetAssociationGK.ParentMerch
andiseSetID
SDK Promotion Calculation Engine
276 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Entity MerchandiseSetRelationSO
rootMerchandiseSe
tID
Identity Yes Unique
identifier
for the
root
merchan
dise set
element
MerchandiseSetAssociationGK.RootMerchan
diseSetID
merchandiseSetTyp
eCode
MerchandiseSetTyp
eCode
Yes Determin
es the
type of
the set
element
(item,
merchan
dise
hierarchy
group, or
set
operation
)
MerchandiseSetAssociationGK.Merchandise
SetTypeCode
merchandiseSetVal
ue
DescriptionShort Yes The
content
of the set
element
(code of
the set
operation
, item id,
or
merchan
dise
hierarchy
group id)
MerchandiseSetAssociationGK.Merchandise
SetValue
merchandiseSetVal
ue2
DescriptionShort No Further
optional
informati
on
regarding
to the set
element
(unit of
measure
code,
merchan
dise
hierarchy
group
qualifier)
MerchandiseSetAssociationGK.Merchandise
SetValue2
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 277
Entity MerchandiseSetRelationSO
XXCustom01 XXCUSTOMGK No MerchandiseSetAssociationGK.XXCustom01
XXCustom02 XXCUSTOMGK No MerchandiseSetAssociationGK.XXCustom02
XXCustom03 XXCUSTOMGK No MerchandiseSetAssociationGK.XXCustom03
XXCustom04 XXCUSTOMGK No MerchandiseSetAssociationGK.XXCustom04
XXCustom05 XXCUSTOMGK No MerchandiseSetAssociationGK.XXCustom05
5.3.2.2.18 @PromotionItemSearchConditionSO
Entity @PromotionItemSearchConditionSO
Description No documentation
Attributes
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
@iconID DescriptionShort no No
documentation
@receiptPrinterName Name no No
documentation
@promotionID Identity no No
documentation
@ruleID Identity no No
documentation
@eligibilityID Identity no No
documentation
Sub-entities
Name Domain Required Multiplicity Default Description Calculation
Rule
Comment
@rule @PromotionItemSearchRuleSO no No
documentation
@eligibilityList @PromotionItemSearchEligibilitySO no 1..* No
documentation
SDK Promotion Calculation Engine
278 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.3.2.2.19 @PromotionItemSearchEligibilitySO
Entity @PromotionItemSearchEligibilitySO
Description No documentation
Attributes
Name Domain Require
d
Multiplicit
y
Defaul
t
Description Calculatio
n Rule
Comme
nt
@typeCode EligibilityType no No
documentati
on
@itemID IdentityUUID no No
documentati
on
@UOMCode Code4 no No
documentati
on
@merchandiseHierarchyGroupID MerchandiseHierarchyGrou
pID
no No
documentati
on
@merchandiseHierarchyGroupIDQual
ifier
Code4 no No
documentati
on
@thresholdTypeCode ThresholdType no No
documentati
on
@thresholdQuantity Quantity no No
documentati
on
@intervalQuantity Quantity no No
documentati
on
@limitQuantity Quantity no No
documentati
on
@thresholdAmount Money no No
documentati
on
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 279
Entity @PromotionItemSearchEligibilitySO
@intervalAmount Money no No
documentati
on
@limitAmount Money no No
documentati
on
5.3.2.2.20 @PromotionItemSearchRuleSO
Entity @PromotionItemSearchRuleSO
Description No documentation
Attributes
Name Domain Required Multiplicity Default Description Calculation Rule Comment
@ruleTypeCode RuleType no No documentation
@reductionMethodCode PriceModificationMethod no No documentation
@newPriceAmount Money no No documentation
@reductionAmount Money no No documentation
@reductionPercent @PercentExtended no No documentation
@toBePayedCount Quantity no No documentation
SDK Promotion Calculation Engine
280 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
5.4 Domains
5.4.1 Introduction
This document lists the used domains and datatypes.
5.4.2 Domains
Domains
Domain Type Description
@LevelId short (-1) No documentation
@PercentExtended
double (13, 4) No documentation
@QuantityDayCount
double (3, 0) No documentation
@QuantityShortCount
int (3) No documentation
AdjustmentMethodCode
String [ INCREASE(IC) , DECREASE(DC) ] No documentation
Address
String (40) No documentation
AmendmentTypeCode
String [ SALES_AMENDMENTS(00) , SALES(01) ,
AMENDMENTS(02) ]
No documentation
CalculationBaseType
String [ CALCBASE_00(00) , CALCBASE_01(01) ] No documentation
ChooseItemMethod
String [ LOWEST_FIRST(01) , HIGHEST_FIRST(02) ,
LOWEST_FIRST_INT(03) , HIGHEST_FIRST_INT(04) ]
No documentation
City
String (30) City
Code
String (20) No documentation
Code10
String (10) 10-char code
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 281
Domains
Code2
String (2) Two character code lookup value
Code2Status
String (2) DO NOT USE - use Code2 instead
(Status code)
Code4
String (4) Three/four character lookup code
Code6
String (6) Five/six character lookup code
Combination
[ AND, OR, INTERSECTION, OR_FOR_ITEMS ] No documentation
CouponConsumptionType
[ CONSUMPTION_00, CONSUMPTION_01,
CONSUMPTION_02, CONSUMPTION_03 ]
No documentation
CouponNumber
String (40) Coupon number
CouponPrintoutRule
String [ SEPARATE_RECEIPT(00) , PRINT_AT_END(01) ] No documentation
CustomField
String (1000) TODO
DateCalendar
Date Calendar Date CCYYMMDD (without
time)
DateTime
TimeStamp
Calendar Date + Time: CCYYMMDD
HHMMSS (24 hour military time)
DescriptionShort
String (255) Short description
DescriptionNarrative
String Long narrative description
EligibilityType
[ COMB, EGRP, CGRP, CUST, MSTR, ITEM, TOTL, COUP,
MANU, POST, EXTV, MSET ]
No documentation
EmailAddress
String (64) An electronic address for sending e-
EntryMethodCode
String (20) Standardized code used to indicate
how an item, credit card, debit
card, gift card or other identifying
information is captured.
ExchangeRate
double (14, 9) A rate of exchange between two
other numbers.
SDK Promotion Calculation Engine
282 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Domains
Flag
boolean Boolean object
GiftCertificateSerialNumberGK
String (100) The serial number that uniquely
identifies a GIFT CERTIFICATE.
Identity
long (18) A token used to identify an object,
represented as an Integer
IdentityAlphaNumeric
String (20) Alphanumeric identifier
IdentityAlphaNumeric40
String (40) Alphanumeric identifier
IdentityGTIN
String (14) Identifier for item at POS - Global
Trade Item Number (GTIN) is
defined by UCC/EAN
IdentityTransactionExternalGK
String (128) A universally unique identifier for
the Transaction.
IdentityUUID
String (32) A universally unique identifier - a
128 bit value represented as 8
hexadecimal digits followed by a
hyphen, then three groups of 4
hexadecimal digits each followed by
a hyphen, then 12 hexadecimal
digits.
Image
Binary (0) Pictures
ISO_4217_CurrencyCode_char(3)
String (3) No documentation
ISO_4217_CurrencyCodeNumber(3)
String (3) No documentation
ISOCurrencyNumberGK
String (3) Numeric code assigned by ISO to
identify national currencies
LanguageCodeGK
String (10) A combination of a language code
and a country code to denote a
language as spoken in a particular
country.
LineNumber
smallint Line number (incremental counter)
MerchandiseHierarchyGroupID
String (30) Merchandise structure ident
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 283
Domains
MerchandiseSetTypeCode
[ MRHRC, ITM, OPR ] Merchandise set element type
Merchandise hierarchy
group
Item
Set operation
MerchandiseSetOperation
[ IS, UN, DF ] Merchandise set operation
Intersection
Union
Difference
MixAndMatchCombinationType
[ OR, AND, OR_QUANTITY, INTERSECTION,
INTERSECTION_QUANTITY, ST ]
No documentation
Money
double (16, 5) Monetary Value for Totals or
Extensions
MoneyShortCost
double (16, 5) Monetary Value for Unit Cost
MoneyShortRetail
double (16, 5) Monetary Value for Unit Retail
Name
String (40) Name of a person, place, thing
Name60GK
String (60) No documentation
NDescriptionShortGK
Unicode String (255) Short description
NDescriptionNarrativeGK
Unicode String Long narrative description
NNameGK
Unicode String (40) Name of a person, place, thing
Percent
double (7, 4) Ratio of two numbers x 100
PercentExtendedGK
double (13, 4) Ratio of two numbers x 100
Is to be used for loyalty points
related percentages as common
Percent domain isn't sufficient for
them.
SDK Promotion Calculation Engine
284 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Domains
PhoneNumberComplete
String (32) A complete phone number
including country code, area code
and extension.
PositionTypeCode
String [ COMMON(CO) , GIFT_CERTIFICATE(GC) ,
PAY_IN(PI) , PAY_OUT(PO) , PREPAID(PR) ,
EMPTIES_RETURN(ER) , SCALE_RECEIPT(SR) ,
DEPOSIT_ITEM(DI) , PROMOTION_GIFT_CERTIFICATE(PG) ,
SALES_ORDER(SO) , SALES_ORDER_PICK_UP(PU) ,
DOWNPAYMENT(DP) , DOWNPAYMENT_CLEARING(DC) ,
INVOICE_PAYMENT(IP) ]
No documentation
PostalCode
String (15) Postal Code (inc. zip)
PriceModificationMethod
[ RS, RP, PS, RT, PT, TP, T2, PI ] No documentation
PrivilegeType
[ RS, RT, RP, PS, PT, T2, TP ] No documentation
Quantity
double (16, 3) Number of items in a collection
Quantity16_3GK
double (16, 3) Number of items in a collection
QuantityDayCount
double (3, 0) Time interval expressed in days
QuantityIntegerGK
int A count
QuantityShortCount
double (3, 0) Small Number of items in a
collection
QuantityShortCountMinutes
int (9) DO NOT USE - use QuantityCount
instead (Elapsed minutes in a time
interval)
QuantityTransactionCount
double (7, 0) Count of transaction objects
ReductionMethodMixAndMatch
String [ REBATE_SINGLE(RS) , REBATE_PERCENT(RP) ,
PRICE_SINGLE(PS) , ALLOCATION_PERCENT(MP) ]
No documentation
RoundingMethodCode
String [ COMMERCIAL_ROUNDING(00) , DOWN(01) ,
UP(02) ]
No documentation
RuleControlType
[ PO, SU, SP, PC ] No documentation
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 285
Domains
RuleType
[ RB, MM, NO, GP, MA, EX ] No documentation
SaleReturnTypeCode
String [ SALES_RETURNS(00) , SALES(01) , RETURNS(02) ] No documentation
State
String (2) State
TID
long (18) TODO
Time
DateTime Time in HHMMSS - in 24 hour
military time
TimeStampAudit
DateTime Audit Time Stamp
ThresholdType
[ NONE, QUT, QUTI, AMT, AMTI, AMTS, AMQU, COMB ] No documentation
TimeStampEffective
DateTime DO NOT USE - use DateTime or
TimeStamp instead (Effective
/start/ Time Stamp)
TimeStampExpiration
DateTime DO NOT USE - use DateTime or
TimeStamp instead (Expiration
/end/ Time Stamp)
TriggerValueTypeCode
String [ TURNOVER(00) , REBATE_AMOUNT(01)] No documentation
Weekday
[ MO, TU, WE, TH, FR, SA, SU ] No documentation
SDK Promotion Calculation Engine
286 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
6 Client API
6.1 Introduction
The Promotion Calculation Engine gets a request via the client API. The request contains a shopping basket
with multiple line items. The service applies monetary discounts and loyalty points to the given shopping
basket based on its content (items, prices, scanned coupons, assigned customer groups, etc.) on the one
hand and the master data accessible via the data access API on the other hand. Finally, it responds the
shopping basket with added information about the promotions it applied to it.
The transmitted content is based on the ARTS Pricing Service Interface schema version 4.0.0. Where needed,
extensions were added to it.
6.2 Communication Methods
6.2.1 Expected Structure
Cardinality is 1 if not stated otherwise.
If the structure of the request does not fit the expectation, this is a business error.
6.2.1.1 Request
PriceCalculate
o ARTSHeader
o PriceCalculateBody*
6.2.1.2 Response
PriceCalculateResponse
o ARTSHeader
Response
BusinessError - cardinality 0..1
o PriceCalculateBody*
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 287
o *
Loyalty - cardinality 0..*
LoyaltyProgram - cardinality 0..*
ShoppingBasket
LineItem - cardinality 1..*, choice of:
o Sale**
o SaleForDelivery**
o SaleForPickup**
o Return**
o ReturnForDelivery**
o ReturnForPickup**
o CustomerOrderForDelivery**
o CustomerOrderForPickup**
o Discount
PriceDerivationRule - cardinality 0..1
Eligibility - cardinality 0..*
ExternalAction - cardinality 0..1
o Text - cardinality 0..*
o Parameter - cardinality 0..*
o LoyaltyReward
PriceDerivationRule - cardinality 0..1
Eligibility - cardinality 0..*
ExternalAction - cardinality 0..1
o Text - cardinality 0..*
o Parameter - cardinality 0..*
o Coupon
SDK Promotion Calculation Engine
288 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
o PromotionManualTrigger
o PromotionExternalTrigger
RegularSalesUnitPriceRoundingRule - cardinality 0..1
o
o **
RetailPriceModifier - cardinality 0..*
PriceDerivationRule - cardinality 0..1
o Eligibility - cardinality 0..*
o ExternalAction - cardinality 0..1
Text - cardinality 0..*
Parameter - cardinality 0..*
FrequentShopperPointsModifier - cardinality 0..*
PriceDerivationRule - cardinality 0..1
o Eligibility - cardinality 0..*
o ExternalAction - cardinality 0..1
Text - cardinality 0..*
Parameter - cardinality 0..*
PromotionPriceDerivationRuleReference - cardinality 0..*
PromotionManualTrigger - cardinality 0..*
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 289
6.2.2 Mapping of internal data to/from the interface
6.2.2.1 PriceCalculate
The request sent to the calculation engine.
Element/Attribute DO Entity DO Field Rule/Note
ARTSHeader
PriceCalculateBody
InternalMajorVersion - - Must be 1, otherwise it is a business error.
InternalMinorVersion - - Must be 0, otherwise it is a business error.
any - -
6.2.2.2 PriceCalculateResponse
The response of the calculation engine. The content of the request is taken over and extended where
nothing else is stated below.
Element/Attribute DO Entity DO Field Rule/Note
ARTSHeader
PriceCalculateBody
InternalMajorVersion - - Must be 1, otherwise it is a business error.
InternalMinorVersion - - Must be 0, otherwise it is a business error.
any - -
SDK Promotion Calculation Engine
290 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
6.2.2.3 ARTSCommonHeaderType
Element/Attribute DO Entity DO Field Rule/Note
MessageID - - In the request, the client sends a UUID.
For the response, a UUID is to be generated by the system.
DateTime - - The date and time when this message (its header) was created. For example,
2015-01-13T04:48:30.427-05:00.
Response
Response.any
Requestor - - Is routed through simply.
BusinessUnit Transaction BusinessUnitID It is ensured by the client that minimally one BusinessUnit element of
TypeCode "RetailStore" resp. with no type information is sent in in request. The
first BusinessUnit element meeting that condition is considered.
If the length of the BusinessUnit element in the request exceeds 32 chars,
business error GKR-100515 is sent back.
If the BusinessUnit sent in in the request does not exist, business error GKR-
100533 is sent back.
BusinessUnit.TypeCode - -
WorkstationID - - Is routed through simply.
RequestedLanguage - - Is routed through simply. Is needed as Data Access API input.
any - -
ActionCode - - Only possible values are "Calculate" and "Lookup", this is checked in OData.
"Calculate" (default): Pricing is requested for all line items in the shopping
basket together.
"Lookup": Pricing is requested per single line item w/o taking into
consideration any other content of the shopping basket. This is not part of
version 1.
If the attribute is missing in the request, it is to be set to the default.
MessageType - - Only possible values are "Request" and "Response", this is checked in OData.
"Request": Within PriceCalculate.
"Response": Within PriceCalculateResponse.
If the attribute is missing in the request it is to be set to "Request". If
"Response" is used in PriceCalculate business error GKR-100519 is sent back.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 291
6.2.2.4 ResponseCommonData
Element/Attribute DO
Entity
DO
Field Rule/Note
RequestID - - The MessageID of the request.
ResponseTimestamp - - The (ARTSCommonHeaderType) DateTime of the request.
BusinessError
BusinessError.any - -
ResponseCode - - "Rejected" is used when a business error (price calculation impossible) occurred; requests for
which a price calculation could be processed are responded with "OK"
6.2.2.5 PriceCalculateBase
Element/Attribute DO Entity DO Field Rule/Note
TransactionID Transaction TransactionID No pricing-relevant information. Is routed through simply.
If it exceeds 128 chars, it is truncated; the request message can be
processed further.
If it is not provided in the request, an internal identifier is generated.
DateTime RetailTransaction PromotionTimestamp
Loyalty
ShoppingBasket
any - -
TransactionType - - This information is not checked. The line item type is the information
being important for correct pricing.
Currently, only sales transactions are supported. Of course, they can
contain return line items.
Assuming that a return transaction consists of return line items, it could
be priced correctly either.
netPriceFlag - - This information is not checked.
SDK Promotion Calculation Engine
292 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
6.2.2.6 LoyaltyAccountCommonData
Element/Attribute DO Entity DO Field Rule/Note
CustomerID RetailTransactionCustomer CustomerID If the length of the CustomerID element in the request exceeds
40 chars, business error GKR-100515 is sent back. If the request
contains minimally one LoyaltyProgramID element, but no
CustomerID element, business error GKR-100519 is sent back.
LoyaltyProgram
CustomerIsEmployeeFlag - - Currently, we do not need this information as the only way for
granting employee discounts in this context is to handle
employees as customers (no employee discount groups
available).
6.2.2.7 LoyaltyAccountType
Element/Attribute DO Entity DO Field Rule/Note
LoyaltyProgramID RetailTransactionCustomerGroupAssignment CustomerGroupID If the length of the LoyaltyProgramID element
in the request exceeds 40 chars, business error
GKR-100515 is sent back.
any - -
6.2.2.8 ShoppingBasketBase
Element/Attribute DO Entity DO Field Rule/Note
LineItem
any - -
6.2.2.9 LineItemDomainSpecific
-> extends LineItemBase
-> extends LineItemChoiceDomainSpecific
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 293
-> extends LineItemChoiceBase
Element/Attribute DO Entity DO Field Rule/Note
LineItemChoiceBase.Sale
LineItemChoiceBase.SaleForDelivery
LineItemChoiceBase.SaleForPickup
LineItemChoiceBase.Return
LineItemChoiceBase.ReturnForDelivery
LineItemChoiceBase.ReturnForPickup
LineItemChoiceBase.CustomerOrderFor
Delivery
LineItemChoiceBase.CustomerOrderFor
Pickup
LineItemChoiceBase.Discount
LineItemChoiceBase.LoyaltyReward
LineItemChoiceBase.Coupon
LineItemChoiceDomainSpecific.Promoti
onManualTrigger
LineItemChoiceDomainSpecific.Promoti
onExternalTrigger
LineItemChoiceDomainSpecific.any
SDK Promotion Calculation Engine
294 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
LineItemBase.SequenceNumber RetailTransactionLineItem RetailTransactionLineItemSeq
uenceNumber
For sub types
SaleReturnLineItem,
PriceModificationLineIte
m,
LoyaltyRewardLineItem
only. This is as at DO side,
coupons, manual triggers
and external triggers are
not handled as line sub
types of
RetailTransactionLineIte
m.
In the request, if LineItem
sub type is one of the
following:
Sale
SaleForDelivery
SaleForPickup
Return
ReturnForDeliv
ery
ReturnForPicku
p
CustomerOrder
ForDelivery
CustomerOrder
ForPickup
Discount
LoyaltyReward
and SequenceNumber
does not fall into the
smallint/short range or is
not unique within the
line items of those sub
types in the message,
business error GKR-
100522 is sent back.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 295
Element/Attribute DO Entity DO Field Rule/Note
LineItemBase.MerchandiseHierarchy SaleReturnLineItemMerchandise
HierarchyGroup
MerchandiseHierarchyGroupI
D
Calculation engine needs
Information about all
merchandise hierarchy
groups which are
assigned to the line item
directly or indirectly.
Makes sense for sub type
SaleReturnLineItem only,
otherwise it is to be
ignored.
If the length of the
element in the request
exceeds 30 chars,
business error GKR-
100515 is sent back.
LineItemBase.MerchandiseHierarchy.ID SaleReturnLineItemMerchandise
HierarchyGroup
MerchandiseHierarchyGroupI
DQualifier
See explanation of
LineItemBase.Merchandi
seHierarchy.
If the length of the
element in the request
exceeds 4 chars, business
error GKR-100515 is sent
back.
6.2.2.10 SaleBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
ActionCode = "SI" (sale) and
ItemType = "CO" (common)
6.2.2.11 SaleForDeliveryBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
ActionCode = "SI" (sale) and
ItemType = "CO" (common)
plus a related SaleReturnLineItemSalesOrder with
SDK Promotion Calculation Engine
296 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
SalesOrderDeliveryTypeCode = "01" (delivery)
6.2.2.12 SaleForPickupBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
ActionCode = "SI" (sale) and
ItemType = "CO" (common)
plus a related SaleReturnLineItemSalesOrder with
SalesOrderDeliveryTypeCode = "03" (pickup other store)
6.2.2.13 ReturnBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
ActionCode = "RI" (return) and
ItemType = "CO" (common)
6.2.2.14 ReturnForDeliveryBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
ActionCode = "RI" (return) and
ItemType = "CO" (common)
plus a related SaleReturnLineItemSalesOrder with
SalesOrderDeliveryTypeCode = "01" (delivery)
6.2.2.15 ReturnForPickupBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 297
ActionCode = "RI" (return) and
ItemType = "CO" (common)
plus a related SaleReturnLineItemSalesOrder with
SalesOrderDeliveryTypeCode = "03" (pickup other store)
6.2.2.16 CustomerOrderForDeliveryBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
ActionCode = "SI" (sale) and
ItemType = "SO" (sales order)
6.2.2.17 CustomerOrderForPickupBase
-> extends ItemDomainSpecific
Maps at DO side to a SaleReturnLineItem with
ActionCode = "SI" (sale) and
ItemType = "PU" (sales order pickup)
6.2.2.18 ItemDomainSpecific
-> extends ItemBase
Element/Attribute DO Entity DO Field Rule/Note
ItemBase.ItemID SaleReturnLineItem POSItemID In the schema, there is a choice between
ItemID and MerchandiseHierarchyGroup
element. In case that no ItemID is provided
it is a merchandise category sale
ItemBase.MerchandiseHierarchy SaleReturnLineItem MainMerchandiseHierarch
yGroupID
SDK Promotion Calculation Engine
298 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
SaleReturnLineItem POSItemID corresponding to the following
SaleReturnLineItem structure:
SaleReturnLineItem.POSItemID =
ItemBase.MerchandiseHierarchy
SaleReturnLineItem.SubItemType
= "MSTR" (Merchandise Category
Sale)
If the length of the ItemID element in the
request exceeds 32 chars, business error
GKR-100515 is sent back.
Item sale/return: If the length of the
MerchandiseHierarchy element exceeds 30
chars, it is truncated; the request message
can be processed further.
Merchandise category sale/return: If the
length of the MerchandiseHierarchy
element exceeds 30 chars, business error
GKR-100515 is sent back.
ItemBase.MerchandiseHierarchy.ID SaleReturnLineItem MainMerchandiseHierarch
yGroupIDQualifier
If it exceeds 4 chars, it is truncated; the
request message can be processed further.
ItemBase.RegularSalesUnitPrice SaleReturnLineItem ActualUnitPrice It is ensured by the client that this element
is provided for FixedPriceFlag = true and
for the use case with the client being
responsible for price lookup.
ItemBase.RegularSalesUnitPrice.Curr
ency
- -
- SaleReturnLineItem ExtendedAmount SaleReturnLineItem.Quantity *
SaleReturnLineItem.Units *
SaleReturnLineItem.ActualUnitPrice,
rounded according to RoundingRuleType
ItemBase.ExtendedAmount - - As there is no corresponding element in
the DO, this information needs to be
calculated for response as:
SaleReturnLineItem.ExtendedAmount +
SaleReturnLineItem.ExtendedDiscountAmo
unt + ∑(RetailPriceModifier.Amount with
ProrateFrom <> null for the considered line
item)
ItemBase.ExtendedAmount.Currenc
y
- -
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 299
Element/Attribute DO Entity DO Field Rule/Note
ItemBase.ExtendedDiscountAmount - - As there is no corresponding element in
the DO
(SaleReturnLineItem.ExtendedDiscountAm
ount does not fit as it does not
differentiate between discounts and
increasements), this information needs to
be calculated for response as:
absolute value of
∑(RetailPriceModifier.Amount with
ProrateFrom is null and Amount < 0 for the
considered line item)
ItemBase.ExtendedDiscountAmount.
Currency
- -
ItemBase.Quantity SaleReturnLineItem Quantity The DO element does not support decimal
places. In case decimal places are sent in
request, a business error GKR-100500 is
returned.
The DO element does not support multiple
quantities. In case that the Quantity
element occurs more than once, a business
error GKR-100523 is returned.
In case that no Quantity element occurs in
request 1 is used.
ItemBase.Quantity.Units SaleReturnLineItem Units In case that this attribute is missing, 1 is
used.
It must fall into the (11,3) range, otherwise
a business error GKR-100517 is returned.
ItemBase.Quantity.UnitOfMeasureC
ode
SaleReturnLineItem UnitOfMeasureCode If the element is missing in the request,
business error GKR-100530 is sent back.
If the length of the element in the request
exceeds 4 chars, business error GKR-
100515 is sent back.
ItemBase.RetailPriceModifier
ItemBase.ItemLink RetailTransactionLineI
temAssociation
ToLineItemSequenceNum
ber
If it does not fall into the smallint/short
range or is not unique in the context of the
given line item, business error GKR-100538
is sent back. Otherwise, the given value is
taken. It is not checked whether that
sequence number exists within the
transaction.
SDK Promotion Calculation Engine
300 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
RetailTransactionLineI
temAssociation
LineItemSequenceNumber =
RetailTransactionLineItem.RetailTransactio
nLineItemSequenceNumber
RetailTransactionLineI
temAssociation
LineItemAssociationTypeC
ode
= "LINK"
ItemBase.ItemType SaleReturnLineItem ItemType Mapping:
Stock "CO" or "SO" or "PU" (see
above)
GiftCertificate "GC"
any other business error GKR-100529
If this element is not provided in request,
it is considered as "Stock".
Note:
The calculation engine cannot handle
unknown values. If the customer wants to
use other values than those ones mapped
above he has to overwrite the enum
adapter.
ItemBase.NonDiscountableFlag SaleReturnLineItem DiscountFlag Mapping: invert
If this element is not provided in request,
default "false" is used.
ItemBase.FixedPriceFlag - - Affects price lookup only: Price must not
be read again. However, promotions can
be applied on top.
If this element is not provided in request,
default "false" is used.
ItemDomainSpecific.TaxIncludedInPr
iceFlag
- - Does not affect this interface.
ItemDomainSpecific.any - -
ItemDomainSpecific.NonPieceGoodF
lag
SaleReturnLineItem QuantityInputMethod Mapping:
false "01" (piece)
true "06" (quantity with decimal places,
automatic input request)
If this element is not provided in request,
default "false" is used.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 301
Element/Attribute DO Entity DO Field Rule/Note
ItemDomainSpecific.FrequentShopp
erPointsEligibilityFlag
SaleReturnLineItem FrequentShopperPointsEli
gibilityFlag
If this element is not provided in request,
default "false" is used.
ItemDomainSpecific.DiscountTypeC
ode
SaleReturnLineItem DiscountTypeCode If the length of the element in the request
exceeds 1 char, business error GKR-100515
is sent back.
ItemDomainSpecific.PriceTypeCode SaleReturnLineItem PriceTypeCode If the request element does not contain a
value of the enumeration
00
01
business error GKR-100529 is sent back.
If this element is not provided in request,
default "00" is used.
ItemDomainSpecific.NotConsidered
ByPriceEngineFlag
SaleReturnLineItem NotConsideredByLoyaltyE
ngineFlag
If this element is not provided in request,
default "false" is used.
ItemDomainSpecific.FrequentShopp
erPointsModifier
ItemDomainSpecific.PromotionPrice
DerivationRuleReference
ItemDomainSpecific.PromotionMan
ualTrigger
6.2.2.19 RetailPriceModifierDomainSpecific
-> extends RetailPriceModifierBase
Element/Attribute DO Entity DO Field Rule/Note
RetailPriceModifierBase.SequenceNumber RetailPriceModifier RetailPriceModifierSequenceNum
ber
If it does not fall into
the smallint/short
range or is not unique
over all retail price
modifiers of the
current line item,
business error GKR-
100524 is sent back.
PriceModificationLi
neItem
RetailTransactionLineItemSequen
ceNumber
SDK Promotion Calculation Engine
302 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
RetailPriceModifierBase.Amount RetailPriceModifier Amount For Action = "Add" or
"Subtract",
absolute value
PriceModificationLi
neItem
Amount For Action =
"Subtract",
absolute value;
For Action = "Add"
else business error
RetailPriceModifierBase.Amount.Action RetailPriceModifier AdjustmentMethodCode Mapping:
Add "IC"
Subtract "DC"
Replace
n.a. -
business
error
For
n.a. -
business
error
any
other
business
error GKR-
100529
PriceModificationLi
neItem
- Only Action =
"Subtract" is
supported in that
context.
RetailPriceModifierBase.Amount.Currency - -
RetailPriceModifierBase.Percent RetailPriceModifier Percent For Action = "Add" or
"Subtract"
If it contains more
than 4 decimal places,
business error GKR-
100517 is sent back.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 303
Element/Attribute DO Entity DO Field Rule/Note
PriceModificationLi
neItem
Percentage For Action =
"Subtract";
For Action = "Add"
else business error
If it contains more
than 4 decimal places,
business error GKR-
100517 is sent back.
RetailPriceModifierBase.Percent.Action RetailPriceModifier AdjustmentMethodCode Mapping:
Add "IC"
Subtract "DC"
Replace
n.a. -
business
error
For
n.a. -
business
error
any
other
business
error GKR-
100529
PriceModificationLi
neItem
- Only Action =
"Subtract" is
supported in that
context.
RetailPriceModifierBase.PreviousPrice RetailPriceModifier ExtendedAmountBeforeModificat
ion
PriceModificationLi
neItem
ExtendedAmountBeforeModificat
ion
RetailPriceModifierBase.PreviousPrice.Currency - -
RetailPriceModifierBase.NewPrice RetailPriceModifier ExtendedAmountAfterModificatio
n
PriceModificationLi
neItem
ExtendedAmountAfterModificatio
n
RetailPriceModifierBase.NewPrice.Currency - -
SDK Promotion Calculation Engine
304 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
RetailPriceModifierBase.PromotionID See
PriceDerivationRuleBa
se.
RetailPriceModifierBase.ItemLink RetailPriceModifier ProrateFrom If it does not fall into
the smallint/short
range business error
GKR-100516 is sent
back. If multiple
ItemLink elements
occur in the request
only the first one is
processed.
PriceModificationLi
neItem
-
RetailPriceModifierBase.Quantity RetailPriceModifier AppliedQuantity Regarding to the
request:
Maximum length is 11
including 3 decimal
places, if it is
exceeded the request
cannot be processed -
business error GKR-
100517.
If it is missing for a
RetailPriceModifier
being not prorated
from a Discount
business error GKR-
100519 is sent back.
Regarding to the
response:
In case of prorated
RetailPriceModifier
which was generated
by the calculation
engine, this element
should not be
provided in response.
PriceModificationLi
neItem
-
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 305
Element/Attribute DO Entity DO Field Rule/Note
RetailPriceModifierBase.Rounding RetailPriceModifier RoundingAmount Absolute value
If the request contains
a negative value
business error GKR-
100540 is sent back.
PriceModificationLi
neItem
RoundingAmount Absolute value
If the request contains
a negative value
business error GKR-
100540 is sent back.
RetailPriceModifierBase.Rounding.Currency - -
RetailPriceModifierBase.Rounding.RoundingDirectio
n
- - (RetailPriceModifier)
if
RoundingA
mount <
0.0: Down
if
RoundingA
mount >
0.0: Up
else: no
RoundingDir
ection
attribute
If the request contains
a value not being part
of the enumeration
(Up, Down) business
error GKR-100539 is
sent back.
SDK Promotion Calculation Engine
306 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
- - (PriceModificationLin
eItem)
if
RoundingA
mount <
0.0: Down
if
RoundingA
mount >
0.0: Up
else: no
RoundingDir
ection
attribute
If the request contains
a value not being part
of the enumeration
(Up, Down) business
error GKR-100539 is
sent back.
RetailPriceModifierDomainSpecific.PriceDerivationR
ule
If more than one
PriceDerivationRule
element is sent in
request business error
GKR-100519 is sent
back.
any - -
RetailPriceModifierDomainSpecific.ManualTriggerSe
quenceNumber
RetailPriceModifier TriggerSequenceNumber If it does not fall into
the smallint/short
range business error
GKR-100516 is sent
back.
PriceModificationLi
neItem
TriggerSequenceNumber
RetailPriceModifierDomainSpecific.ExtraAmount RetailPriceModifier ExtraAmount Absolute value
If the request contains
a negative value
business error GKR-
100541 is sent back.
PriceModificationLi
neItem
ExtraAmount Absolute value
If the request contains
a negative value
business error GKR-
100541 is sent back.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 307
Element/Attribute DO Entity DO Field Rule/Note
RetailPriceModifierDomainSpecific.ExtraAmount.Cu
rrency
- -
RetailPriceModifierDomainSpecific.ExternalSystemO
riginatorFlag
RetailPriceModifier ExternalSystemOriginatorFlag If the element is
missing in the
request, "false" is to
be used.
PriceModificationLi
neItem
ExternalSystemOriginatorFlag
6.2.2.20 LoyaltyRewardBase
Element/Attribute DO Entity DO Field Rule/Note
PromotionID See
PriceDerivationRuleBase
.
PointsAwarded LoyaltyRewardLineItem PointsAwardedCount Maximum length is 11
including 3 decimal
places, if it is exceeded a
business error GKR-
100517 is sent back.
FrequentShopperPointsModifie
r
FrequentShopperPointsEarnedCount
PointsAwarded.Type - - Fix "PointsEarned"
ManualTriggerSequenceNumber LoyaltyRewardLineItem TriggerSequenceNumber If it does not fall into the
smallint/short range
business error GKR-
100516 is sent back.
FrequentShopperPointsModifie
r
TriggerSequenceNumber
PointsAwardedAmount LoyaltyRewardLineItem FrequentShopperPointsEarnedAmoun
t
FrequentShopperPointsModifie
r
FrequentShopperPointsEarnedAmoun
t
PointsAwardedAmount.Currency - -
ComputationBaseAmount LoyaltyRewardLineItem ComputationBaseAmount
FrequentShopperPointsModifie
r
ComputationBaseAmount
ComputationBaseAmount.Currenc
y
- -
SDK Promotion Calculation Engine
308 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
ExternalSystemOriginatorFlag LoyaltyRewardLineItem ExternalSystemOriginatorFlag
FrequentShopperPointsModifie
r
ExternalSystemOriginatorFlag
PriceDerivationRule If more than one
PriceDerivationRule
element is sent in
request business error
GKR-100519 is sent
back.
any - -
TypeCode - - If the request element
does not contain a value
of the enumeration
Award
business error GKR-
100529 is sent back.
6.2.2.21 PriceDerivationRuleBase
In case of prorated RetailPriceModifier or prorated FrequentShopperPointsModifier which were generated
by the Pricing Engine, this element should not be provided in response.
Element/Attribute DO Entity DO Field Rule/Note
- RetailTransactionPromoti
onPriceDerivationRule
TransactionID = Transaction.TransactionID
RetailPriceModifierBase.Pro
motionID
RetailTransactionPromoti
onPriceDerivationRule
PromotionID SAP uses decimal(19,0) internally.
If it is not provided in the request, an
internal negative identifier is generated.
Note: Generated IDs of promotions are
negative in order to avoid collisions with
existing internal ones. Generated IDs are
kept in response mapping. They can be
detected by their negative sign.
LoyaltyRewardBase.Promoti
onID
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 309
Element/Attribute DO Entity DO Field Rule/Note
PriceDerivationRuleID RetailTransactionPromoti
onPriceDerivationRule
PriceDerivationRuleID The PriceDerivationRuleID element of the
request is converted into longint. Even in
case of failure, the request message can be
processed further - an internal negative
identifier is generated in that case.
Note: This generated value will be
responded back instead of the wrong
request value.
Entry in
RetailTransactionPromotionPriceDerivationR
ule is created only if the combination
TransactionID + PriceDerivationRuleID does
not exist yet.
- RetailTransactionPromoti
onPriceDerivationRule
PriceDerivationRuleEligibility
ID
When mapping the request, a negative value
is generated as this information is not
included in it.
Note: Generated IDs of price derivation rule
eligibilities are negative in order to avoid
collisions with existing internal ones.
- RetailPriceModifier PriceDerivationRuleID =
RetailTransactionPromotionPriceDerivationR
ule.PriceDerivationRuleID FrequentShopperPointsM
odifier
PriceDerivationRuleID
PriceModificationLineItem PriceDerivationRuleID
LoyaltyRewardLineItem PriceDerivationRuleID
- RetailPriceModifier PromotionID =
RetailTransactionPromotionPriceDerivationR
ule.PromotionID FrequentShopperPointsM
odifier
PromotionID
PriceModificationLineItem PromotionID
LoyaltyRewardLineItem PromotionID
- RetailPriceModifier PriceDerivationRuleEligibility
ID
=
RetailTransactionPromotionPriceDerivationR
ule.PriceDerivationRuleEligibilityID FrequentShopperPointsM
odifier
PriceDerivationRuleEligibility
ID
PriceModificationLineItem PriceDerivationRuleEligibility
ID
SDK Promotion Calculation Engine
310 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
LoyaltyRewardLineItem PriceDerivationRuleEligibility
ID
Eligibility
any - -
PromotionDescription RetailTransactionPromoti
onPriceDerivationRule
PromotionDescription If it exceeds 255 chars, it is truncated; the
request message can be processed further.
PromotionPriceDerivationRu
leSequence
RetailTransactionPromoti
onPriceDerivationRule
PromotionPriceDerivationRu
leSequence
If the element is not provided in request 0 is
taken as default.
PromotionPriceDerivationRu
leResolution
RetailTransactionPromoti
onPriceDerivationRule
PromotionPriceDerivationRu
leResolution
If the element is not provided in request 0 is
taken as default.
PromotionPriceDerivationRu
leTypeCode
RetailTransactionPromoti
onPriceDerivationRule
PromotionPriceDerivationRu
leTypeCode
If it exceeds 4 chars, it is truncated; the
request message can be processed further.
TransactionControlBreakCod
e
RetailTransactionPromoti
onPriceDerivationRule
TransactionControlBreakCod
e
If the request element does not contain a
value of the enumeration
PO
PC
SP
SU
business error GKR-100529 is sent back.
If the request element is missing at all "SU"
is taken as default.
PriceDerivationRuleDescripti
on
RetailTransactionPromoti
onPriceDerivationRule
PriceDerivationRuleDescripti
on
If it exceeds 255 chars, it is truncated; the
request message can be processed further.
PromotionOriginatorTypeCo
de
RetailTransactionPromoti
onPriceDerivationRule
PromotionOriginatorTypeCo
de
If it exceeds 2 chars, it is truncated; the
request message can be processed further.
TriggerQuantity RetailTransactionPromoti
onPriceDerivationRule
TriggerQuantity Maximum length is 11 including 3 decimal
places, if the value is bigger the request
cannot be processed and business error
GKR-100517 is sent back.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 311
Element/Attribute DO Entity DO Field Rule/Note
DiscountMethodCode RetailTransactionPromoti
onPriceDerivationRule
DiscountMethodCode If the request element does not contain a
value of the enumeration
00
01
02
03
04
business error GKR-100529 is sent back.
If the request element is missing at all, "00"
is taken as default.
FrequentShopperPointsFlag RetailTransactionPromoti
onPriceDerivationRule
FrequentShopperPointsFlag If the request element is missing at all,
"false" is taken as default.
CustomerGroupLoyaltyPoint
sDefaultQuantity
RetailTransactionPromoti
onPriceDerivationRule
CustomerGroupLoyaltyPoint
sDefaultQuantity
Maximum length is 11 including 3 decimal
places, if the value is bigger the request
cannot be processed and business error
GKR-100517 is sent back.
ProhibitPrintFlag RetailTransactionPromoti
onPriceDerivationRule
ProhibitPrintFlag If the request element is missing at all,
"false" is taken as default.
TenderTypeCode RetailTransactionPromoti
onPriceDerivationRule
TenderTypeCode If the length of the element in the request
exceeds 4 chars, business error GKR-100515
is sent back.
PointsConversionAmount RetailTransactionPromoti
onPriceDerivationRule
PointsConversionAmount
PointsConversionAmount.Cu
rrency
- -
NoEffectOnSubsequentPrice
DerivationRulesFlag
RetailTransactionPromoti
onPriceDerivationRule
NoEffectOnSubsequentPrice
DerivationRulesFlag
If the request element is missing at all,
"false" is taken as default.
ProhibitTransactionRelatedP
riceDerivationRulesFlag
RetailTransactionPromoti
onPriceDerivationRule
ProhibitTransactionRelatedP
riceDerivationRulesFlag
If the request element is missing at all,
"false" is taken as default.
ExclusiveFlag RetailTransactionPromoti
onPriceDerivationRule
ExclusiveFlag If the request element is missing at all,
"false" is taken as default.
ConcurrenceControlVector RetailTransactionPromoti
onPriceDerivationRule
ConcurrenceControlVector If the length of the element in the request
exceeds 20 chars, business error GKR-
100515 is sent back.
AppliedCount RetailTransactionPromoti
onPriceDerivationRule
AppliedCount Maximum length is 3 including no decimal
places, if the value does not fit with this
limitation the request cannot be processed.
SDK Promotion Calculation Engine
312 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
ReceiptLine RetailTransactionPromoti
onPriceDerivationRule
ReceiptPrinterName If it exceeds 40 chars, it is truncated; the
request message can be processed further.
ExternalPromotionID RetailTransactionPromoti
onPriceDerivationRule
ExternalPromotionID If it exceeds 255 chars, it is truncated; the
request message can be processed further.
ExternalPriceDerivationRuleI
D
RetailTransactionPromoti
onPriceDerivationRule
ExternalPriceDerivationRuleI
D
If it exceeds 255 chars, it is truncated; the
request message can be processed further.
GiftCertificateExpirationDate RetailTransactionPromoti
onPriceDerivationRule
GiftCertificateExpirationDate
CouponPrintoutID RetailTransactionPromoti
onPriceDerivationRule
CouponPrintoutID If it exceeds 40 chars, it is truncated; the
request message can be processed further.
CouponPrintoutRule RetailTransactionPromoti
onPriceDerivationRule
CouponPrintoutRule For DiscountMethodCode = 04 only:
If the request element does not contain a
value of the enumeration
00
01
business error GKR-100529 is sent back.
If the request element is missing at all, "00"
is taken as default.
CouponPrintoutText RetailTransactionPromoti
onPriceDerivationRule
CouponPrintoutText
PrintoutValidityPeriod RetailTransactionPromoti
onPriceDerivationRule
PrintoutValidityPeriod Maximum length is 3 including no decimal
places, if the value does not fit with this
limitation it is truncated; the request
message can be processed further. If the
value is not provided at all, for
DiscountMethodCode = 04 default 0 is
chosen.
ExternalAction
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 313
Element/Attribute DO Entity DO Field Rule/Note
ApplicationType RetailTransactionPromoti
onPriceDerivationRule
PriceModificationMethodCo
de
Mapping:
Manual "RM"
Item n.a. - business error
MixMatch "MM"
FixPrice "PS"
PromotionalAward n.a. - business error
BuyOneGetOne "GP"
None "NO"
DiscountSingle "RS"
DiscountPercent "RP"
DiscountTotal "RT"
FixPriceTotal "PT"
DiscountPercentTotal "TP"
DiscountPercentTotal2 "T2"
DiscountTotalInterval n.a. - business error
ExternalAction "EX"
any other business error GKR-
100529
Note:
The calculation engine cannot handle
unknown values. If the customer wants to
use other values than those ones mapped
above, he has to overwrite the enum
adapter.
SDK Promotion Calculation Engine
314 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
6.2.2.22 PriceDerivationRuleEligibility
Element/Attribute DO Entity DO Field Rule/Note
- SaleReturnLineItemModifi
erCoupon
PromotionID =
RetailTransactionPromotionPriceDerivationRule.Promotion
ID RetailTransactionModifier
Coupon
- SaleReturnLineItemModifi
erCoupon
PriceDerivationRuleID =
RetailTransactionPromotionPriceDerivationRule.PriceDeriv
ationRuleID RetailTransactionModifier
Coupon
- SaleReturnLineItemModifi
erCoupon
PriceDerivationRuleEli
gibilityID
=
RetailTransactionPromotionPriceDerivationRule.PriceDeriv
ationRuleEligibilityID RetailTransactionModifier
Coupon
ReferenceID SaleReturnLineItemModifi
erCoupon
CouponNumber Multiple coupons = multiple eligibilities
If the length of the element in the request exceeds 40
chars, business error GKR-100515 is sent back. If the
element in the request is missing, business error GKR-
100519 is sent back.
RetailTransactionModifier
Coupon
any - -
ReferenceSequence
Number
SaleReturnLineItemModifi
erCoupon
CouponSequenceNum
ber
If it does not fall into the smallint/short range business
error GKR-100516 is sent back. If the element in the
request is missing, business error GKR-100519 is sent back. RetailTransactionModifier
Coupon
Type RetailPriceModifier EligibilityTypeCode Mapping in request:
StoreCoupon "COUP"
any other value business error
In response: fix StoreCoupon
Note:
The calculation engine cannot handle unknown values. If
the customer wants to use other values than this one
mapped above he has to overwrite the enum adapter.
FrequentShopperPointsM
odifier
EligibilityTypeCode
PriceModificationLineItem -
LoyaltyRewardLineItem -
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 315
6.2.2.23 ExternalActionType
Element/Attribute DO Entity DO Field Rule/Note
ID RetailTransactionPromotionPriceDerivationRule ExternalActionID If the length of the element in the request
exceeds 60 chars, business error GKR-100515
is sent back. If the element in the request is
missing, business error GKR-100519 is sent
back.
Text
Parameter
any - -
6.2.2.24 ExternalActionTextType
Element/Attr
ibute DO Entity DO Field Rule/Note
- RetailTransactionPromotionExtern
alActionText
PromotionID =
RetailTransactionPromotionPriceDerivationRule.Promotio
nID
- RetailTransactionPromotionExtern
alActionText
PriceDerivationRuleID =
RetailTransactionPromotionPriceDerivationRule.PriceDeri
vationRuleID
- RetailTransactionPromotionExtern
alActionText
PriceDerivationRuleEli
gibilityID
=
RetailTransactionPromotionPriceDerivationRule.PriceDeri
vationRuleEligibilityID
(the content
of the
element
itself)
RetailTransactionPromotionExtern
alActionText
Text If the length of the element in the request exceeds 255
chars, business error GKR-100515 is sent back. If the
element in the request is empty, business error GKR-
100519 is sent back.
ID RetailTransactionPromotionExtern
alActionText
TextID If the length of the element in the request exceeds 60
chars, business error GKR-100515 is sent back. If the
element in the request is missing, business error GKR-
100519 is sent back. It must be unique in the context of
the current external action (applied price derivation rule),
otherwise business error GKR-100534 is sent back.
SDK Promotion Calculation Engine
316 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
6.2.2.25 ExternalActionParameterType
Element/Att
ribute DO Entity DO Field Rule/Note
- RetailTransactionPromotionExternalA
ctionParameter
PromotionID =
RetailTransactionPromotionPriceDerivationRule.Promoti
onID
- RetailTransactionPromotionExternalA
ctionParameter
PriceDerivationRuleID =
RetailTransactionPromotionPriceDerivationRule.PriceDe
rivationRuleID
- RetailTransactionPromotionExternalA
ctionParameter
PriceDerivationRuleEl
igibilityID
=
RetailTransactionPromotionPriceDerivationRule.PriceDe
rivationRuleEligibilityID
(the content
of the
element
itself)
RetailTransactionPromotionExternalA
ctionParameter
ParameterValue If the length of the element in the request exceeds 255
chars, business error GKR-100515 is sent back. If the
element in the request is is empty, business error GKR-
100519 is sent back.
ID RetailTransactionPromotionExternalA
ctionParameter
ParameterID If the length of the element in the request exceeds 60
chars, business error GKR-100515 is sent back. If the
element in the request is missing, business error GKR-
100519 is sent back. It must be unique in the context of
the current external action (applied price derivation
rule), otherwise business error GKR-100535 is sent back.
6.2.2.26 FrequentShopperPointsModifierType
-> extends LoyaltyRewardBase
Element/Attribut
e DO Entity DO Field Rule/Note
SequenceNumbe
r
FrequentShopperPointsModifi
er
FrequentShopperPointsModifierSequenceNumb
er
It must fall into the
smallint/short range,
otherwise business error GKR-
100516 is sent back. It must be
unique in the context of the
current line item, otherwise
business error GKR-100527 is
sent back.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 317
Element/Attribut
e DO Entity DO Field Rule/Note
AppliedQuantity FrequentShopperPointsModifi
er
AppliedQuantity Regarding to the request:
Maximum length is 11
including 3 decimal places, if it
is exceeded business error
GKR-100517 is sent back. If it is
missing for a
FrequentShopperPointsModifi
er being not prorated from a
LoyaltyReward business error
GKR-100519 is sent back.
Regarding to the response:
In case of prorated
FrequentShopperPointsModifi
er which was generated by the
calculation engine, this
element should not be
provided in response.
ItemLink FrequentShopperPointsModifi
er
ProrateFrom It must fall into the
smallint/short range,
otherwise business error GKR-
100516 is sent back. If multiple
ItemLink elements occur in the
request only the first one is
processed.
6.2.2.27 PromotionPriceDerivationRuleReferenceType
Element/Attribute DO Entity DO Field Rule/Note
PromotionID SaleReturnLineItemModifierRef
erence
PromotionID =
RetailTransactionPromotionPriceDerivationRule.PromotionI
D
PriceDerivationRul
eID
SaleReturnLineItemModifierRef
erence
PriceDerivationRul
eID
=
RetailTransactionPromotionPriceDerivationRule.PriceDeriv
ationRuleID
ReferenceQuantit
y
SaleReturnLineItemModifierRef
erence
ReferenceQuantit
y
Maximum length is 11 including 3 decimal places, if it is
exceeded business error GKR-100517 is sent back.
any - -
SDK Promotion Calculation Engine
318 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
6.2.2.28 PromotionManualTriggerType
Contains manual triggers which were created by the client in order to make the transaction resp. line item
eligible for promotions containing eligibilities of type "manual trigger".
Element/Attribute DO Entity DO Field Rule/Note
ManualTriggerSequenceNumber RetailTransactionPromotionTrigger TriggerSequenceNumber It must fall into the smallint/short
range, otherwise business error
GKR-100516 is sent back. It must
be unique in the context of the
current line item (for line item
related-manual triggers) resp. the
transaction (for transaction-
related manual triggers),
otherwise business error GKR-
100528 is sent back.
SaleReturnLineItemPromotionTrigger TriggerSequenceNumber
ManualTriggerType RetailTransactionPromotionTrigger TriggerType If the length of the element in the
request exceeds 2 chars, business
error GKR-100515 is sent back. SaleReturnLineItemPromotionTrigger TriggerType
ManualTriggerValue RetailTransactionPromotionTrigger TriggerValue If the length of the element in the
request exceeds 255 chars,
business error GKR-100515 is sent
back.
SaleReturnLineItemPromotionTrigger TriggerValue
PrivilegeType RetailTransactionPromotionTrigger PrivilegeType
SaleReturnLineItemPromotionTrigger PrivilegeType
PrivilegeValue RetailTransactionPromotionTrigger PrivilegeValue
SaleReturnLineItemPromotionTrigger PrivilegeValue
PrivilegeValue.Currency - -
ManualTriggerSequenceAddend RetailTransactionPromotionTrigger TriggerSequenceAddend
SaleReturnLineItemPromotionTrigger TriggerSequenceAddend
any - -
6.2.2.29 PromotionExternalTriggerType
Element/Attribute DO Entity DO Field Rule/Note
ExternalTriggerType RetailTransactionExternalTrigger TriggerTypeCode
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 319
Element/Attribute DO Entity DO Field Rule/Note
ExternalTriggerAmount RetailTransactionExternalTrigger TriggerAmount
ExternalTriggerAmount.Currency - -
any - -
6.2.2.30 DiscountBase
-> extends RetailPriceModifierDomainSpecific
Element/Attribute DO
Entity
DO
Field Rule/Note
ProratedFlag Fix true, i.e.:
If the attribute is not provided in request, this means "true". If "false" is provided in request,
business error GKR-100519 is sent back. In the response, "true" is used always.
6.2.2.31 TenderCouponBase
Element/Attribute DO Entity DO Field Rule/Note
Quantity RetailTransactionCouponSummary InputCount Maximum length is 3 including no decimal places, if it is
exceeded business error GKR-100517 is sent back.
If the attribute is missing in the request, it is to be set to 1.
PrimaryLabel RetailTransactionCouponSummary CouponNumber If the length of the element in the request exceeds 40 chars,
business error GKR-100515 is sent back. If it is not provided
in the request at all or if it is not unique (i.e. if the same
coupon number is used in multiple coupon line items)
business error GKR-100526 is sent back.
RewardValue RetailTransactionCouponSummary PrivilegeValue If RewardValue exists, but RewardType does not exist or is
not valid, business error GKR-100531 is sent back.
If RewardValue does not exist, but RewardType is valid,
business error GKR-100532 is sent back.
any - -
AppliedQuantity RetailTransactionCouponSummary AppliedCount Maximum length is 3 including no decimal places, if it is
exceeded business error GKR-100516 is sent back. If the
attribute is missing in the request, it is to be set to 0.
SDK Promotion Calculation Engine
320 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Element/Attribute DO Entity DO Field Rule/Note
RewardType RetailTransactionCouponSummary PrivilegeType If the request element exists, but does not contain a value of
the enumeration
RP - reduction percentage
RS - reduction amount
PS - new price amount
business error GKR-100529 is sent back.
6.2.2.32 RoundingRuleType
This information is used for rounding the RegularSalesUnitPrice of the line items in the shopping basket.
Only those items with FixedPriceFlag = false are subject to rounding. Rounding of them is done in a second
step after the mapping.
Furthermore, this information is used for rounding the SaleReturnLineItem.ExtendedAmount at all its
occurrences.
Element/Attribute DO
Entity
DO
Field Rule/Note
any - -
RoundingMethod - - If the attribute exists but does not contain a value of the enumeration
Up
Down
Commercial
business error GKR-100536 is sent back.
If the attribute is missing in the request, Commercial is used.
Multiple - - If the attribute exists but does not contain a valid value (valid means that the digit sequence must
consist of 0..* zeroes + either one digit "1" or one digit "5" + 0..* zeroes, a decimal point may
occur) business error GKR-100537 is sent back.
If the attribute is missing in the request, 0.01 is used.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 321
7 Glossary
7.1 Introduction
The glossary is intended to support understanding of the main terms used in this documentation.
7.2 Glossary
Term Definition
ARTS The Association for of Retail Technology Standards (ARTS) is an organization providing application standards and
guidance to the retail industry.
Business Error Feedback regarding problems caused by the data sent in with the request. Currently, only errors caused by wrong
or missing data in the request are supported.
Calculation Rule Describes the benefit to be granted to the customer in case that the condition is applied.
Condition A condition can be understood as a single action granting a benefit to the customer. It consists of a set of triggers
(eligibilities), time validity, and a rule describing the benefit. Multiple conditions can belong to a promotion.
Context Holds the complete state for transaction processing and promotion calculation.
Domain (Object)
Model
Conceptual model of a problem or business domain.
Eligibility Precondition which has to be fulfilled in order to apply the condition. An eligibility triggers a condition.
Extension Map Possibility to define references to external data structures for the objects of a transaction.
Loyalty Engine The core of the Promotion Calculation Engine. The Loyalty Engine passes the request from the application,
performs the price determination and returns the result.
Pricing Service
Interface (PSI)
Standard interface schema provided by ARTS for integrating a pricing service with a price requesting or selling
system.
Promotion Functional mapping of a campaign granting a benefit to the customer. A promotion consists of one or more
conditions.
Request Message that contains common information pieces which are needed in order to process the message: A
shopping basket with multiple line items and other information being relevant for the calculation of the benefits
for the shopping basket.
The request is provided via the client API.
SDK Promotion Calculation Engine
322 © 2016 SAP SE or an SAP affiliate company. All rights reserved. Content
Term Definition
Response Responding message regarding to the request sent in. This can be the updated shopping basket including
calculated discounts and bonus points as well as information about used promotion master data and applied
coupons, or an error information in case that the request could not be processed.
Technical Error Error due to technical problems which prevents the calculation to be fulfilled (for example, a database
exception).
Transaction The shopping basket with line item data and other information relevant for price calculation.
SDK Promotion Calculation Engine
Content © 2016 SAP SE or an SAP affiliate company. All rights reserved. 323
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 for
any 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 their
respective logos are trademarks or registered trademarks of SAP SE (or an SAP
affiliate company) in Germany and other countries. All other product and service
names mentioned are the trademarks of their respective companies. Please see
http://www. sap.com/corporate-en/legal/copyright/index.epx#trademark for
additional trademark information and notices.
Material Number: