Posts Tagged ‘marketing system’

This blog is continuation to my blog entry “Creating custom display types in commerce server”. In my previous blog entry, I have explained how can we display adobe flash advertisements and in this blog post, I will explain how can we display silver light advertisements in commerce server. The steps are pretty simple –> Each advertisement will store template ID and the properties. Based on the template Id, commerce server loads the template structure are replace tokens with properties and file output is rendered to HTML.

image

The steps for creating silverlight display type is pretty simple.

1. Create the HTML required to render for silver light: If you are not aware of the HTML structure – open any silverlight website (silverlight.net) in your web browser, go to code behind and copy the silverlight loading object tag – as shown below

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="MinRuntimeVersion" value="3.0.40624.0" />
<param name="Source" value="ClientBin/advertisement.xap"/>
<param name="windowless" value="true" />
<param name="background" value="white" />
<a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkId=149156">
<img style="border-width:0px" alt="Install Silverlight" src="http://i1.silverlight.net/resources/images/content/misc/Install-Silverlight-611×355-HomeShowcaseSize.png?cdn_id=20091118_3" style="cursor:pointer" /></a>
</object>

2. Identify the properties that needs to get updated from Marketing manager: In this step, we will identify the tokens when are required to get input from the customer. For example, here I have identified following tokens

  • Source Param
  • Background
  • Height
  • Width

so, my template structure will become like this

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="{%Width%}" height="{%Height%}">
<param name="MinRuntimeVersion" value="3.0.40624.0" />
<param name="Source" value="{%source%}"/>
<param name="windowless" value="true" />
<param name="background" value="{%BackGround%}">
<a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkId=149156">
<img style="border-width:0px" alt="Install Silverlight" src="http://i1.silverlight.net/resources/images/content/misc/Install-Silverlight-611×355-HomeShowcaseSize.png?cdn_id=20091118_3" style="cursor:pointer" /></a>
</object>

3. Create a display template into marketing system: You can find the code block on this blog to create or modify the DisplayTemplate and the URL is http://microsoftblog.co.in/commerceserver/creating-custom-display-types-in-commerce-server/

That’s all… Now you can able to see silverlight template in your marketing system. In coming days, I will try to write a blog entry on how to show Google advertisements in commerce server.

Related Articles


If you like this post, please click on our sponsor advertisement.


Recently, I have seen a post in community on how to implement marketing discount based on quantity. The business requirement is to to set product price based on product quantity purchase.

Purchase Quantity                     Price
1 – 24                                        $20.00
25 – 49                                      $19.00
50 – 99                                      $18.00
100 and up                                $17.00

If customer buys 15 products, they have to pay $20 for each product.  If they buy 32, they have to pay $19 for each product and so on. It is pretty simple requirement and we can implement them using discounts priorities in commerce server.

For this, create a Base product with price as 20$. Now create three discounts of Minimum Purchase Discount type

  1. Discount 1 : Buy minimal purchase of 100 products and get 15% discount (discount Priority 1)
  2. Discount 2 : Buy minimal purchase of 50 products and get 10% discount (discount Priority 2)
  3. Discount 3 : Buy minimal purchase of 25 products and get 5% discount (discount Priority 3)

User cases:

  1. Customer purchased 24 products – none of the discount applies so he has to pay base price (20$ per product).
  2. Customer purchased 26 products – Discount 1 and 2 are not applicable and only discount 3 applies (he get 5% discount).
  3. Customer purchased 51 products – Discount 1 is not applicable and discount 2 & 3 are applicable. Discount 2 will be applied on the basket as it has more priority over discount 3 (he get 10% discount)
  4. Customer purchased 101 products – All Discounts are applicable. Discount 1 will be applied on the basket as it has more priority over discount 2 & 3 (he get 10% discount).

The solution works fine if we have to apply for 1 product. If we want to apply for more than one product then the problem starts. If the user takes 20 items of product A and 20 items of product B and if we created these discounts at category or all products level then the customer will get 10$ discount but our requirement says, the user is not eligible for any discount as he purchased less quantity (less than 25).

Picture1While creating “Minimum purchase discount type”, when the user selects for product, currently the business tool asks the user to select the product, instead if the user leave the text box blank then it should create this discount at product level.

Related Articles


If you like this post, please click on our sponsor advertisement.


Out of box, commerce server provides six types of discounts. This will satisfy majority of business requirements to provide flexible discounts to their customers but in today’s dynamic world these discounts are not enough. What if the business wants to give shipping discounts based on shipping method selected. Many developers feels that this requirement cannot be achievable but here are the two workarounds to achieve this requirement.

  1. Using profile Targeting
  2. Using Custom Pipeline.

Using Profile Targeting:

This approach is similar to current approach but small changes.

  • Extend profile system to capture order shipping method. The value will be set/updated during checkout process.
  • Create different order level discounts for every shipping method. I.e., in the target expression we will target it on shipping method. Consider following table.
