Sunday, January 23, 2011

Dynamic contact pricing for guest shoppers

There are 3 kinds of users in commerce from front end when accessing the site.
1. Guest : Guest user does not have password but has unique id
2. Generic : Generic user id is used -1002 most of the times.
3. Registered. : A guest user is converted into a registered user.

IBM web sphere commerce has a very powerful contract model and I have worked on B2B and B2C projects, where we have used contract model to define price and product filters.
For the B2C model for EPP and EDU, we use the contract price.

FOR EPP/EDU for users
Once a contract is successfully created and a contract can be assigned to a group of users using MBRGRPMBR
PARTICIPNT is used to associate a MBRGRP to a contract.

1. MBRGRP
2. MBRGRPMBR.
3. PARTICIPNT

For EPP: Usually the guest users are not allowed to see the pricing and requires logging in.
for EDU: To allow guest users to see contract pricing, One approach that we used was to add the guest users to add to PARTICIPNT table.

These are the most important contract tables from the data model.
1. PRODUCTSET
2. PSETADJMNT
3. TERMCOND
4. TRADING
5. TRADEPOSCN
6. OFFER

Important queries:

select c.name, a.productset_id, adjustment, xmldefinition from atcmr.psetadjmnt a, termcond b, contract c, d
where a.termcond_id = b.termcond_id and c.name = 'CONTRACTNAME' and b.trading_id = c.contract_id and c.state = 3 and adjustment = -5
and d.productset_id = a.productset_id

No comments:

Post a Comment