{
  "accounts_classification_source": "classifier",
  "accounts_classifier": {
    "confidence": "high",
    "effective": true,
    "evidence": [
      "invoice reference 138904 matched the email content",
      "strong accounts wording detected: invoice, payment link",
      "payment wording supported invoice context: payment"
    ],
    "invoice_matches": [
      {
        "evidence": "subject contained invoice reference 138904",
        "match_text": "Invoice 138904",
        "score": 96,
        "source": "subject",
        "sources": [
          "primary_body",
          "secondary_body",
          "subject"
        ],
        "value": 138904
      }
    ],
    "medium_keyword_hits": [
      "payment"
    ],
    "score": 100,
    "strong_keyword_hits": [
      "invoice",
      "payment link"
    ]
  },
  "accounts_override": null,
  "ai_count": 0,
  "ai_last_error": null,
  "ai_last_processed_at": null,
  "ai_processing": false,
  "ai_processing_started_at": null,
  "ai_textfield": null,
  "allocated_date": null,
  "allocated_to": "",
  "body_html": "<p>Dear Haigh Environmental Co. Ltd (Spares) ,</p><p>Please find enclosed a copy of your invoice 138904 dated 23/04/2026 .</p><p>If you have a Direct Debit in place this will be automatically collected at the end of the month.</p><p>Bank details are on the invoice if you would like to make payment via internet banking.</p><p>If you wish to make payment by PayPal please use the PayPal link below:</p><p>Pay Pal</p><p>If you wish to make payment via credit card or Apple Pay, please use the Stripe Payment link below:</p><p>Stripe</p><p>If you would like to discuss anything relating to the invoice, please call on 01296 634500 selecting Option 2 or via email on carolinem@keeservices.com or roym@keeservices.com</p>",
  "body_text": "Dear Haigh Environmental Co. Ltd (Spares) ,\n\nPlease find enclosed a copy of your invoice 138904 dated 23/04/2026 .\n\nIf you have a Direct Debit in place this will be automatically collected at the end of the month.\n\nBank details are on the invoice if you would like to make payment via internet banking.\n\nIf you wish to make payment by PayPal please use the PayPal link below:\n\nPay Pal\n\nIf you wish to make payment via credit card or Apple Pay, please use the Stripe Payment link below:\n\nStripe\n\nIf you would like to discuss anything relating to the invoice, please call on 01296 634500 selecting Option 2 or via email on carolinem@keeservices.com or roym@keeservices.com",
  "calls_classification_source": "default",
  "calls_override": null,
  "cc_email": "",
  "closed_date": null,
  "contact_email": "carolinem@keeservices.com",
  "contact_id": 269,
  "contact_is_safe": true,
  "contact_name": "Caroline Maybourne",
  "contact_open_url": "/contacts?open=269&search=carolinem%40keeservices.com",
  "contact_type": "b2b",
  "display_body_html": "<p>Dear Haigh Environmental Co. Ltd (Spares) ,</p><p>Please find enclosed a copy of your invoice 138904 dated 23/04/2026 .</p><p>If you have a Direct Debit in place this will be automatically collected at the end of the month.</p><p>Bank details are on the invoice if you would like to make payment via internet banking.</p><p>If you wish to make payment by PayPal please use the PayPal link below:</p><p>Pay Pal</p><p>If you wish to make payment via credit card or Apple Pay, please use the Stripe Payment link below:</p><p>Stripe</p><p>If you would like to discuss anything relating to the invoice, please call on 01296 634500 selecting Option 2 or via email on carolinem@keeservices.com or roym@keeservices.com</p>",
  "display_body_invalid_reason": "",
  "display_body_source": "text/html",
  "display_body_text": "Dear Haigh Environmental Co. Ltd (Spares) ,\n\nPlease find enclosed a copy of your invoice 138904 dated 23/04/2026 .\n\nIf you have a Direct Debit in place this will be automatically collected at the end of the month.\n\nBank details are on the invoice if you would like to make payment via internet banking.\n\nIf you wish to make payment by PayPal please use the PayPal link below:\n\nPay Pal\n\nIf you wish to make payment via credit card or Apple Pay, please use the Stripe Payment link below:\n\nStripe\n\nIf you would like to discuss anything relating to the invoice, please call on 01296 634500 selecting Option 2 or via email on carolinem@keeservices.com or roym@keeservices.com",
  "display_body_used_placeholder": false,
  "due_date": null,
  "duplicate_of": null,
  "effective_is_accounts": true,
  "effective_is_calls": false,
  "effective_is_internal": false,
  "effective_is_safe": true,
  "effective_is_spam": false,
  "escalated_date": null,
  "escalted_to": null,
  "extracted_entities": [
    {
      "confidence": "0.9000",
      "entity_type": "date",
      "entity_value_normalised": "2026-04-23",
      "entity_value_raw": "23/04/2026",
      "extraction_method": "regex_parse",
      "id": 638610,
      "is_primary": 1,
      "is_valid": 1,
      "notes": null,
      "rule_name": "day_slash_month",
      "rule_version": "v1",
      "source_area": "body_main",
      "source_index": 0,
      "source_subarea": "regex"
    },
    {
      "confidence": "0.9950",
      "entity_type": "email_address",
      "entity_value_normalised": "carolinem@keeservices.com",
      "entity_value_raw": "carolinem@keeservices.com",
      "extraction_method": "header_parse",
      "id": 638603,
      "is_primary": 1,
      "is_valid": 1,
      "notes": null,
      "rule_name": "header_address_parse",
      "rule_version": "v1",
      "source_area": "from_header",
      "source_index": 0,
      "source_subarea": "address"
    },
    {
      "confidence": "0.9200",
      "entity_type": "email_address",
      "entity_value_normalised": "roym@keeservices.com",
      "entity_value_raw": "roym@keeservices.com",
      "extraction_method": "regex",
      "id": 638609,
      "is_primary": 0,
      "is_valid": 1,
      "notes": null,
      "rule_name": "email_regex",
      "rule_version": "v1",
      "source_area": "body_main",
      "source_index": 1,
      "source_subarea": "regex"
    },
    {
      "confidence": "0.9400",
      "entity_type": "email_address",
      "entity_value_normalised": "carolinem@keeservices.com",
      "entity_value_raw": "carolinem@keeservices.com",
      "extraction_method": "regex",
      "id": 638605,
      "is_primary": 0,
      "is_valid": 1,
      "notes": null,
      "rule_name": "header_email_regex",
      "rule_version": "v1",
      "source_area": "from_header",
      "source_index": 0,
      "source_subarea": "regex"
    },
    {
      "confidence": "0.9950",
      "entity_type": "email_address",
      "entity_value_normalised": "accounts@mpcservices.co.uk",
      "entity_value_raw": "accounts@mpcservices.co.uk",
      "extraction_method": "header_parse",
      "id": 638606,
      "is_primary": 0,
      "is_valid": 1,
      "notes": null,
      "rule_name": "header_address_parse",
      "rule_version": "v1",
      "source_area": "to_header",
      "source_index": 0,
      "source_subarea": "address"
    },
    {
      "confidence": "0.9400",
      "entity_type": "email_address",
      "entity_value_normalised": "accounts@mpcservices.co.uk",
      "entity_value_raw": "accounts@mpcservices.co.uk",
      "extraction_method": "regex",
      "id": 638607,
      "is_primary": 0,
      "is_valid": 1,
      "notes": null,
      "rule_name": "header_email_regex",
      "rule_version": "v1",
      "source_area": "to_header",
      "source_index": 0,
      "source_subarea": "regex"
    },
    {
      "confidence": "0.9600",
      "entity_type": "invoice_reference",
      "entity_value_normalised": "138904",
      "entity_value_raw": "138904",
      "extraction_method": "regex",
      "id": 638608,
      "is_primary": 1,
      "is_valid": 1,
      "notes": null,
      "rule_name": "invoice_keyword_numeric",
      "rule_version": "v1",
      "source_area": "subject",
      "source_index": 0,
      "source_subarea": "regex"
    },
    {
      "confidence": "0.9300",
      "entity_type": "person_name",
      "entity_value_normalised": "Caroline Maybourne",
      "entity_value_raw": "Caroline Maybourne",
      "extraction_method": "header_parse",
      "id": 638604,
      "is_primary": 1,
      "is_valid": 1,
      "notes": null,
      "rule_name": "header_display_person",
      "rule_version": "v1",
      "source_area": "from_header",
      "source_index": 0,
      "source_subarea": "display_name"
    },
    {
      "confidence": "0.8600",
      "entity_type": "phone_number",
      "entity_value_normalised": "01296634500",
      "entity_value_raw": "01296 634500",
      "extraction_method": "regex",
      "id": 638611,
      "is_primary": 1,
      "is_valid": 1,
      "notes": null,
      "rule_name": "phone_regex",
      "rule_version": "v1",
      "source_area": "body_main",
      "source_index": 0,
      "source_subarea": "regex"
    }
  ],
  "extracted_entities_json": {
    "counts": {
      "company_name": 0,
      "date": 1,
      "email_address": 3,
      "invoice_reference": 1,
      "job_reference": 0,
      "money_amount": 0,
      "order_reference": 0,
      "person_name": 1,
      "phone_number": 1,
      "po_reference": 0,
      "postcode": 0,
      "quote_reference": 0,
      "url": 0
    },
    "entities": {
      "company_name": [],
      "date": [
        "2026-04-23"
      ],
      "email_address": [
        "carolinem@keeservices.com",
        "accounts@mpcservices.co.uk",
        "roym@keeservices.com"
      ],
      "invoice_reference": [
        "138904"
      ],
      "job_reference": [],
      "money_amount": [],
      "order_reference": [],
      "person_name": [
        "Caroline Maybourne"
      ],
      "phone_number": [
        "01296634500"
      ],
      "po_reference": [],
      "postcode": [],
      "quote_reference": [],
      "url": []
    },
    "last_processed_at": "2026-04-23T08:28:01Z",
    "primary": {
      "date": "2026-04-23",
      "email_address": "carolinem@keeservices.com",
      "invoice_reference": "138904",
      "person_name": "Caroline Maybourne",
      "phone_number": "01296634500"
    },
    "version": "v1"
  },
  "from_email": "Caroline Maybourne <carolinem@keeservices.com>",
  "full_message": "Dear Haigh Environmental Co. Ltd (Spares) ,\n\nPlease find enclosed a copy of your invoice 138904 dated 23/04/2026 .\n\nIf you have a Direct Debit in place this will be automatically collected at the end of the month.\n\nBank details are on the invoice if you would like to make payment via internet banking.\n\nIf you wish to make payment by PayPal please use the PayPal link below:\n\nPay Pal\n\nIf you wish to make payment via credit card or Apple Pay, please use the Stripe Payment link below:\n\nStripe\n\nIf you would like to discuss anything relating to the invoice, please call on 01296 634500 selecting Option 2 or via email on carolinem@keeservices.com or roym@keeservices.com",
  "human_notes": null,
  "human_summary": null,
  "human_title": null,
  "id": 65773,
  "in_reply_to": "",
  "internal_classification_source": "default",
  "internal_override": null,
  "is_accounts": true,
  "is_accounts_inbox_recipient": true,
  "is_action_required": false,
  "is_ai": false,
  "is_calls": false,
  "is_closed": false,
  "is_complaint": false,
  "is_duplicate": false,
  "is_escalated": false,
  "is_flagged": false,
  "is_internal": false,
  "is_lead": false,
  "is_newemailaddr": false,
  "is_opportunity": false,
  "is_private": false,
  "is_shared": true,
  "is_shared_inbox_recipient": false,
  "is_spam": false,
  "is_transaction": false,
  "message_id": "0102019db973ce8f-341aa9db-c27e-405c-8cde-6bfadb3aa383-000000@eu-west-1.amazonses.com",
  "primary_action_case": null,
  "primary_company_href": "/contacts?search=KEE%20Process%20/%20KEE%20Service",
  "primary_company_name": "KEE Process / KEE Service",
  "received_at": "Thu, 23 Apr 2026 08:27:47 GMT",
  "safe_classification_source": "rule",
  "snippet": "Dear Haigh Environmental Co. Ltd (Spares) , Please find enclosed a copy of your invoice 138904 dated 23/04/2026 . If yo\u2026",
  "source": "Mailcow IMAP",
  "spam_classification_source": "safe_override",
  "status": "new",
  "subject": "Invoice 138904",
  "suggested_company": null,
  "suggested_customerid": null,
  "tags": null,
  "to_email": "accounts@mpcservices.co.uk",
  "type": "inbound"
}
