{{define "content"}}{{with .Data}}{{$d := .}}
Each Stripe customer with billing, matched to its EspoCRM Account: first by a stored ID (a Stripe customer ID in the Account, or an EspoCRM ID in Stripe's metadata), then by email (the Account's, or one of its Contacts'), then by the email's domain (free mail like Gmail doesn't count). Fix what it gets wrong; your choice is kept. Pipeline influence and per-account numbers build on this.
No CRM Accounts copied yet, so nothing can be matched. Hermes copies them once the CRM bridge works (see CRM queue); until then you can say which customers aren't in the CRM, or queue them to be added.
{{else}}{{num .CRMCount}} Accounts copied from the CRM{{if not .Synced.IsZero}} {{ago .Synced}}{{end}}.
{{end}} {{$s := .Summary}}| Customer | MRR now | Account | |
|---|---|---|---|
| {{or .Customer.Name .Customer.Email .Customer.ID}}{{if and .Customer.Name .Customer.Email}} {{.Customer.Email}}{{end}}{{if .Prospect}} a prospect{{end}} |
{{if .MRR}}{{usd .MRR}}{{else}}ยท{{end}} | {{if .Account.ID}}{{.Account.Name}} {{.How}} {{else if eq .How "several"}}Several fit: {{range $i, $a := .Candidates}}{{if $i}}, {{end}}{{$a.Name}}{{end}} {{else if eq .How "not in the CRM"}}not in the CRM {{else}}no match{{if index $d.Queued .Customer.ID}} queued for the CRM{{end}}{{end}} |
{{if eq .Show ""}}Nothing to fix.{{else}}No customers.{{end}}