# GeoCodeApplicability

## Program ID

MetraPipeline.GeoCodeApplicability.1

## Description

GeoCodeApplicability is a rule plug-in which determines whether to apply geocode or not. Geocode value should be 0 by default. Geocode should be calculated only if the country is US or USA, and account type is Bill-To.

## Required Input Properties

Tag name | Value type | Description
ApplyGeoCode | Boolean | A true or false value indicating whether to apply geocode or not. Based on the value, the geocode is calculated or not. The default value is 0.

## Required Output Properties

Tag name | Value type | Description
accounttype | string | Account Type: 1 = Bill-To 2 = Ship-To
country | string | Country name.

## Additional Configuration Tags

None.

## Configuration Example

<configdata>
<default_actions>
<action>
<prop_name>ApplyGeoCode</prop_name>
<prop_value ptype="BOOL">TRUE</prop_value>
</action>
</default_actions>
<!-- rule 1 -->
<constraint_set>
<actions>
<action>
<prop_name>ApplyGeoCode</prop_name>
<prop_value ptype="BOOL">FALSE</prop_value>
</action>
</actions>
<!-- 2 here stands for ShipTo account type -->
<constraint>
<prop_name>accounttype</prop_name>
<condition>equal</condition>
<prop_value ptype="INTEGER">2</prop_value>
</constraint>
</constraint_set>
<!-- rule 2 -->
<constraint_set>
<actions>
<action>
<prop_name>ApplyGeoCode</prop_name>
<prop_value ptype="BOOL">FALSE</prop_value>
</action>
</actions>
<!-- if country not equal to USA or US -->
<constraint>
<prop_name>country</prop_name>
<condition>not_equal</condition>
<prop_value>USA</prop_value>
</constraint>
<constraint>
<prop_name>country</prop_name>
<condition>not_equal</condition>
<prop_value>US</prop_value>
</constraint>
</constraint_set>
</configdata>