Broadleaf Microservices
  • v1.0.0-latest-prod

Offer Services Configuration Properties

Audit Verfication

Table 1. Configuration properties for controlling which audit checks run for the various flows.
Name Description Default

broadleaf.offer.audit.verification.audit-verification-map

Audit verification properties provide a mechanism for controlling when the audit checks are performed. For more details, see AuditVerificationFlags.java.

By default, audit checks are disabled while running the applyOffer and marketing message endpoints but on during the endpoints that retrieve and validateOfferUsage endpoints.

Caching

Table 2. Properties that influence cache settings for the offer service.
Name Description Default

broadleaf.offer.cache.offer-by-automatic

TTL when caching offers by whether they should be applied automatically.

5 minutes

broadleaf.offer.cache.campaign-by-ids

TTL for caching campaigns by their IDs.

5 minutes

broadleaf.offer.cache.offer-by-ids

TTL for caching offers by their IDs.

5 minutes

broadleaf.offer.cache.offer-by-user-targets

TTL for caching offers by their user target.

5 minutes

broadleaf.offer.cache.offer-by-tracking

TTL for caching offers by their tracking IDs.

5 minutes

broadleaf.offer.cache.offer-code-by-codes

TTL for caching offer codes by their code strings.

5 minutes

broadleaf.offer.cache.full-code-cache-enabled

Whether or not full offer code cache compilation should be performed.

false

broadleaf.offer.cache.full-code-cache-blocking

Whether or not full code cache compilation should block the current request.

Default is false, in which case the cache compilation occurs on a new thread.

broadleaf.offer.cache.full-offer-cache-enabled

Whether or not full offer cache compilation should be performed.

false

broadleaf.offer.cache.full-offer-cache-blocking

Whether or not full offer cache compilation should block the current request.

Default is false, in which case the cache compilation occurs on a new thread.

broadleaf.offer.cache.full-code-cache-limit

The max number of offer codes to allow into memory when performing full cache load. Requires broadleaf.offer.cache.full-code-cache-enabled be true.

20000

broadleaf.offer.cache.full-offer-cache-limit

The max number of offers to allow into memory when performing full cache load. Requires broadleaf.offer.cache.full-offer-cache-enabled be true.

2000

broadleaf.offer.cache.full-cache-batch-fetch-size

The number of items to fetch in batch at a time.

50

broadleaf.offer.cache.full-offer-by-automatic-threshold

Amount of time between full offer cache compilation operations. Usually smaller than broadleaf.offer.cache.offer-by-automatic. Only used when broadleaf.offer.cache.full-offer-cache-enabled is true.

4 minutes

broadleaf.offer.cache.full-offer-code-by-codes-threshold

Amount of time between full offer code cache compilation operations. Usually smaller than broadleaf.offer.cache.offer-code-by-codes. Only used when broadleaf.offer.cache.full-code-cache-enabled is true.

4 minutes

broadleaf.offer.cache.full-code-cache-type

Restrict full offer code caching based on activity status. Possible values are ALL, ACTIVE_ONLY, RANGE.

ACTIVE_ONLY

broadleaf.offer.cache.prior-code-active-buffer-range

Amount of time in the past to include codes that were active. Applies when broadleaf.offer.cache.full-code-cache-type is set to RANGE.

30 days in minutes

broadleaf.offer.cache.future-code-active-buffer-range

Amount of time in the future to include codes that will be active. Applies when broadleaf.offer.cache.full-code-cache-type is set to RANGE.

30 days in minutes

broadleaf.offer.cache.full-offer-cache-type

Restrict full offer caching based on activity status. Possible values are ALL, ACTIVE_ONLY, RANGE.

ACTIVE_ONLY

broadleaf.offer.cache.prior-offer-active-buffer-range

Amount of time in the past to include offers that were active. Applies when broadleaf.offer.cache.full-offer-cache-type is set to RANGE.

30 days in minutes

broadleaf.offer.cache.future-offer-active-buffer-range

Amount of time in the future to include offers that will be active. Applies when broadleaf.offer.cache.full-offer-cache-type is set to RANGE.

30 days in minutes

Cache Invalidation

Table 3. Properties that influence cache invalidation message settings for the offer service.
Name Description Default

broadleaf.offer.cache.invalidation.active

Whether or not to enable the cache invalidation messaging flow in offer services.

false

broadleaf.offer.cache.invalidation.offer-cache-invalidation-message-send-delay

Amount of time to delay the sending of the offer cache invalidation message.

