Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers

Marketing Library

The Marketing library in Ucommerce, enables you to easily integrate your marketing campaigns in your web-applications.

The Marketing library has two methods, that can be used to interact with the discounts on the current Purchase Order.

Add Voucher

The AddVoucher(string voucherCode) method is used for adding a voucher to the current PurchaseOrder.

The voucherCode parameter is a voucher code that has been generated in the Marketing Foundation backend.


    // Adding a voucher to the current basket.

Get Targeted Campaign Items

The GetTargetedCampaignItems() method gives you a list of the targeted campaign items for the current user context.


    var campaignItems = MarketingLibrary.GetTargetedCampaignItems();
    foreach (var item in campaignItems) 
        // Printing out all the campaign items for the current context.