AUTOMATION Β· 7 min lezen

Free Apex code: automatically split addresses in Salesforce

Take an address like "Oak Street 9A" and automatically extract street, house number and suffix. Perfect for Flows, integrations and data quality.

Why this is useful

  • Always clean address fields

    Automatically separate street, number and suffix.

  • Works in Flow

    Invocable Action, usable in Before/After Save.

  • Suitable for multiple objects

    Account, Contact, Lead or Contract.

Download the complete ZIP

You'll receive the class, test class, README and license by email. In your inbox within 1 minute.

How does this Apex action work?

  1. Flow sends a complete address to the action
  2. The action splits the address into street, number and suffix
  3. Flow uses these 3 values directly in your logic
  4. You can reuse the same action in other Flows
InputStreetNo.Suffix
Kerkstraat 12AKerkstraat12A
Dorpsplein 7-1Dorpsplein71
View the Apex code
@InvocableMethod(label='Address | Split Street into Components') public static List<Result> run(List<Input> inputs) { /* ... */ }

You'll receive the complete ZIP by email.

Who is this for?

  • Admins working with Flow
  • Consultants working with address validation
  • Teams connecting to external credit/postal code APIs

Need custom development for your Salesforce environment?

We develop Apex solutions that perfectly match your processes β€” scalable, tested and well documented.