Getting Started with Order Intake Classifying Services and Applying Rules

When a new order comes into the system, it needs to be accurately reflected in your Monday.com workspace. To keep board titles clean and ensure the right teams are notified, the system automatically analyzes incoming line items, assigns shorthand "Title Codes," and applies "Swallow Rules" to bundle related services together.

This page explains how the automated classification engine (often referred to as the "Consolidated Brain") processes your order data.

The Consolidated Brain

Behind the scenes, a single automated step handles fetching order data, classifying services, calculating differences, and updating Monday.com. This ensures your boards always reflect the latest source of truth.

How the classification engine works

The system runs a sequential process to evaluate incoming orders and update your workspace.

flowchart TD
    A["Fetch Monday Data"] --> B["Fetch HDPH Order"]
    B --> C["Classify Services"]
    C --> D["Apply Title & Swallow Rules"]
    D --> E["Calculate Differences"]
    E --> F["Update Monday.com"]
  1. 1

    Fetch current data

    The system pulls the existing subitems from Monday.com and the latest order data from the HDPH (HarmonPS) API.

  2. 2

    Classify services

    Line items are scanned for specific keywords to determine if the order requires special handling, such as Rush delivery, Travel fees, or Appraisals.

  3. 3

    Apply Title Codes and Swallow Rules

    Long product names are converted into short Title Codes (e.g., "Marketing Kit" becomes "MK"). Then, Swallow Rules are applied to hide individual items that are already included in a larger package.

  4. 4

    Calculate differences and update

    The system compares the HDPH order to Monday.com. HDPH is treated as the source of truth—any missing items are added, and any removed items are deleted from Monday.com.

Because HDPH is the source of truth, manual changes made to subitems in Monday.com may be overwritten during the next sync if they do not match the HDPH order.

Service classification

Before assigning codes, the system reads the names of the line items to flag important order details. This is done using simple keyword matching:

  • Rush: Flags as Rush if the order contains "same day rush" or "cp-rush". Flags as AMRush for "morning rush". Otherwise, it defaults to Standard.

  • Measurement: Flags as Yes if the order contains "measurement" or "inspection".

  • Amenities: Flags as Yes if the order contains "amenit".

  • Appraisal, Matterport, Travel: Flags accordingly if these exact words appear in the line items.

Title Codes and Swallow Rules

To keep order titles readable, the system translates verbose product names into concise Title Codes. For example, "Drone Videography Neighborhood Amenities" becomes DVA.

What are Swallow Rules?

Swallow Rules prevent redundant codes from cluttering your board. If a customer orders a comprehensive package, the individual services included in that package are "swallowed" (hidden) by the package's main code.

For example, the Essentials (ES) package automatically includes Measurement (M), Photography (P), MLS Data (MLS), and a Marketing Kit (MK). If the system sees ES, it will swallow M, P, MLS, and MK so they don't appear separately in the final title.

Common Swallow Rules

Parent CodePackage NameSwallowed Codes (Hidden)
ESEssentialsM, P, MLS, MK
M/PDetailed Measurement & PhotographyM, P
SF/PBasic Measurement & PhotographySF, P
M/P/BRecommended Rental BundleM, P, B
M/P/Z3DPapa Manual Order / Boost It!M, P, Z3D
ESZ3DEssentials Z3DM, P, MLS, MK, Z3D
UPUltimate ProD2D, MK, D, DNA, ZSD, P, H, MLS, VD/DR, Z3D

Stock Amenity detection

The system specifically looks for "Stock Neighborhood Amenities" to ensure they are routed correctly. An item is flagged as a Stock Amenity if it meets any of the following criteria:

  1. Product ID Match: Matches known stock IDs (e.g., 245474, 314325).

  2. Exact Name Match: Named exactly "neighborhood amenity photos sk" or "drone neighborhood amenity photos sk".

  3. Keyword Match: Contains the word "stock" alongside either "amenit" or "neighborhood".

When detected, the Neighborhood Amenity (NA) status is automatically set to Stock.


Technical Details: The Consolidated Brain Script

For administrators configuring the automation, the classification engine runs as a consolidated JavaScript code step. It requires the following inputs to function:

  • mondayApiToken: Your Monday.com API token (API Version 2024-01).

  • hdphApiKey: Your HDPH API key for fetching order data.

  • itemId: The Monday.com Pulse ID for the order.

  • orderName: The HDPH Order ID/Name.

  • currentNAStatus: The current Neighborhood Amenity status from Monday.com.

The script outputs a comprehensive JSON object containing the calculated TitleCodes, the add/remove/update diff counts, and a human-readable Log string detailing exactly how the order was classified.