Automattic / Automattic/jetpack-crm

A company has no primary contact, so anything that needs to email a company has to guess

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
13
Forks
8
Avg merge
1d 10h
Merged PRs (30d)
13

Description

A company can be assigned to an invoice, a quote or a transaction, but there is no way to say which person at that company we should be dealing with. Every feature that needs a human ends up guessing.

Invoicing Pro is where it shows up first. Stripe Checkout needs a payer email address. On a company-assigned invoice there is no contact to take one from, so the code falls back to the company's own email address, and then to the most recently created contact at that company. That works, but "the newest contact" is a guess standing in for a decision the user should have made.

The same guess is waiting elsewhere: who gets the invoice notification email, who the client portal shows the invoice to (a company cannot log in), and who a payment is attributed to when it comes back from the payment provider.

What I think we need:

- A primary contact field on a company, pointing at a contact.
- Invoicing Pro asks for it instead of sorting contacts by ID.
- Notifications and the portal use it.
- A sensible answer when it is not set. Probably still fall back to the company email address, but say so in the UI rather than picking someone silently.

Open questions:

- What happens when the primary contact leaves the company, or is deleted?
- Should a company with contacts but no primary contact be flagged in the UI, or left alone?
- Payment attribution is the messy one. Invoicing Pro links a card payment on a company-assigned invoice to the company. The sync extensions create a contact from the payer's email instead. Those two disagree, and a primary contact does not by itself settle which is right.

That last one is why this is worth deciding rather than patching case by case. Shout if there is a better shape for it.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the Invoicing Pro paths for company-assigned invoices, Stripe Checkout payer emails, invoice notifications, the client portal, and payment attribution. Review how sync extensions handle payer emails and how contacts are selected today. Done requires an agreed primary-contact lifecycle, fallback behavior, and consistent handling across these flows.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.