lumnik. / scenarios All scenarios · Français

A CRM export with broken accents and wrong emails

Goal Take over the old CRM's contacts with a repaired name, an international phone and a valid email, and name those that cannot be reached.

The sales team leaves an old CRM. Its contact export mixes:

The manifest turns it into a usable list.

contacts.csv
CUST_ID;CUST_NM;CONTACT_NM;EMAIL;TEL_MOB;TEL_FIXE
C001;DUPONT  SARL;Bénédicte MARTIN; B.Martin@Dupont.FR ;;04 72 00 00 01
C002;ATELIER LEFÈVRE;JEAN-LUC PETIT;jl.petit@lefevre;06 12 34 56 78;
C003;BOULANGERIE MOREL;Sophie Morel;sophie.morel@morel-pain.fr;06 98 76 54 32;04 78 11 22 33
C004;GARAGE ROUX ET FILS;MARC ROUX;MARC.ROUX@GARAGE-ROUX.FR;;
C005;CAFÉ DU PORT;AMÉLIE FAURE;contact@cafeduport.fr;+32 470 12 34 56;
C006;NGUYEN TRAITEUR;Linh Nguyen;linh@nguyen-traiteur.fr;07 11 22 33 44;04 72 99 88 77
C007;PHARMACIE GARNIER;PAUL GARNIER;p.garnier@@pharmacie.fr;;04 74 10 20 30
C008;FLEURS & CO;CLAIRE DURAND;claire.durand@fleursetco.fr;06 55 44 33 22;
$ lm entity get contact_d
CUSTOMER_ID  COMPANY              CONTACT           EMAIL                        PHONE         _CONFLICTS
C001         Dupont Sarl          Bénédicte Martin  b.martin@dupont.fr           +33472000001  {}
C003         Boulangerie Morel    Sophie Morel      sophie.morel@morel-pain.fr   +33698765432  {}
C004         Garage Roux Et Fils  Marc Roux         marc.roux@garage-roux.fr                   {}
C005         Café Du Port         Amélie Faure      contact@cafeduport.fr        +32470123456  {}
C006         Nguyen Traiteur      Linh Nguyen       linh@nguyen-traiteur.fr      +33711223344  {}
C008         Fleurs & Co          Claire Durand     claire.durand@fleursetco.fr  +33655443322  {}
$ lm dlq list --run a0adfcb9-87fa-4ff8-99b2-a1a7385ac2a5
ID        CONNECTOR       RUN       REASON         ATTEMPTS  RESOLUTION  MESSAGE
550db09d  scenario-crm-d  a0adfcb9  MappingFailed  1                     email: parse-email could not read the value
c22f12e4  scenario-crm-d  a0adfcb9  MappingFailed  1                     email: parse-email could not read the value

$ lm dlq get 550db09d-b9bf-455b-a548-641e23d42a4e
ID:        550db09d-b9bf-455b-a548-641e23d42a4e
Connector: scenario-crm-d (6969b750-4353-4bcc-afd4-5f4d1504bc13)
Run:       a0adfcb9-87fa-4ff8-99b2-a1a7385ac2a5
Reason:    MappingFailed
Attempts:  1
Message:   email: parse-email could not read the value
Detail:    {"field":"email","message":"parse-email could not read the value"}
Payload:   {"email":"p.garnier@@pharmacie.fr","phone":"04 74 10 20 30","mobile":null,"company":"PHARMACIE GARNIER","contact":"PAUL GARNIER","landline":"04 74 10 20 30","customer_id":"C007"}
Resolution: open

Limits

  • titlecase writes Sarl and Et: it knows neither legal forms nor short words.
  • The dead letter keeps the row from before the cell stage, columns renamed.
  • Synthetic contacts.

Sales · CRM takeover

Can we reach these customers?

The old CRM has their contacts, damaged.

Broken accents, two phones, mistyped emails.

Synthetic contacts

The problem

The export is not usable as is.

  • Bénédicte MARTIN.
  • The mobile here, the landline there.
  • p.garnier@@pharmacie.fr.

Nothing is changed

The export stays as is.

  • lumnik repairs the names.
  • It keeps one phone, in international format.
  • It validates the email.

What it took to write

- fix-mojibake:
    columns: [company, contact]

Broken accents, repaired.

The whole scenario fits in 2 declaration files, 51 lines.

The answers

6 contacts reachable, 2 named.

  • Bénédicte Martin, +33472000001.
  • Café Du Port, Belgian number kept.
  • 2 unreadable emails as dead letters.

The limit

The casing stays mechanical.

  • titlecase writes Sarl and Et.
  • A contact without a phone stays without one.

Try it

The scenario replays end to end.

One connector, one entity: each step is published with its output.

This scenario runs on lumnik Open, free and open source.

Try lumnik Open →