cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
4995members
1526posts
This is a verified product documentation article. For case-based resolutions articles, please reference the Knowledge Base section of Invoca Community.
sreynolds1
Employee
Employee

Contents of this Article

Overview

Formula Fields allow you to calculate new data, typically by creating a formula that references or alters existing Marketing Data Fields or Signals. Using formulas that work similar to Excel, you can use Invoca or custom-written functions to calculate new data to enrich dashboards and reports.


Use Cases

Note: Invoca's formula-based functionality is currently limited to categorizing Marketing Channel performance. This is just the first step—we're exploring additional formula-based features to bring you even more functionality.

  • Categorizing your Marketing Channel

    Understanding the impact of your marketing efforts requires accurate channel attribution. Customized formula fields let you automatically assign marketing channels using your existing UTM data. Just input your attribution parameters into our Marketing Channel formula, and the formula will assign the relevant channel. Invoca has built a standardized Marketing Channel based on industry best practices, which you can use to get started.

Creating and Editing a Formula Field

Formula Fields are a new feature that will be rolled out gradually. Initially, interacting with Formula Fields will be limited to editing Marketing Data Fields where Invoca has already attached a default formula. For most, this means you'll be able to edit the formula attached to the Marketing Channel field.

Note: Look for the (f) icon on your Marketing Data Dictionary page to identify fields with an attached formula. 

Note: Formulas are processed on a per-call basis, applying to each row of Invoca data individually. This feature does not support multi-row or aggregate calculations (e.g., adding totals across multiple calls).

To edit a Formula Field, follow the following steps.

Note: You must be a Super User to edit a Marketing Data Field.

  1. Navigate to Settings:

    From the main menu, select Settings, then Marketing Data.

    Formula Fields 1.png












  2. Select Field for Editing:

    Locate the Marketing Data Field you wish to edit and click its Edit icon.

    Note: Initially you can only edit fields that Invoca has added a formula to. These fields are indicated by an (f) icon in the Marketing Data Dictionary.

    Formula Fields 2.png

  3. Access Formula Section:

    On the Edit Marketing Data Field page, scroll down to the Formula (optional) section.

    Screenshot 2025-08-11 at 8.35.54 AM.png

  4. Open Formula Editor:

    Click the Edit and Preview button. This will open a new modal window.

    Screenshot 2025-08-11 at 8.35.54 AM copy.png

  5. Adjust Formula:

    In the Formula input box, make your desired changes to the formula.

    Screenshot 2025-08-11 at 8.13.53 AM.png

  6. Preview Changes:

    Click the Refresh button to see how your changes impact the data. A summary of the changes will appear in the Preview with call data table.

    Screenshot 2025-08-11 at 8.13.53 AM copy.png

  7. Apply or Cancel Changes:

    • To Apply:

      If you are satisfied with your edits, click Apply to save the new formula and return to the Edit Marketing Data Field page. 

      Note: Formula changes will not be fully saved until you click Save on the Edit Marketing Data Field page.

    • To Cancel:

      If you are not satisfied, click Cancel to discard your edits. This will return you to the Edit Marketing Data Field page, and your previously saved formula will remain.

      Screenshot 2025-08-11 at 8.13.53 AM copy 2.png

Editing an Invoca formula is very similar to editing a formula in Microsoft Excel. Both platforms utilize a structured syntax to perform calculations and manipulate data. Just like in Excel, you'll use functions, operators, and references to define your desired output.


Data Types

To help you write effective formulas, it's important to understand the different types of data you'll be working with.

Invoca Feature

Data Type

Description

Example Formula

Marketing Data Fields

Short Text, Category*

Referenced by Partner (API) Name. Defaults to "" (empty string) if no value present.

utm_medium

Invoca Reporting Fields

Short Text, Category*

Referenced by Invoca Reporting Field Name. Defaults to "" (empty string) if no value present.

invoca.media_type

Signals

Boolean

