Page 1 of 1

Baskets & Orders: Where to store Tracking Code?

Posted: Mon Feb 25, 2008 1:15 pm
by sweeperq
In the past, I utilized Coupons to track where our customers were coming from (e.g. Catalog, Affiliates, Paid Search, etc.). However, in the near future, management would like to combine offers (e.g. 5% off web order + free express shipping upgrade).

What I'm thinking of doing is adding two tables: 1) cst_TrackingCodes 2) cst_TrackingCodeCoupons. The tracking codes will be associated with 0 or more coupons that all get applied when the tracking code is captured.

I need to associate the Tracking Code that is captured with the final order so it can be exported to our order management system. What I'm struggling with is where to store the initial tracking code. My initial thought was in the CustomFields table. However, it looks like AC7 changed the way it stores "Baskets" and "Orders". In AC5.5, "Baskets" and "Orders" were all stored in the same table. Now it appears they are seperated. If that is the case, how do I link the Tracking Code to the final order? I need it to be 100% reliable, so storing the value in a cookie until checkout will not work.

Ideas? Thanks, Sam.

Posted: Mon Feb 25, 2008 1:51 pm
by Logan Rhodehamel
I know this isn't ideal, but it might work. What if you built a custom table that would track your initial value and associate with the "basket" object. Then when "checkout" is called, you add whatever additional data you have based on that tracking value as line items to the basket. The line items would be moved over to the resulting order.

I have made a note to improve your ability to track a basket through to order. (It has to fall as part of our 7.1 work because it involves database changes.)

Posted: Mon Feb 25, 2008 2:13 pm
by sweeperq
Thanks for the reply Logan. I was thinking of simply using the CustomFields table, but I just realized that there is no CustomFields collection on the Basket or Order object. So I guess I might as well do it in a custom table like you suggested.

Posted: Mon Feb 25, 2008 2:30 pm
by Logan Rhodehamel
sweeperq wrote:Thanks for the reply Logan. I was thinking of simply using the CustomFields table, but I just realized that there is no CustomFields collection on the Basket or Order object. So I guess I might as well do it in a custom table like you suggested.
There is a custom fields table. ac_CustomFields. It should also have objects that go along with managing a custom field collection. This may or may not work for you to store the values.