seourlkeywordgen utility

When you are installing the search engine optimization feature to create shorter SEO friendly URLs, WebSphere 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
Mandatory: 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
Mandatory: The ID of the catalog that owns the categories and products that you want to generate keywords for.
language_for_shared_url_keyword
Mandatory: 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
Mandatory: The full path to the WebSphere Commerce server 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
Mandatory: The configuration file for the SEO component. The parameter is entered in the form /full_path/wc-admin-component.xml.
dbuser

DB2The name of the user that is connecting to the database.

OracleThe user ID connecting to the database.

dbpassword
The password for the user that is connecting to the database.

Example

  • WindowsWC_installdir/bin/seourlkeywordgen.cmd
  • LinuxWC_installdir/bin/seourlkeywordgen.sh
  • WebSphere Commerce DeveloperWCDE_installdir/bin/seourlkeywordgen.bat
The command and parameters pattern:
  • Windowsseourlkeywordgen.cmd storeId catalogId language_for_shared_url_keyword server_config_fullpath component_config_fullpath db_username db_password
  • Linuxseourlkeywordgen.sh storeId catalogId language_for_shared_url_keyword server_config_fullpath component_config_fullpath db_username db_password
  • WebSphere Commerce Developerseourlkeywordgen.bat storeId catalogId language_for_shared_url_keyword server_config_fullpath component_config_fullpath [db_username] [db_password]
For example:
  • LinuxWC_installdir/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 and com.ibm.commerce.infrastructure-fep folder, 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":
    • LinuxWindowsWC_installdir/wc.ear/xml/config/seourlload/logging.properties
    • WebSphere Commerce DeveloperWCDE_installdir/workspace/WC/xml/config/seourlload/logging.properties
    A log file is generated in the following location:
    • LinuxWindowsWC_profiledir/logs/seourlload.log
    • WebSphere Commerce DeveloperWCDE_installdir/logs/seourlload.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.