Shipping Method Minimum Order Amount Priority Amount Off
ByGround

20

4

10%

ByGround

100

3

15%

ByGround

200

2

50%

ByGround

300

1

100%

Here we will create four discounts and target to “By Ground” shipping method.

 

 

In this case commerce server decides which discount to apply to the basket. The administrator can set the priority to discounts so that when two are more discounts are eligible CS can apply top priority discount.

Advantages:

  • Easy to implement.
  • Business users can create new discounts using marketing manager.
  • Can do user targeting (applied only to users of California).

Disadvantages:

  • Mistakes in priorities may leads to problems.
  • If there are more rules, its end up creating multiple discounts (leads to confusion).

Using Custom Pipeline

In this approach, we are implementing shipping discounts based on business rules. We will create a small utility by which the users can capture all rules data. For example,

Shipping Method Minimum Order Amount Priority Amount Off
ByGround

20

4

10%

ByGround

100

3

15%

ByGround

200

2

50%

ByGround

300

1

100%

The application allows users to extract this data into XML

<Discounts>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 20 </MinimumOrder>
          <Priority>4</ Priority>
          <AmountOff>10</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 50 </MinimumOrder>
          <Priority>3</ Priority>
          <AmountOff>15</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 200 </MinimumOrder>
          <Priority>50</ Priority>
          <AmountOff>50</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 300 </MinimumOrder>
          <Priority>1</ Priority>
          <AmountOff>100</ AmountOff>
     </Discount>
</Discounts>

We will create a custom pipeline component which will take this value as input. This input can be provided by administrator through pipeline component editor as shown below.

 

This component will append business rule data to the dictionary so that the data can be available to rest of the components.

“Commerce.ShippingMethodRouter” will load corresponding shipping calculator based on shipping method. In current scenario, it will call shipping calculator component which interacts with third party web services to calculate shipping cost. Since we have business rules available to shipping cost calculator, it’s easy to get what discount we can provide. We will deduct cost from the actual shipping cost before assigning it back to dictionary.

Note: We can also implement this by using BizTalk rule engine instead of XML.

Advantages:

  • Can implement many rules?
  • No need to create different promotions.

Disadvantages:

  • Every time the business user has to reach to admin to amend latest changes.
  • We cannot implement user targeting (this discount is applicable to only California shipments)

Related Articles


If you like this post, please click on our sponsor advertisement.


Through marketing manager, business users can create promotion codes. These promotion codes are stored in a tabled named – “mktg_promocode” in SQL Server. Sometimes we might want to know what are the promotion codes available and how many times the user has used this promotion code. Either you can search for the coupon code using marketing manager advance search or use following query to get details of all coupon codes.

use [StarterSite_marketing]
Go

Select
pc.u_pc_code as ‘Promotion Code’,
pc.u_pc_target_user as ‘Target User’,
pct.i_pctrans_used_count as ‘No. of Times Promo Used’,
i_pctrans_reserved_count as ‘No. of users reserved this promo’
From [mktg_promocode] pc , [mktg_promocode_transactions] pct
where pc.i_pc_id = pct.i_pc_id

For more information about Marketing tables related to coupons, visit following link.
http://msdn.microsoft.com/en-us/library/bb520796.aspx

Related Articles


If you like this post, please click on our sponsor advertisement.


Commerce server 2007 provides business users to develop six different type of discounts. They are

  1. Simple Discount
  2. Minimum purchase discount
  3. Buy N, Get 1 free
  4. Paired discount
  5. Paired set discount
  6. Order discount

There are some cases where you want to associate a dynamic discount to an Order. In commerce server we have two ways to associate a discount to an order

  1. When a customer provides a promotion code.
  2. When a site wide discount is available.

If your requirement is to associate a discount to an order (like 10% off or 20$ off), use following approach to achieve this.

  • In code behind, create a discount.
  • Add a promotion code to a discount.
  • Approve the discount. Note: If you are using discount cache, make sure you call refreshCache method.
  • Create a basket and associate the promotion code and perform checkout process.
  • Disapprove newly added discount.
  • Delete newly added discount.

Here I am not given end to end solution, but throwing some light on the approach.  If you feel it is difficult to to know which method to call for which action, you can refer to my blog – http://ravikk.spaces.live.com/blog/cns!F348D7145D1BE6C2!500.entry which explains how to know which commerce server method to call.

If you want to try before you implement in your code, you can refer to quick order code in my blog – it is having code which performs entire checkout at single action (you need to extend it by adding discount creation and deletion code). http://ravikk.spaces.live.com/blog/cns!F348D7145D1BE6C2!428.entry

Related Articles


If you like this post, please click on our sponsor advertisement.


Follow me on Google+
Add to circles

In 0 people's circles

Sign up for Newsletter