Referenced by Name. Use backticks (`) around names that contain spaces or any punctuation other than an underscore (_) or period (.). Defaults to False if no value present.

`Answered by Agent`

* Note: Long Text fields (e.g., URLs) are not supported in Formula Fields at this time.


Functions

Name Description
Example
ABS Returns the absolute value of a number (the positive equivalent).
=ABS(call_duration)
AND Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE.
=AND(call_duration > 60, call_result = "Conversion")
AVERAGE Returns the average (arithmetic mean) of its arguments.
=AVERAGE(call_duration, call_ring_time)
CEILING Rounds a number up to the nearest integer or to the nearest multiple of significance.
=CEILING(call_cost_per_call, 1)
CONCAT Joins two or more text strings into one text string.
=CONCAT(campaign_name, " - ", call_result)
FLOOR Rounds a number down to the nearest integer or to the nearest multiple of significance.
=FLOOR(call_cost_per_call, 1)
IF Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE.
=IF(call_result = "Conversion", "Converted", "Not Converted")
IFS Checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition.
=IFS(call_duration < 30, "Short", call_duration < 120, "Medium", call_duration >= 120, "Long")
LEFT Returns the first character or characters from a text string, based on the number of characters you specify.
=LEFT(traffic_source_name, 5)
LEN Returns the number of characters in a text string.
=LEN(call_caller_id)
NOT Reverses the logic of its argument.
=NOT(call_result = "Spam")
OR Checks whether any of the arguments are TRUE, and returns TRUE if any argument is TRUE.
=OR(ad_campaign_name = "Summer Sale", ad_campaign_name = "Spring_Promo")
REGEXTEST Tests if a text string matches a regular expression pattern. Returns TRUE if the pattern is found within the text, and FALSE otherwise. Allows control over case sensitivity.
=REGEXTEST(landing_page_url, ".*invoca\\.com/.*", 0)
RIGHT Returns the last character or characters from a text string, based on the number of characters you specify.
=RIGHT(campaign_name, 4)
ROUND Rounds a number to a specified number of digits.
=ROUND(call_cost_per_call, 2)
SUM Calculates the sum of a series of numbers or cells in an Excel-like formula.
=SUM(call_cost_per_call, call_credit_amount)
SWITCH Compares an expression to a list of values and returns the result corresponding to the first match. If no match is found, an optional default value can be returned.
 
=SWITCH(call_result, "Conversion", "Success", "No Answer", "Missed", "Spam", "Junk", "Other")


Operators

Name Description
Example
= Equal to
=call_result = "Conversion"
> Greater than
=call_duration > 120 (e.g., for calls over 2 minutes)
< Less than
=call_ring_time < 10
>= Greater than or equal to
=call_revenue >= 50
<= Less than or equal to
=call_cost <= 100
<> Not equal to
=call_type <> "Spam"
+ Addition
=call_cost + call_estimated_revenue
- Subtraction
=call_duration - call_ring_time
* Multiplication
=call_cost * 1.25 (e.g., to account for a margin)
/ Division
=call_revenue / call_duration (revenue per second)
% Percent
=call_cost * 15% (e.g., to calculate a commission)

 

Examples

Adding a New Marketing Channel

Note: 
Visit this learning resource in Invoca Academy for best practices on adding a new marketing channel.

In this example, you have a Marketing Data Field named "Marketing Channel". The field has a formula that uses UTM parameter data to assign a marketing channel value. You would like to update the formula to account for a new type of marketing spend (e.g., "AI Search"). 

Note: You must be a Super User to edit a Marketing Data Field.

  1. Navigate to Settings:

    From the main menu, select Settings, then Marketing Data.

  2. Select Field for Editing:

    Locate the "Marketing Channel" field (it will have an (f) icon) and select its Edit icon.

  3. Navigate to the Formula Section:

    On the Edit Marketing Data Field page, scroll down to the Formula (optional) section.

  4. Open Editor:

    Click the Edit and Preview button. A new modal window will open, displaying your current formula.

  5. Adjust the Formula Input Box:
    • Add the 'AI Search' condition.

      To add a new condition, it's often best to add a new row to your existing formula. Assuming you are using Invoca's default Marketing Channel formula, the updated formula should look similar to the example below, with "AI Search" added in the third line.
      =IFS(
        REGEXTEST(CONCAT(utm_medium, ";", utm_source), "video"), "Video",
        REGEXTEST(CONCAT(utm_medium, ";", utm_source), "display"), "Display",
        REGEXTEST(CONCAT(utm_medium, ";", utm_source), "ai( )?search"), "AI Search",
       ...
        TRIM(CONCAT(utm_medium, utm_source)) = "", "No UTM parameter data",
        TRUE, "Uncategorized Channel"
      )​


      Review your uncategorized calls to find opportunities to map new channels, like AI Search.Review your uncategorized calls to find opportunities to map new channels, like AI Search.

  6. Click the Refresh button.

  7. Confirm availability of new channel:

    You should now see calls mapping to "AI Search" in the Preview Table.

    After editing, confirm your new channel is displaying before saving.After editing, confirm your new channel is displaying before saving.


  8. Apply and Save Changes:
    • If you are satisfied with how your changes appear in the preview, click the Apply button. This will close the modal window and return you to the Edit Marketing Data Field page.

    • Important: To finalize your changes, you must then click the Save button on the Edit Marketing Data Field page. Your new formula will now be active for all incoming and historical call data associated with this field, ensuring your reports reflect the updated categories and terminology.

    • If you are unsatisfied and wish to discard your edits, click Cancel in the modal window. This will return you to the Edit Marketing Data Field page, and your previously saved formula will remain.

Availability in Invoca

Formula Fields in Invoca are a powerful new way to create custom data. This data is calculated on-the-fly, right within the Lead Conversion Dashboard, by applying your defined formulas to existing call data fields.

Why it matters:

  • Retroactive Insights:

    Gain quick access to historical perspective. As long as the data used in your formula (e.g., utm_medium, utm_source) existed for past calls, your Formula Fields can be calculated for historical dates, allowing you to re-segment and analyze past performance with new criteria.

Important Notes:

  • Formula Field data is currently accessible only within the Lead Conversion Dashboard. It will not appear in other dashboards or reports at this time.
  • Initially, you can only edit formulas that have an assigned, default formula (e.g., "Marketing Channel"). Our team is actively working to expand new capabilities for both editing and creating Formula Fields in the future.

Frequently Asked Questions

What types of data are supported in Formula Fields?

Formula Fields can be used with Signals and most Marketing Data Fields. Specifically, you can use Short Text and Category Marketing Data Fields.

Note: Long Text fields cannot be referenced in a Formula Field.

To confirm the data type of any Marketing Data Field, please consult the Marketing Data Dictionary.

For Marketing Channel categorization, what is the difference between the "Uncategorized Channel" and "No UTM parameter data" groups?

In your marketing channel categorization, these two groups indicate different issues:

  • "No UTM parameter data" means the call or interaction lacked the standard web tracking information (UTM parameters) typically used to identify its source. This often points to direct traffic, untracked offline campaigns, or tracking setup issues.
  • "Uncategorized Channel" means the call or interaction had some data, but it didn't match any of your predefined channel rules. This suggests you might have new traffic sources, mismatched data, or your existing rules need refinement.

What you can do:

Understanding this distinction helps you troubleshoot. "No UTM parameter data" highlights potential tracking gaps, while "Uncategorized Channel" indicates areas where your channel categorization rules need to be expanded or adjusted.

For Marketing Channel categorization, why isn’t my data showing up in reports and dashboards (e.g., Custom Summary Report)?

Formula Field data is currently accessible only within the Lead Conversion Dashboard. It will not appear in other dashboards or reports at this time.

Appendix

Invoca's normalized Marketing Channel formula

Invoca's default Marketing Channel formula uses UTM parameter data to assign calls to industry-standard marketing channels.

# Formula categorizes calls into marketing channels based on UTM parameter data.
# To customize or add channels, see our help documentation. version: 1
=IFS(
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "video"), "Video",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "display"), "Display",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "referral"), "Referral",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "affiliate"), "Affiliate",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "email"), "Email",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "listing|gmb|google( )?business"), "Listings",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "billboard"), "Billboard",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "radio"), "Radio",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "paid( )?social"), "Paid Social",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "cpc|paid|ggl|ppc"), "Paid Search",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "gce|call( )?ext"), "Call Extensions",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "organic( )?social"), "Organic Social",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "organic"), "Organic Search",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "direct"), "Direct",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "print|newspaper|magazine|flyer|brochure"), "Print",
  REGEXTEST(CONCAT(utm_medium, "|", utm_source), "tv|television"), "TV",
  TRIM(CONCAT(utm_medium, utm_source)) = "", "No UTM parameter data",
  TRUE, "Uncategorized Channel"
)

 

Related Resources

Need more help?

Don't see what you are looking for? You can ask the Community or contact support.