> For the complete documentation index, see [llms.txt](https://support.emarketeer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.emarketeer.com/integrations/dynamics/dynamics-journey-steps.md).

# Dynamics - Journey Steps

## Create or update records

* **Create/Update Lead:** pushes a person from eMarketeer into Dynamics as a Lead. If a Lead with a matching email already exists, eMarketeer updates it. An "Always create a lead" option forces creation of a new Lead even if the person already exists as a Contact in Dynamics. [Read more](/integrations/dynamics/dynamics-journey-steps/create-update-lead.md)

## Add activities (Tasks and Phone Calls)

To log a Task or Phone Call in Dynamics, choose one of three modes depending on how strict your sales process needs to be:

* **Add Activity (smart mode):** the most flexible option. Because a person might be a Lead or a Contact in your CRM, this step asks for your preference. If you prefer to target a Lead, eMarketeer looks for one first. If it cannot find a Lead, it falls back to the Contact record (and vice versa), so sales activities are never lost. [Read more](/integrations/dynamics/dynamics-journey-steps/dynamics-add-activity.md)
* **Add Lead Activity (strict):** logs an activity explicitly on a Lead record. If eMarketeer cannot find a matching Lead, the action is skipped. It does not fall back to a Contact. [Read more](/integrations/dynamics/dynamics-journey-steps/dynamics-add-lead-activity.md)
* **Add Contact Activity (strict):** logs an activity explicitly on a Contact record. If eMarketeer cannot find a matching Contact, the action is skipped. It does not fall back to a Lead. [Read more](/integrations/dynamics/dynamics-journey-steps/dynamics-add-contact-activity.md)

## Marketing List actions

* **Add Lead to Marketing List:** searches for the person's Lead record in Dynamics and adds them to a Marketing List of your choice. [Read more](/integrations/dynamics/dynamics-journey-steps/dynamics-add-lead-to-marketing-list.md)
* **Add Contact to Marketing List:** searches for the person's Contact record in Dynamics and adds them to a Marketing List of your choice. [Read more](/integrations/dynamics/dynamics-journey-steps/dynamics-add-contact-to-marketing-list.md)

## How records sync

In eMarketeer, everyone in your database is a Contact. Microsoft Dynamics splits people into two distinct entities: Leads and Contacts.

To bridge this gap, each step uses built-in search logic. When a Journey triggers a step, eMarketeer searches Dynamics to find the correct Lead or Contact to update, which keeps your CRM clean and duplicate-free.

## Contact matching logic

Every step resolves the correct Dynamics record before acting. Because the same person can exist as a Lead, a Contact, or both in Dynamics, each step runs a three-stage lookup in order from most to least specific:

1. **Direct ID** — if eMarketeer has already stored a `dynamics_lead_id` or `dynamics_contact_id` on the contact, it queries Dynamics using that ID directly.
2. **Email and company** — if no ID is stored yet, eMarketeer searches by email address and company name together.
3. **Email only** — if the combined search returns no result, eMarketeer falls back to email address alone.

When a match is found, eMarketeer saves both `dynamics_lead_id` and `dynamics_contact_id` on the contact record. The next time a step runs for the same person, eMarketeer skips straight to the direct ID query — making subsequent operations faster. If a stored ID is no longer valid in Dynamics, eMarketeer falls back to the full lookup again.

Contact lookups check for converted Leads first. A person who started as a Lead and was later converted to a Contact in Dynamics is matched correctly through this path.

The flowchart below shows the full decision tree for each of the six step types.

<div align="left" data-with-frame="true"><img src="/files/1EkKVJewbRJpXjQ8n35Y" alt="Flowchart showing the contact matching decision tree for each Dynamics Journey step type"></div>

{% file src="/files/1EkKVJewbRJpXjQ8n35Y" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.emarketeer.com/integrations/dynamics/dynamics-journey-steps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
