seourlkeywordgen utility

When you are installing the search engine optimization feature to create shorter SEO friendly URLs, HCL Commerce needs SEO keywords for the product and category pages of the store. The seourlkeywordgen utility creates these SEO keywords that are based on the object name.

The seourlkeywordgen utility runs a query that searches the CATGROUP table and CATENTRY table for products and categories that are missing SEO keyword data. The utility generates data where it is needed, inserting the generated content into the new SEOURL table and SEOURLKEYWORD table.

Use the seourlkeywordgen utility as a migration utility to aid during the initial setup of SEO to generate the keywords for a catalog. If a business user is creating or changing catalog entries or categories with the Catalogs tool, Management Center can generate keywords for the catalog objects. If an administrator uses the Data Load utility to create or change catalog objects, business users can use the Catalogs tool as an alternative to the seourlkeywordgen utility to add SEO properties to these loaded objects.

You can also use the Data Load utility to generate SEO keywords for catalog objects when you are loading new or changed catalog entry and category data. Use the Data Load utility or Catalogs tool to generate SEO keywords instead of running the seourlkeywordgen utility again. For more information about configuring the Data Load utility to load SEO information when the utility is loading catalog entry or category information, see Data Load best practices for Catalog.

The SEO URL Keyword generator performs the following tasks:
  • Go through all catalog entries and categories and generate a keyword that is based on object name, creating the best possible SEO keyword.
  • For catalog entries: The utility uses the product name, process it for special characters removal, and then create the SEOURLKEYWORD and SEOURL entries for the product. If there are collisions with existing data in the SEOURLKEYWORD table, the keyword is generated by using a combination of the product name, part number, and languageId instead.
  • For categories: The utility uses the category name, process it to remove any special characters, and then create the SEOURLKEYWORD and SEOURL entries for the category. If there are collisions with existing data in the SEOURLKEYWORD table, the keyword is generated by using a combination of the category name, categoryId, and languageId instead.

Syntax diagram for the seourlkeywordgen utility

Note: If you want to generate URL keywords in multiple languages that are supported by the store and catalog, you cannot run the utility with each subsequent language. You must run it with the language parameter set to all. Otherwise, subsequent runs do not generate keywords in the specified language.
If you want to support all languages but have already run the utility:
  1. Remove existing records in the SEOURL table.
  2. Run the utility and set the language_for_shared_url_keyword to all.

Parameter values

storeId
Required: The ID of the store that owns the catalog. In the Extended Sites model, the storeID is the store ID of the "Extended Sites Catalog Asset Store".
catalogId
Required: The ID of the catalog that owns the categories and products that you want to generate keywords for.
language_for_shared_url_keyword
Required: The languages that are used in the store. The utility can generate a unique keyword for each language that is used or just a single language, such as English. Valid values are the language code that is used by the store, for example, '-1' is the language code for English or 'all' for all languages.
server_config_fullpath
Required: The full path to the HCL Commerce configuration file. The utility needs to access this configuration file to get system parameters like database schema, and port number. The parameter is entered in the form /full_path/wc-server.xml.
component_config_fullpath
Required: The configuration file for the SEO component. The parameter is entered in the form /full_path/wc-admin-component.xml.
dbuser
The name of the user that is connecting to the database.
dbpassword
The password for the user that is connecting to the database.

Example

Runtime environment
utilities_root/bin/seourlkeywordgen.sh 10101 10101 -1 
/WC_eardir/xml/config/wc-server.xml WC_eardir/xml/config/com.ibm.commerce.infrastructure/wc-admin-component.xml 
dbuser dbpassword 
Notes:
  • By default the utility is configured to generate URL keywords for all products, items and categories. If your store does not have specific store pages for individual SKUs, then do not populate keywords for your items because you do not require a URL for them. If you want to run the utility for only catalog entries and categories, then change the infrastructure component configuration file. Specify only "product.xml, category.xml" for the "URLloadingConfigs" property.
  • If you created a customized wc-admin-component.xml file, ensure that you use that path instead of the default component file.
  • Ensure that there are no products or categories with the same name that exist between the asset store and the extended site to avoid generating the same URL.
  • To turn on trace when you run this tool, open the following file and change all occurrences of "=INFO" to "=FINEST":
    • LinuxWC_eardir/xml/config/seourlload/logging.properties
    • HCL Commerce Developerworkspace_dir/WC/xml/config/seourlload/logging.properties
    A log file is generated in the following location:
    • LinuxWC_profiledir/logs/wc-seo-url-load.log
    • HCL Commerce DeveloperWCDE_installdir/logs/wc-seo-url-load.log

Performance limitations of the seourlkeywordgen utility

The seourlkeywordgen utility can take 2 - 24 hours to run depending on the running environment and the number of products in its catalog.