Get Cities By Zips
- 30 Jan 2023
- 1 Minute to read
- Print
- DarkLight
Get Cities By Zips
- 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 | 8.1.0 |
Location | Integration > USPS |
The Get Cities By Zips step returns the list of cities of the specified zip codes.
Prerequisites
This step requires the USPS module to be installed before it will be available in the toolbox.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Zip 5 Codes | The list of zip codes | List of String |
Outputs
Property | Description | Data Type |
---|---|---|
Output | The part of the string that was extracted. | List of String |
Example Inputs and Outputs
Input | Output |
---|---|
23455, 23606 | VIRGINIA BEACH, NEWPORT NEWS |
2344, 23325 | EXCEPTION MESSAGE |
23456 | VIRGINIA BEACH |
Null | EXCEPTION MESSAGE |
Empty | EXCEPTION MESSAGE |
Common Errors
ZIPCode must be 5 characters
If one of the zip codes entered is less than 5 characters, the step will cause an error.
To correct this, ensure each zip code is correctly formatted.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Cities By Zips 1[GetCitiesByZips] in flow [Flow 1]: Exception invoking method GetCitiesByZips on class USPSSteps
---> DecisionsFramework.LoggedException: Exception invoking method GetCitiesByZips on class USPSSteps
---> Decisions.USPS.USPSException: ZIPCode must be 5 characters at Decisions.USPS.USPSSteps.GetCitiesByZips(String[] zip5Codes)
--- 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 Zip Code
If the USPS module does not find one of the zip codes entered, the step will cause an error.
To correct this, ensure that all zip codes entered or mapped are correct.
Exception Message:
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Cities By Zips 1[GetCitiesByZips] in flow [Flow 1]: Exception invoking method GetCitiesByZips on class USPSSteps
---> DecisionsFramework.LoggedException: Exception invoking method GetCitiesByZips on class USPSSteps
---> Decisions.USPS.USPSException: Invalid Zip Code. at Decisions.USPS.USPSSteps.GetCitiesByZips(String[] zip5Codes)
--- 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 ---
Was this article helpful?