Account details helper flow
Note
This flow is self-documenting and should be viewed within Salesforce (Setup > Process Automations > Flows). This document is to support working through a visual flow. Please note: the flow commentary is produced using AI.
Overview#
Flow name: MoveData_Donation_Helper_Set_Account_Details Label: [MoveData] Donation: Helper - Set Account Details Type: Auto-Launched Flow Template API version: 60.0 Status: Active
This helper flow handles the transformation and validation of account data from external platforms, providing field formatting and dual address processing capabilities for both billing and shipping addresses.
Purpose#
The flow provides account data processing that:
- Sets basic account information (phone, website, type)
- Processes address data with dual field routing (billing vs shipping)
Salesforce fields#
This flow interacts with the Salesforce Account object and its related fields. Below is a mapping of all fields utilised:
| Field API name | Field type | Purpose in flow |
|---|---|---|
| Name | Text | Account name identifier |
| Phone | Phone | Primary phone number |
| Website | URL | Account's primary website URL |
| Type | Picklist | Categorises the type of account |
| BillingStreet | Textarea | Street address for billing |
| BillingCity | Text | City for billing address |
| BillingState | Text | State/Province for billing |
| BillingCountry | Text | Country for billing address |
| BillingPostalCode | Text | Postal/ZIP code for billing |
| ShippingStreet | Textarea | Street address for shipping |
| ShippingCity | Text | City for shipping address |
| ShippingState | Text | State/Province for shipping |
| ShippingCountry | Text | Country for shipping address |
| ShippingPostalCode | Text | Postal/ZIP code for shipping |
Input variables#
Core account data#
| Variable | Type | Required | Description |
|---|---|---|---|
Record |
Account SObject | Yes | The Account record being processed |
Phone |
String | No | Account's phone number |
Website |
String | No | Account's website URL |
Type |
String | No | Account type classification |
Address data#
| Variable | Type | Description |
|---|---|---|
MailingAddress_Street |
String | Street address |
MailingAddress_City |
String | City |
MailingAddress_State |
String | State/Province |
MailingAddress_StateCode |
String | State/Province code |
MailingAddress_Country |
String | Country |
MailingAddress_CountryCode |
String | Country code |
MailingAddress_Postcode |
String | Postal/ZIP code |
Configuration variables#
| Variable | Type | Default | Description |
|---|---|---|---|
Config_AccountIgnorePhone |
Boolean | false | Skip phone processing |
Config_AccountIgnoreWebsite |
Boolean | false | Skip website processing |
Config_AccountIgnoreAddress |
Boolean | false | Skip all address processing |
Config_AccountUseCountryCode |
Boolean | false | Use country code instead of country name |
Config_AccountUseStateCode |
Boolean | false | Use state code instead of state name |
IgnoreType |
Boolean | false | Skip type processing |
Use_Billing_Address |
Boolean | true | Use billing vs. shipping address fields |
Output variables#
| Variable | Type | Description |
|---|---|---|
Record |
Account SObject | Updated account record with processed data |
Flow logic#
1. Phone processing#
The flow first processes the phone number:
- Null check: Uses
PhoneLengthformula to validate phone presence - Configuration check: Skips if
Config_AccountIgnorePhone = true - Field assignment: Sets
Record.Phonewhen phone exists
2. Website processing#
Handles website URL assignment:
- Null check: Uses
WebsiteLengthformula to validate website presence - Configuration check: Skips if
Config_AccountIgnoreWebsite = true - Field assignment: Sets
Record.Websitewhen website exists
3. Type processing#
Manages account type classification:
- Configuration check: Skips if
IgnoreType = true - Null check: Only sets type when provided and account type is empty
- Conditional logic: Uses complex condition to check if Record.Type needs updating
- Field assignment: Sets
Record.Typewith provided type value
4. Country and state code processing#
Handles the transformation between full names and codes for countries and states:
- Country code evaluation: If
Config_AccountUseCountryCode = trueand country code is provided, replaces country name with country code - State code evaluation: If
Config_AccountUseStateCode = trueand state code is provided, replaces state name with state code
5. Address field processing#
Comprehensive address handling with dual field support:
Address field selection#
The flow routes address data to either billing or shipping fields based on Use_Billing_Address:
- Billing address: BillingStreet, BillingCity, BillingState, BillingCountry, BillingPostalCode
- Shipping address: ShippingStreet, ShippingCity, ShippingState, ShippingCountry, ShippingPostalCode
Error handling#
- Null value management: Graceful handling of empty/null values through length validation
Dependencies#
None