How can we map the output of the sub-building field or the building field to address line 2?

Question

 

How can we map the output of the sub-Building field to address line 2?

Input address

AddressLine1830 HARRISON AVE FL3
City: Boston
StateProvince:MA
Zipcode: 02118
Country: USA

Output address 

Sub-building: FL 3
Premise:830
Premise Number 830
delivery address: 830 Harrison Ave Fl 3

Can we map the sub-building output to address line 2?
mceclip0.png

 

Answer

You will need to update the cleanser mapping in L3 this way for:

"uri": "configuration/entityTypes/Location/cleanse/mappings/address"

In the section "outputMapping" and "inputMapping" you need to change this part:

{
    "attribute": "configuration/entityTypes/Location/attributes/AddressLine2",
    "mandatory": false,
    "allValues": false,
    "cleanseAttribute": "DeliveryAddress2"
  }

to

{
    "attribute": "configuration/entityTypes/Location/attributes/AddressLine2",
    "mandatory": false,
    "allValues": false,
    "cleanseAttribute": "SubBuilding"
  }

Remove this part if you are not using the SubBuilding attribute in the Location.   This is not mandatory. However, in the case of the SubBuilding attribute present, it will be filled with the value together with the AddressLine2. 

  {
    "attribute": "configuration/entityTypes/Location/attributes/SubBuilding",
    "mandatory": false,
    "allValues": false,
    "cleanseAttribute": "SubBuilding"
  }

Make sure that following the cleansing property of the physical tenant configuration.

"cleanse": [
        {
            "cleanseFunction": "Loqate",
            "options": {
                "process": "v+g",
              "loqateKey": "<loqate key>",
              "loqateLicensedCountry": "United States;US;USA",
                "ovOnly": "true",
                "returnUnverifiedStatus": "true",
                "loqateDefaultCountry": "US",
                "opts": {
                  "SuppressAddressFields": ["Organization", "Building"],
                    "PreferPrimaryValidAlias": "Yes"
                }
            }
        },
Was this article helpful?
0 out of 0 found this helpful

Comments

1 comment
  • Hi Gloria,

     

    Thank you for sharing this information but is there any way to remove "FL 3" from address line 1.

    Thanks,

    Harsha

    0

Please sign in to leave a comment.