Broadleaf Microservices
  • v1.0.0-latest-prod

Campaign Provider

Overview

Provider for interfacing with Campaigns. Cart Operations cares about Campaigns because they can have associated promotions or benefits that affect pricing calculations. It is primarily concerned with determining whether codes applied to a cart belong to a Campaign and are usable.

Tip
Campaign Services has a checkout completion message listener (RecordCampaignCodeUsageEventListener) that handles recording CampaignCode usages after checkout.

Default Implementation Details

The default implementation (ExternalCampaignProvider) facilitates HTTP requests against the Campaign Services' CampaignCodeAuditDetailEndpoint.

Configuration

ExternalCampaignProperties defines the properties used to configure ExternalCampaignProvider. These include:

  • broadleaf.cartoperation.campaignprovider.url: The base URL for the external campaign service

  • broadleaf.cartoperation.campaignprovider.campaignAuditDetailsUri: The context path for the CampaignCodeAuditDetailEndpoint or equivalent

  • broadleaf.cartoperation.campaignprovider.usabilityInfoUri: The context path for the specific endpoint of CampaignCodeAuditDetailEndpoint that provides information on whether a CampaignCode is usable and which Campaign(s) it is associated with

  • broadleaf.cartoperation.campaignprovider.validateUri: The context path for the specific endpoint of CampaignCodeAuditDetailEndpoint that determines whether usage of a code applied to the cart is valid, usually invoked to during a checkout submission to make sure codes are still valid.