Developers
  • Introduction
  • Integration
    • Spring Boot Starter
      • Overview
      • Setup your project
      • Product search
      • Invoicing
      • Merchant side invoicing
      • Merchant side purchase control
      • Loyalty cards
      • Home delivery
      • Marketing & Offers
    • Custom Integration
      • Overview
      • Connection node
        • Get node version endpoint
        • Get node health endpoint
      • Product search
        • Pageable product list search endpoint
        • Product bacrode search endpoint
        • Product name search endpoint
        • Product category search endpoint
      • Invoicing
        • Receive invoice endpoint
      • Merchant side invoicing
        • Create receipt endpoint
        • Confirm receipt payment endpoint
      • Merchant side purchase control
        • Receive purchase check endpoint
        • Send purchase check result
        • Ask for purchase check data resend
      • Loyalty cards
        • Loyalty card registration endpoint
        • Loyalty card bonus endpoint
      • Home delivery
        • Receive order endpoint
        • Receive order update endpoint
        • Update order status
        • Find order by id
        • Find order by invoice id
        • Find order by institution invoice id
      • Marketing & Offers
        • Find offers endpoint
  • General
    • Data object descriptions
      • HealthStatus
      • DefaultOffer
      • DiscountOffer
      • ProductRelatedOffer
      • OfferType
      • OfferClassification
      • Order
      • OrderStatusChangeLog
      • ColorTheme
      • LoyaltyCard
      • DefaultLoyaltyCard
      • BonusLoyaltyCard
      • LoyaltyCardType
      • LoyaltyCardValidationType
      • Shipment
      • ShipmentStatus
      • Category
      • Addition
      • Address
      • Currency
      • BuyerParty
      • Campaign
      • CampaignCode
      • ClientCard
      • Information
      • Inspection
      • Invoice
      • LangCode
      • Price
      • Product
      • Quantity
      • SellerParty
      • Total
      • TotalVAT
      • Translatable
      • Receipt
      • ReceiptProduct
      • ReceiptLoyaltyCard
      • ReceiptCategory
      • VAT
    • Request & Responses
      • NodeHealthResponse
      • NodeVersionResponse
      • OfferSearchRequest
      • PickupOrderStatusChangeRequest
      • LoyaltyCardBonusResponse
      • LoyaltyCardBonusRequest
      • LoyaltyCardRegistrationResponse
      • LoyaltyCardRegistrationRequest
      • PurchaseControlCheckResendRequest
      • PurchaseControlResult
      • PurchaseControlCheckResponse
      • PurchaseControlCheckRequest
      • ReceiptPaymentConfirmationRequest
      • InstitutionRequest
      • Pageable
      • PageRequest
      • CreateReceiptRequest
      • ProductSearchRequest
    • Campaign standard
Powered by GitBook
On this page
  • Campaign code calculation
  • Client card identification calculation
  • Campaign type descriptions
  • Amount modification campaign operation description (001)
  • Amount based unit price campaign (002)
  • Total modification campaign (501)

Was this helpful?

  1. General

Campaign standard

PreviousProductSearchRequest

Last updated 5 years ago

Was this helpful?

Campaigns is separated into two groups:

  • Product based campaigns - provided with product data.

  • Institution based campaigns - Periodical campaigns. Applies for whole invoice

contains three parameters – name, code and operation.

contains data that can determine for who is the campaign valid and campaign type. Campaign operation is conditional operation written in Javascript.

Campaign code calculation

Campaign code = CLIENT_IDENTIFICATION (1 place) + CLIENT_CARD_IDENTIFICATION (8 places) + CAMPAIGN_CODE (3 places)

Client identifier

C

Only available for clients

U

Only available for unauthenticated clients

B

Available for clients and unauthenticated clients

Campaign codes

001

Amount modification campaign

002

Amount based unit price campaign

501

Invoice total sum campaign

502

campaign code starting with 0 is product based campaign

campaign code starting with 5 is institution based campaign

Client card identification calculation

00000000 – Available for all

00000SKP – Available only for clients who has customer card with machine readable code (SKP)

Example

  1. Amount modification campaign available for all clients.

    Code: B00000000001

  2. Amount base unit price campaign available only clients who has SKP customer card

    Code: C00000SKP002

Campaign type descriptions

Amount modification campaign operation description (001)

Input parameters

Name

Type

Description

amount

Double

Initial amount

Output parameters

Name

Type

Description

amount

Double

Real amount that customer have to pay

Example

Client who has SKP client card will get every second piece for free.

{
    "name" : "Crazy days",
    "code" : "C00000SKP001"
    "operation" : "amount >= 2 ? amount - (Math.floor(amount / 2) * 1) : amount"
}

Amount based unit price campaign (002)

Input parameters

Name

Type

Description

amount

Double

Product amount

unitPrice

Double

Initial unit price with addition and without VAT

Output parameters

Name

Type

Description

unitPrice

Double

Real product price that customer have to pay with addition and without VAT

Example

Customer will get 50 cent discount for each product if customer will buy at least 5 pieces of product

{
    "name" : "Crazy days",
    "code" : "B00000000002"
    "operation" : "amount >= 5 ? unitPrice – 0.5: unitPrice"
}

Total modification campaign (501)

Input parameters

Name

Type

Description

total

Double

Total without VAT

Output parameters

Name

Type

Description

total

Double

Total without VAT

Example

Client will get 2% discount if their purchase is bigger than 50 euros.

{
    "name" : "Crazy days",
    "code" : "B00000000501"
    "operation" : "total >= 50 ? total * 0.98 : total"
}
Campaign object
Campaign code