Share via


How to Select Profile Properties for Import

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

You use the Commerce Server Manager to select which profile properties are to be imported into the Data Warehouse.

Note

It is important to take appropriate security measures when you collect personal profile data on your site, import the data into the Data Warehouse, and display the data in analysis reports.

To select profile properties to import into the Data Warehouse

  1. Open Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, and then expand Profile Definitions.

  2. Select the profile definition that contains the property you want to import into the Data Warehouse.

  3. In the Properties list, select the property that you want to import into the Data Warehouse.

  4. In the Detailed Information section, click Advanced Attributes.

  5. Check the Exported box, and then click Apply.

    Data for this profile property will be collected in the Commerce Server database.

Note

You cannot change the name of a property after you create it. You can change the display name, but the actual programmatic name remains static. If you want to change the programmatic name, you must delete the property and add it again with the new programmatic name.

Mapping Profile Properties to Columns in the RegisteredUser Table

Commerce Server includes several profile definitions that you can use for your site. If you decide to create custom profile definitions and want to use the Commerce Server analysis reports, you must map the properties of your custom profile definitions to the tables and columns in the Data Warehouse that provide the data. If you decide to store your data in custom tables, you must create new reports that access the data in those tables.

You must map each exported profile property to a profile data source for storage before it is imported into the Data Warehouse. For information about how to map profile properties to data sources, see How to Map a Profile Property to a Storage Location.

If you create a custom profile definition to collect user data on your Web site, and you want to use the data that was collected with it in Commerce Server profile reports, you will have to store the information in the existing columns in the RegisteredUser table in the Data Warehouse.

If the data is not needed for reports, or if you are writing custom reports to use the data, running the Profile data import DTS task will create a new class (table) and columns in the Data Warehouse.

To map the data that was collected with your user profile definition to the RegisteredUser table in the Data Warehouse, you must add the following to your user profile definition:

  • DWClassName. A profile definition custom attribute that lets you define the name of the object (in this case the RegisteredUser table) in the Data Warehouse to which the profile will export data. If the class (table) is not in the Data Warehouse, the DTS task will create it.

  • DWMemberName. A profile property custom attribute that lets you define the name of the data member (in this case the column in the RegisteredUser table) in the Data Warehouse where the profile property will be stored. If the member name (column) is not in the specified Data Warehouse class (table), the DTS task will create it. For a list of data members (columns) in the RegisteredUser table, see RegisteredUser.

    For example, if you want to export all the addresses associated with a user to the Data Warehouse, go into the Profile Definitions for the User Object, mark the Address List as Exported in the Advanced Attributes, and add a new Custom Attribute. The Custom Attribute name might be AllAddresses (whatever the name is, it cannot be an existing member name in the Data Warehouse RegisteredUser table). When the Profile Import DTS task runs, a multivalue member will be created in the Data Warehouse (multivalue members are implemented by using link and value tables). In this case, you could validate the imported data by looking at the Data Warehouse tables LinkRegisteredUserAllAddresses and ValRegisteredUserAllAddresses.

    If you only want one address for per user, you can populate the Preferred Address field that has the GUID (enclosed in {} braces) that corresponds to the address and mark this property for export. If you set the DWMemberName in Custom Attributes to be AddressName, the Provider will use the existing relation between RegisteredUser and Address.

    Note

    If you decide to store the data in a new column, assign the name of the new column as the value of DWMemberName for the property to be stored in that column. The DTS task will add the column to the RegisteredUser table when it runs. However, the data in the new column will not be used in any Commerce Server reports. If you want to run reports on data in new tables and columns in the Data Warehouse, you will have to create new reports. For information about how to create new reports, see How to Create a Custom Data Warehouse Report.

  • Date_Last_Changed is a profile property of type DATETIME that is needed by the DTS task to perform incremental updates.

For more information about Data Warehouse classes, see Primary Data Warehouse Business Classes. For more information about Profile classes in the Data Warehouse, see Profile Management Classes.

To add the DWClassName custom attribute to a profile definition that maps to the RegisteredUser table in the Data Warehouse

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Profile Definitions, right-click your user object profile definition, and then click Properties.

  2. In the Properties dialog box, on the Custom Attributes tab, click New.

  3. In the Custom Attribute dialog box, do the following:

    Use this

    To do this

    Name

    Type DWClassName.

    Display name

    Type Data Warehouse class name.

    Description

    Type Class name in Data Warehouse.

    Value

    Type RegisteredUser.

  4. Click OK to close the Custom Attribute dialog box.

  5. Click OK to close the Properties dialog box.

After you have added the DWClassNamecustom attribute to the user profile definition, add the DWMemberName custom attribute to each property in the user profile definition that will be exported to the Data Warehouse. The DWMemberName custom attribute is used to map profile definition properties to the columns in the table specified with the DWClassNamecustom attribute.

To add the DWMemberName custom attribute to a profile property that maps to a column in the RegisteredUser table in the Data Warehouse

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Profile Definitions, and then click the profile definition that contains the property to which you want to add the custom attribute.

  2. In the profile designer screen, in the Properties list, select the property to which you want to add the custom attribute.

  3. In the profile designer screen, in the Advanced Attributes section, in the Map to Data box, click the ellipsis button (...) to open the Data Source Picker dialog box.

  4. In the Data Source Picker dialog box, expand the data source that contains the data object that contains the data member with which you want to map the property.

  5. Expand the data object that contains the data member with which you want to map the property select the data member, and then click OK.

  6. In the profile designer screen, in the Advanced Attributes section, select Exported to specify that this property will be imported into the Commerce Server Data Warehouse. You can export only mapped properties.

    Note

    You cannot export properties that are multivalued and of the type Boolean or properties of type binary, longstring, or password.

  7. In the profile designer screen, in the Custom Attributes section, click New.

  8. In the profile designer screen, in the Custom Attributes section, do the following:

    Use this

    To do this

    Name

    Type DWMemberName.

    Display Name

    Type DWMemberName.

    Description

    Type Data Warehouse member name.

    Value

    Type the name of the column in the RegisteredUser table where the data should be stored.

  9. Click Accept, and then click Apply.

  10. To save the profile definition, click Save on the toolbar.

    The profile definition is saved with the custom attribute.

Customizing the Name of the Data Warehouse Column for a Profile Property

For profiles, you can customize the name of the column in the Data Warehouse for the new profile property. In addition, you can export the property to a particular column that already is in the Data Warehouse.

To customize the name of the column for a profile property

  1. Expand Commerce Server Manager, expand Global Resources, expand Profiles, expand Profile Catalog, expand Profile Definitions, right-click your user object profile definition, and then click Properties.

  2. In the Properties dialog box, on the Custom Attributes tab, click New.

  3. In the Custom Attributes section, click New, and then do the following:

    Use this

    To do this

    Name

    Type DWMemberName.

    Value

    Type a name for the column.

  4. ClickAccept, click Apply, and then click Save on the toolbar.

    A column with the name that you specified is added to the Data Warehouse the next time that you run the Profile data import task.

See Also

Other Resources

Specifying Data to be Imported into the Data Warehouse