Skip to content

Automation · Sales and quoting

Create or update a Dynamics 365 lead from WhatsApp

Create or update WhatsApp leads in Dynamics 365 with an email or phone, using confirmed data and leaving the outcome in Meteor's CRM.

How do I create or update a WhatsApp lead in Dynamics 365 without duplicating it?

The Met handling WhatsApp reads the current contact from Meteor's CRM and checks for an email or phone number. If both are missing, it asks and creates nothing in Dynamics. With either key and an explicit subject, it sends only confirmed data to `dynamics_upsert_lead`: the tool looks for an exact email first and falls back to phone when there is no email, then updates the match or creates a new lead. It writes `created` or `updated` and the returned `leadid` to an internal note, without claiming that the two systems commit as one transaction.

What starts it

When the customer writes

It starts inside the conversation when someone shows interest and shares their details. The message does not fire a separate automation. The Met already assigned to the WhatsApp channel performs the steps.

Nothing to set up. The Met assigned to that channel picks up the conversation and runs the procedure inside it.

Who runs it

Lead capture Met

Sales team

This is the Met already handling the first WhatsApp message and receiving the person's data. Moving that contact into the corporate CRM needs no new character or separate automation.

Channels: WhatsApp

What you need connected

5 steps · 5 tools

The procedure, step by step

Each step shows the tool that runs. They belong to the real connector: if one of them stopped existing, this page would not build.

  1. 1

    Read the contact behind the conversation

    Use the `contact_id` supplied by the conversation context to retrieve the stored name, email, phone and fields. Do not search for a similar person or guess an identifier. This step starts from the record of the person who is writing now.

  2. 2

    Ask for the missing key

    If both email and phone are missing, ask for one and stop the sync until the person provides it. Store the confirmed value in `$email` or `$phone` on that same contact. Do not create a lead from a name, company or an assumption about the WhatsApp number.

  3. 3

    Review the lead when email is available

    With a confirmed email, search Dynamics for an exact match before writing so existing data is visible and empty fields are not sent over it. Skip this search for a phone-only contact: this tool does not search phone numbers, and the next step performs that match.

  4. 4

    Create or update without guessing fields

    Call `dynamics_upsert_lead` with `subject` and only logical column names whose values are known, such as `firstname`, `lastname`, `emailaddress1`, `telephone1`, `companyname` or `description`. Email wins for matching; without it, the tool compares phone. Do not send `leadqualitycode`, an owner or option codes that nobody configured.

  5. 5

    Leave the outcome on the contact

    Only after a successful response, add an internal note with `created` or `updated` and the `leadid` returned by Dynamics. If Dynamics returns 403, surface the permission error. Do not retry blindly or write a note claiming the sync happened.

Before you start

What you need ready

The Met solves none of these for you. If one is missing, the automation stops there.

The limits

What this automation does NOT solve

Better said here than discovered halfway through the rollout.

FAQ

Questions about this automation

A confirmed phone number is enough. The tool checks variants in `telephone1` and `mobilephone`. If phone is missing too, the flow asks and stops without creating the lead.

Exact email is used for the match. Phone remains on the lead, but becomes the deduplication key only when email is absent.

No. This step sends only confirmed fields that need to change and omits empty values. Business rules or plugins installed in your environment may still react to the write.

The application user lacks a privilege for the operation or a column. The flow surfaces the error so an administrator can adjust the role. Repeating the same call does not grant access.

Keep going

Other automations built on the same tools

Want this automation running on your own data?

We will show it to you with your accounts connected, not with a canned demo.