0 minutes

broadleaf.offer.cache.invalidation.offer-code-cache-invalidation-message-send-delay

Amount of time to delay the sending of the offer code cache invalidation message.

0 minutes

broadleaf.offer.cache.invalidation.notification.*

See com.broadleafcommerce.common.messaging.notification.NotificationProperties for the full list of options.

broadleaf.offer.cache.invalidation.retry.*

Campaign Code Generation

Table 4. Configuration properties for special behavior on campaign code generation.
Name Description Default

broadleaf.campaign.code-generation.batch-size

Batch size for non-voucher campaign code generation.

1000

broadleaf.campaign.code-generation.voucher.batch-size

Batch size for campaign code generation for vouchers.

10

Messaging

Table 5. Properties related to Spring Cloud messaging.
Name Description Default

broadleaf.offer.messaging.use-customer-email-as-user-target-value

When recording OfferAuditDetails, whether to use customer’s email on the order as the UserTarget#getTargetValue(). Default is to use the customer’s ID, which would be null for guest customers.

false

broadleaf.offer.messaging.error-if-max-exceeded

When recording OfferAuditDetails, the system will record an overage of an offer used when this property is set to false. This is recommended for highest performance at the expense of potential small windows of offers being used above the max thresholds.

false

Offer Discount Rounding

Table 6. Properties related to offer rounding behaviors.
Name Description Default

broadleaf.offer.service.distribute-rounded-remainders

When rounding list of MonetaryAmounts, whether to distribute the rounded remainders across given MonetaryAmounts.

For example, rounding 7 of $0.71428 with the total of $5 would result in 4 of $0.71 and 3 of $0.72. If set to false, the remainders would be added to one single amount, resulting 6 of $0.71 and 1 of $0.74.

true

broadleaf.offer.service.order-offer-rounding.rounding-mode

The RoundingMode to use for rounding order typed offer discounts

RoundingMode.HALF_EVEN

broadleaf.offer.service.order-offer-rounding.round-discounts-by-item-unit

Whether to round the offer discounts at the item unit level instead of the order level for order typed offers.

For example, if we have an order with an item that is $99.99 and has a quantity of 3 with applied offer of 20% off order, then the 20% off discount would be rounded at the item unit level. That is, $99.99 x 20% = $19.998, after rounding it would be $20 discount per item unit, then $20 x quantity of 3, then the order’s total discount would be $60.

Whereas if rounding is done at the order level, it’d be $99.99 x 3 x 20% = $59.994, and after rounding the order’s total discount would be $59.99.

false

broadleaf.offer.service.order-item-offer-rounding.round-offer-values

Whether to round order item typed offer discounts

false

broadleaf.offer.service.order-item-offer-rounding.rounding-mode

The RoundingMode to use for rounding order item typed offer discounts

RoundingMode.HALF_EVEN

Offer Validation Properties

Name Description Default

broadleaf.offer.service.validate-offer-has-currency

Whether validations to ensure that Offer#currency is specified if any of its MonetaryAmount fields are defined, such as Offer#cartSubtotal, Offer#maxSavingsPerOrder, etc.

false

Offer Internal Configuration Properties

Name Description Default

broadleaf.offer.service.always-record-customer-detail-audit

Whether or not to record every usage of offers in the audit details table.

false

broadleaf.offer.service.fulfillment-items-included-on-request

Whether or not fulfillment items will be included on the EnhancedOrder request into the offer engine.

false

Service Properties

Property Description

broadleaf.offer.jpa.*

JPA Configuration Properties. See com.broadleafcommerce.common.jpa.data.JpaProperties for full list of options.

broadleaf.offer.datasource.*

Datasource Configuration Properties. See org.springframework.boot.autoconfigure.jdbc.DataSourceProperties for full list of options.

broadleaf.offer.liquibase.*

Liquibase Configuration Properties. See org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties for full list of options.

broadleaf.offer.delegating.*

Delegating Schema Configuration Properties for running in a composed mode along side other Broadleaf microservices. See com.broadleafcommerce.common.jpa.data.SchemaDelegatingProperties for full list of options.

Metadata Properties

Property Description

broadleaf.offer.metadata.offer-templates.enabled

Controls whether the Offer forms use Offer Template types to drive the UI with fewer individual flags to toggle rather than the previous, granular approach. Enabled by Default. This is only intended to be disabled to assist in migrating any Offer Metadata customizations and should be enabled as soon as possible for anyone upgrading to Offer Service 3.1.0.