Get Zip By City
- 30 Jan 2023
- 1 Minute to read
- Print
- DarkLight
Get Zip By City
- Updated on 30 Jan 2023
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 7.1.0 |
Location | Integration > USPS |
The Get Zip By City step returns the zip code of the specified city.
Prerequisites
This step requires the USPS module to be installed before it will be available in the toolbox.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Address1 | Defines the first line of the desired address | String |
Address2 | Defines the second line of the desired address | String |
City | Defines the city of the address | String |
State | The 2 letter abbreviation of the state (ie. VA for Virginia) | String |
Outputs
Property | Description | Data Type |
---|---|---|
Output | Outputs the zip code of the specified address | String |
Example Inputs and Outputs
Address1 | Address2 | City | State | Output |
---|---|---|---|---|
650 Providence Road | Null | Chesapeake | VA | 23325 |
4850 West Road | Suite 112 | Norfolk | CA | EXCEPTION MESSAGE |
Null | Apartment 102 | El Paso | TX | EXCEPTION MESSAGE |
Empty | Ignore | Richmond | VA | EXCEPTION MESSAGE |
Common Errors
Address Not
If the Address1 field has a null or empty value, the step will cause an error.
To correct this, ensure the value entered or mapped to the field is valid.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Zip By City 1[GetZipByCity] in flow [Flow 1]: Exception invoking method GetZipByCity on class USPSSteps
---> DecisionsFramework.LoggedException: Exception invoking method GetZipByCity on class USPSSteps
---> Decisions.USPS.USPSException: Address Not Found.
at Decisions.USPS.USPSSteps.GetZipByCity(String address1, String address2, String city, String state)
--- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Invalid City
If the City or State values are null, empty, or invalid, the step will cause an error.
To correct this, ensure that the values for the fields are mapped or entered correctly.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Zip By City 1[GetZipByCity] in flow [Flow 1]: Exception invoking method GetZipByCity on class USPSSteps
---> DecisionsFramework.LoggedException: Exception invoking method GetZipByCity on class USPSSteps
---> Decisions.USPS.USPSException: Invalid City.
at Decisions.USPS.USPSSteps.GetZipByCity(String address1, String address2, String city, String state)
--- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Related Information
Forum Posts:
USPS Module Example: Get City & State By Zip
USPS Address Verification Service
Get State From Zip
Was this article helpful?