< Day Day Up > |
The information provided by a user when creating an account is the basis of the profile. You add to that profile by explicitly querying the user and by observing his behavior on the portal. Table 7.3 lists some of the elements you might want to add to a profile. Table 7.3. Representative Profile Data Elements
Commerce Server 2002 contains a quite rich data model right out of the box. You are likely to find that the information you need to track is already in the database. Many of the fields you will need for user registration are in the Commerce Server 2002 user object, as shown in Figure 7.8. Figure 7.8. User Object Viewed in Commerce Server Business Desk
To add new properties here, click the Add button at the lower left-hand corner of the window. A dialog box opens, prompting you to add either a new property or a new property group (Figure 7.9). Select the property groups to organize properties such as general information and account information so they may be more easily found. When you click OK, a new property called New Property 1 is added to the current section. Figure 7.9. Add Dialog Box
You can change the group's property name and other attributes, as shown in Figure 7.10. Figure 7.10. Changing Attributes for a New Property
This user object shows only a fraction of what Commerce Server tracks regarding the profile, as several tables are involved in storing this data. As you build a commerce site, you can save yourself time by printing a large version of the Commerce Server 2002 schema (Figure 7.11) and hanging it on your wall. The schema shows the structure of the SQL Server database repository for Commerce Server, color coded to indicate the type of data stored in each of the tables. To download the schema, go to www.microsoft.com/commerceserver/techinfo/productdoc/2002/dwschema.asp. Figure 7.11. Commerce Server 2002 Database Schema
Let's take a closer look at the section of the data model concerned with the profile (Figure 7.12). The RegisteredUser table stores profile data elements such as name, email, and organization. Figure 7.12. RegisteredUser Table from Commerce Server 2002
The RegisteredUser table is related to other tables, including Address, SiteTerm, SiteVisit, Order, and others. The Address table stores multiple addresses for users, such as home address, billing address, and shipping address (Figure 7.13). Figure 7.13. Address Table
NOTE If you are using Active Directory, usernames are restricted to no more than 20 characters . Extending the Basic ProfileWhile Commerce Server profiles contain quite a few fields right out of the box, you may need additional ones. You can add an arbitrary number of fields to the user profile to make it as detailed and complex as necessary to accomplish your business goals. A hotel, for instance, might want to take note of room, food, and beverage requests as well as a user's preferences for special services. Based on their profiles, a guest who resents the intrusion of the nightly bed turndown might then be spared this service, while another guest could be given a local newspaper at check-in. The first step in extending the profile is to add new fields or tables to the Commerce Server database. For instance, to add a new database that stores your users' areas of expertise as well as a self-assessment of their skill levels, you would follow these steps:
You can also extend a user profile in an LDAP directory rather than in SQL Server. The steps are roughly the same, but you add LDAP classes and attributes rather than database tables and fields. While the Retail Solution site that accompanies Commerce Server uses SQL Server 2000 to store its profiles, the Supplier Solution site uses Active Directory. The Commerce Server predictor resource attempts to fill in missing bits of the user profile by making inferences based on the behavior of the general population of your portal. For instance, this resource can be used for cross-selling . Customers who purchase fly rods are likely to need new line and flies sooner or later. |
< Day Day Up > |