In recent commerce server training, new commerce server developers have raised quite good number of questions which has triggered me to create more blogs in next few weeks. One of the question they have asked is – “I would like to give 50% discount to a corporate from a particular city”. Their perception is that the targeting will work with only UserObject profile and they have some work around to implement this functionality.
Commerce server provides us functionality to target all profile objects i.e., we can able to target a discount or advertisement to a user based on his profile properties like credit card, address or organization profile. When you install commerce server, by default, you can able to see only userobject and targeting context in the targeting dropdown.
If you want to show other profile objects in field dropdown – follow below steps.
1. Open Marketing Manager
2. From left pane, under views -> click on “Expressions”.
3. From left pane, under tasks -> click on “Set targeting profiles”
4. A popup opens. All available profiles are shown on left side list box and already targeted profiles are shown on right side list box.
5. Use Add button to add a profile from profile list box to targeted list box and use remove button to add a profile from targeted list box to profile list box. Use remove all button to remove all profiles from targeted list box.
The student query can be easily achieved by targeting organization profile.
If you like this post, please click on our sponsor advertisement.

Hi Ravi,
I am using CS2009 ASP.NET site, i want to apply discounts based on user email address. I defined a target expression which specifies as ” Userobject.Email contains testuser@gmail.com“.
Then i used this expression in the discounts eligibility tab,but its not working. When i remove the expression from the discounts eligibility tab, the discount works fine.
1) How can i make this work in CS 2009, i am using ASP.NET NOT shrepoint site. Do I need to do a custom code or is it a just configuration ?, Pls let me know the solution to fix it. If its a custom code , pls give me the sample code.
Note: I did lot of research , coudn’t find any solution for this.
Thanks
Mohan, I think you are still using Commerce Server 2007 API? I think you have done correctly but can you check the below conditions
1) either the email you are sending is wrong (kindly debug to that point and see the email you are sending is correct or not)
2) check your email doesn’t have caps or small or combination – if yes, the same value has to be given in Marketing expression
3) Make sure there are no spaces in marketing expressions.