Update best match region

The Update Best Match Region transaction manages the YFS_REGION_BEST_MATCH table, which is used by Data Warehouse Analytics to report best match region data. The best match region is defined by the following five address attributes in person info records:

  • ADDRESS_LINE6
  • CITY
  • STATE
  • SHORT_ZIP_CODE
  • COUNTRY
    Note: COUNTRY refers to Country/Region.

The agent for the Update Best Match Region transaction runs in two modes that allow you to set up and update the YFS_REGION_BEST_MATCH table.

Attributes

The following are the attributes for this time-triggered transaction:

Table 1. Update best match region attributes
Attribute Value
Base Transaction ID UPDATE_BEST_MATCH_REGION
Base Document Type General
Base Process Type General
Abstract Transaction No
APIs Called None
User Exits Called YSCGetShortZipCode UE

Criteria parameters

The following are the criteria parameters for this transaction:

Table 2. Update best match region criteria parameters
Parameter Description
Action Required. Triggers the transaction. If left blank, it defaults to Get, the only valid value.
Number of Records To Buffer Optional. Number of records to retrieve and process at one time. If UpdateOnly = N, only distinct records are returned per agent call. If left blank, it defaults to 1000.
TableType Required in a sharded deployment when YFS_Person_Info table may exist in multiple schemas.

Valid Values: CONFIGURATION, TRANSACTION, MASTER.

If set to CONFIGURATION, the agent runs for the YFS_Person_Info records associated with tables that have TableType as CONFIGURATION; for example, YFS_Organization, YFS_Ship_Node, and so forth.

If set to TRANSACTION, the agent runs for the YFS_Person_Info records associated with tables that have TableType as TRANSACTION; for example, YFS_Order_Header, YFS_Shipment, and so forth.

Note that the agent would run for all TableTypes that exist in the same schema as the one passed. For example, if set to TRANSACTION, the agent would also run for YFS_Person_Info records associated with tables that have TableType as MASTER, since they reside in the same schema.

ColonyID Required in a sharded deployment where the YFS_PERSON_INFO table may exist in multiple schemas. Runs the agent for the colony.
UpdateOnly Mode in which to run. Valid values are:
  • N - Default value. Adds records from the YFS_PERSON_INFO table to the YFS_REGION_BEST_MATCH table and populates the region key in the YFS_BEST_MATCH table. To perform the initial setup of Best Match Region for Analytics, set UpdateOnly to N.
  • Y - Update mode. Updates region keys based on addresses in YFS_REGION_BEST_MATCH. After performing the initial setup of Best Match Region for Analytics, set this value to Y to specify update mode.
LastPersonInfoKey Optional. If UpdateOnly is set to N, LastPersonInfoKey determines the first person info record to populate. If no key is specified, the value defaults to Null.
LastRegionBest
MatchKey
Optional. If UpdateOnly is set to Y, LastRegionBestMatchKey determines the first region best match key to update. If no key is specified, the value defaults to Null.

Statistics tracked

None.

Pending job count

None.

Events raised

None.

Tables purged

None.