Archive for June 2010

Commerce server Order system auto generates tracking number. On application start event, it will continue to allocate a batch of tracking numbers from tracking table even if you don’t use them, so you’ll continue to see that counter jump up even if you’re not de-queuing any of those values when saving your order (this is by design). As per our application architecture or topology, we have three data centers having multiple front end servers and each datacenter will have a commerce server site with a database cluster and there is a transactional replication between these commerce server transaction databases.

There is big risk of order numbers getting duplicated during replication. Having unique prefix/suffix solution may not match to our requirements. I thought of setting up some sort of centralized Order Tracking service which all WFEs request tracking numbers from database (like one master database, a WCF service, SQL components). I also created SQL scripts which locks table and give unique number to each request – click here to download the code. Once we get order number, we assign the number to card and save it in commerce server. For this, you can refer to msdn link.

http://blogs.msdn.com/b/nihitk/archive/2006/06/21/cs2007-predefined-trackingnumber-for-order.aspx

I have seen this as big monster problem but, end up with a very small fix leveraging OOB features. Order system keep the track of order numbers in IdentityCounter table. The idea of setting aside 10 million sequence numbers for each of the 3 instances has a good fix as we don’t think we’ll run out of that many order numbers soon and thus may not have to worry about doing central master doling out order numbers or worrying about duplicating order numbers across sites.

Learning – don’t see every thing as big issue and try to accommodate the design with out of box features or with little acceptable customizations.

Related Articles


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


On saving customer profile and performing the update, I am getting wired error (as shown in below table).

Type : System.ServiceModel.FaultException`1[[Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault, Microsoft.Commerce.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The requested item does not exist.
Source : Microsoft.Commerce.Providers
Help link :
Detail : Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault
CommerceEntityName : UserProfile
Action :
Code : System.ServiceModel.FaultCode
Reason : The requested item does not exist.
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Collections.Generic.List`1[Microsoft.CommerceServer.Runtime.Profiles.Profile] GetMatches(Microsoft.Commerce.Contracts.Messages.CommerceModelSearch, System.Nullable`1[System.Int32] ByRef, Boolean)

Stack Trace : at Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.GetMatches
CommerceModelSearch searchCriteria, Nullable`1& totalItemCount, Boolean throwIfNotFound)

Apart from this error, nothing is written in event log. Running SQL trace also didn’t help as I haven’t seen entries coming there. Using reflector, when I go through the assembly, I found on interesting thing (check below image).

image

Commerce server while retrieving values, checks if their are any values in the key property, if not found it will throw item not found exception. Later I figured out that in my code, I am passing wrong user ID to commerce server, thus triggering this error.

Related Articles


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


Follow me on Google+
Couldn't get data from google+
Sign up for Newsletter