Use Case 1: Create a State-Specific Primary Address Flag

This use case creates a flag for customers who live in a specific state.

Raw Data Goal
The field City State in the format: City, State Abbreviation. For example, San Francisco, CA, or New York, NY. Create the formula field “Is California” with {TRUE, FALSE} values. Return TRUE if the State Abbreviation is “CA”.
  1. For Field Label, enter Is California.
  2. For Formula Return Type, select Text.
  3. In the syntax editor, enter the formula: IF(EXTRACT(sourceField['City State'], ",", 1) == "CA", "TRUE", "FALSE").

    Use the == operator to check the equality or difference between values on both sides of the operator.

  4. In the test input box, validate the formula using these combinations.
    • “City State” with the value of “San Diego, CA” returns “TRUE”.
    • “City State” with the value of “Los Angeles, CA” returns “TRUE”.
    • “City State” with the value of “New York, NY” returns “FALSE”.
  5. Click Save.
  6. Verify that “Is California” is added as a field.