Use the “Format Data” automation action

ActiveCampaign plans
Starter
Plus
Pro
Enterprise

The “Format Data” action helps you clean up or change data in contact, deal, and account fields using ActiveCampaign automations. This can help you maintain clean, consistent, and up-to-date data.

Take note

  • The operations available in the Format Data action are based on your plan
  • When using deal fields, to ensure that the Format Data action changes apply to the correct deal, we recommend using deal fields only in automations with a deal trigger. The deal that triggered the automation is used by default. If no deal trigger is used, the most recently created deal for the contact is used instead

How the “Format Data” action works

The “Format Data” action offers different options to choose from.

  • Copy field values
  • Add or remove time from a date field
  • Extract phone numbers or URLs
  • Perform math
  • Capitalize a field

To set up an operation, you will be asked for an input and an output field. Depending on your ActiveCampaign Email plan, you can use any contact, deal, or account fields with this action.

Input Field

  • This is where we take the value from.
  • If there's no value, the contact will skip this action.

Output Field

  • This is where the new, formatted value is saved.
  • You can choose to update the same field or send it to a different field of the same type.

"Copy field values" option

Available on Plus, Professional, and Enterprise plans. 

This option allows you to select any Contact, Deal, or Account field and copy its value to another field of a similar type. See the table below for compatible field types:

These field types: Can be mapped to these field types:
Text or Text Area Text, Text Area, Date, Datetime, Number, Hidden, Money (set to Default Currency)
Date Date, Datetime (set to 12:00:00), Text, Text Are
Datetime Date (remove time value), Text, Text Area
Dropdown Dropdown, Radio, Listbox, Text
Checkbox Checkbox, Text
Listbox Listbox
Number Number, Text, Text Area, Money (set to Default Currency)
Money Number (remove Currency), Text, Text Area
Radio Radio, Dropdown, Text, Text Area
Hidden Text, Text Area


Contacts will skip this automation action if:

  • They do not have a related Deal or Account record
  • There is an incompatible input value for the field type that is being mapped to

Step-by-step instructions

  1. From your automation, click on the (+) node where you want to add the action.
  2. Click “Workflow” > “Format Data.” Alternatively, you can use the search field in the “Add an Action” window to locate this action.
  3. Click the “Copy field values” option.
  4. Click the “From which field?” dropdown and select the field you want to copy.
  5. Click the “To which field?” dropdown to select the field to which you want to copy the value.
  6. Click “Save” when finished.

“Extract phone numbers or URLs” option

Available on Plus, Professional, and Enterprise plans.

This option works with standard text, custom text, and text area fields. 

The “Extract phone numbers or URLs” action allows you to extract a phone number or URL from an existing contact, account, or deal field and format it accordingly.

Extract phone number

When extracting phone numbers, the system will look for a phone number in the input field provided and format it to one of the three following options:

  • E.164 (recommended if you are using SMS or WhatsApp, and is the standard used by all international carriers)
  • National format
  • International format

You can select a 'Default country code' to use when a phone number doesn't include one. If the input already contains a country code, it will be used. If it doesn’t have one or the code doesn’t match any known format, the selected 'Default country code' will be applied instead.

Extract URL

When extracting URLs, the system will look for a web address in the input field provided and format it to one of the following options:

  • Domain
  • Protocol (includes https://)

In addition, you can choose to include or trim additional URL path information in the output with one of the following options:

  • Include paths
    • Example: www.example.com/my/page
  • Trim paths

“Capitalize a field” option

Available on Plus, Professional, and Enterprise plans.

This option works with standard text, custom text, and text area fields. 

The “Capitalize a field” operation within Format Data lets you capitalize text within a contact, account, or deal field to a selected output.

You have four capitalization outputs to choose from:

  • Title Case
  • Sentence Case
  • Proper Case
  • Upper Case
  • Lower Case

  Title Case formatting is not recommended for non-English language text strings. The system cannot accurately detect which characters should be capitalized.

“Add or remove time from a date field” option

Available on Professional and Enterprise plans.

This option works with date or datetime fields.

The “Add or remove time from a date field” option lets you add or subtract a specified number of days from a given date or datetime contact, account, or deal field to a selected output.

  When using datetime fields, only the date will be affected. The time will not change.

“Perform math” option

Available on Professional and Enterprise plans.

The "Perform Math" option lets you perform calculations on numeric Contact, Deal, and Account custom fields. You can do math using values from Text, Text Area, Number, or Money fields.

 The value in the fields you select must be a numeric value, or the action will be skipped.

With this action, there are two ways you can adjust the value of an existing field: Basic Math (add, subtract, multiply, or divide) or the Advanced Math function. 

Step-by-step instructions

  1. Click Automations on the left menu.
  2. Edit the automation to which you want to add the "Perform Math" operation.
  3. Click the node (+) where you want to add the action.
  4. In the "Add an action" modal, click "Workflow" > Format Data > "Perform Math" to add it to your automation.
  5. In the “Value 1” field, either click the lightning bolt icon to add an existing field or input a numerical value 

      You can enter a number in one of the value fields, but at least one value field must use an existing field to save the action.

  6. In the next field, click the dropdown and choose a math function for the action. You can choose from Added to, Minus, Multiplied by, and Divided by.
  7. In the “Value 2” field, either click the lightning bolt icon to add an existing field or input a numerical value.

      You can enter a number in one of the value fields, but at least one value field must use an existing field to save the action.

  8. (Optional) Use “Advanced math.” Enter a mathematical formula using common keyboard characters for up to 25 fields. Learn about supported characters with “Advanced math.”
  9. In the “Output” field, click the dropdown and choose an existing field where the result of the “Perform math” operation will be updated. 

  All output values are rounded to the 4th decimal place if the output value is not a whole number.

Supported characters for Advanced Math

When using the advanced math function within the “Perform Math” operation, the following characters are supported:

Character Operation
+ Add
- Subtract
* Multiply
/ Divide
. Decimal place
() Order of operations

 

  When attempting to use non-whole numbers (i.e. percentages or fractions) you must express them using decimals.

Have more questions? Get in touch

Start free trial