web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Incoming Replies are tracking as Outgoing emails in Dynamics

(6) ShareShare
ReportReport
Posted on by 18
We have an integration set up for our sales reps named Outreach. The emails sent from Outreach are synced and created as activities in Dynamics with all appropriate fields mapped.
The replies to these emails get tracked and created as activities in CRM. I've turned off Incoming email tracking in Personal Settings, but it never stopped the tracking of these emails.
 
Today, I think I discovered why. The direction of these emails is still "Outgoing" despite it being an incoming reply.
The subject includes [In] or [Out] and is accurate
 
.
 
Is there a way I can rectify these to be Incoming?
Categories:
I have the same question (0)
  • Suggested answer
    Satyam Prakash Profile Picture
    972 on at

    Hi ,

    It sounds like Outreach might be misclassifying replies as "Outgoing." Here’s how to fix it:

     

    • Check Outreach Settings: Ensure sync settings recognize replies as "Incoming" based on metadata/thread.

    • Review Mapping: Confirm that the direction field mapping between Outreach and Dynamics is correct.

    • Utilize Subject Tags: The [In] tag triggers a Dynamics rule/workflow.

    • Set Up Workflow: Create a Dynamics workflow to detect [In] in subjects and update direction to "Incoming" after sync.

    • Test It: Send test emails to verify.

      Let me know how it goes!
     
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at
    Hello AC-28031453-0,
     

    You've pinpointed a crucial detail: the directioncodename field of the email activity being set to "Outgoing" even for incoming replies. This is why your personal settings for incoming email tracking are being ignored – Dynamics 365 is treating these as outgoing emails, regardless of the subject line.

    Let's break down the issue and how to resolve it:

    Understanding the Problem:

    • Outreach Integration: Your Outreach integration is responsible for creating email activities in Dynamics 365.
    • Incorrect directioncodename: The integration is incorrectly setting the directioncodename to "Outgoing" for replies, which should be "Incoming."
    • Personal Settings Ignored: Dynamics 365 relies on the directioncodename to determine if an email is incoming or outgoing. Your personal settings only affect emails processed by the standard Dynamics 365 email tracking mechanism.
    • Subject Line: The [In] or [Out] in the subject line is likely added by Outreach but doesn't influence the directioncodename.

    •  

    Solutions:

    1. Modify the Outreach Integration (Recommended):

      • Identify the Integration Logic: Locate the part of your Outreach integration that creates email activities in Dynamics 365.
      • Correct the directioncodename Mapping: Find the mapping for the directioncodename field.
      • Implement Logic for Replies: Add logic to determine if an email is a reply. You can use the inreplyto field or the subject line to identify replies.
      • Set directioncodename to "Incoming": If the email is a reply, set the directioncodename to "Incoming."
      • Testing: Thoroughly test the modified integration to ensure replies are correctly identified and the directioncodename is set correctly. 

    2. Workflow or Plugin (Less Ideal):

      • Create a Workflow or Plugin: You could create a workflow or plugin in Dynamics 365 to correct the directioncodename after the email activity is created.
      • Trigger: Trigger the workflow or plugin on the creation of an email activity.
      • Logic: Add logic to check if the email is a reply (using inreplyto or subject line).
      • Update directioncodename: If the email is a reply, update the directioncodename to "Incoming."
      • Cons: This approach is less efficient than fixing the integration directly. It adds overhead to Dynamics 365 and might not be suitable for high volumes of emails. 

    3. Data Correction (Temporary):

       

      • Identify Incorrect Emails: Use an advanced find or FetchXML query to identify email activities with directioncodename "Outgoing" but with [In] in the subject line.
      • Bulk Update: Use a bulk update to change the directioncodename to "Incoming."
      • Cons: This is a temporary solution and doesn't prevent the issue from recurring.


      •  

    Key Recommendations:

    • Modify the Outreach Integration: This is the most efficient and long-term solution. It fixes the root cause of the problem.
    • Thorough Testing: After implementing any changes, thoroughly test the integration to ensure replies are correctly tracked.
    • Monitoring: Monitor the email activities to ensure the directioncodename is being set correctly.


    •  

    Example Logic (Outreach Integration):

    # Example Python code (adjust to your integration language)
    def create_email_activity(email_data):
        # ... other code ...
        if "[In]" in email_data["subject"]:  # Or use email_data["inreplyto"]
            direction_code_name = "Incoming"
        else:
            direction_code_name = "Outgoing"
        # ... code to create email activity in Dynamics 365 ...
        dynamics_365.create_email_activity({
            "directioncodename": direction_code_name,
            # ... other fields ...
        })

    By modifying your Outreach integration to correctly set the directioncodename, you can ensure that replies are tracked as incoming emails and your personal settings are respected.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,527 Super User 2025 Season 2 on at

    Review Outreach integration settings for handling email directions or Manually update email direction for affected activities or create a workflow to automate this

    Thanks, Ramesh

    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.

  • AC-28031453-0 Profile Picture
    18 on at
    I should clarify, we are only pushing outgoing emails from Outreach. No replies are being tracked through the Outreach integration. The replies are being tracked through Outlook and Dynamics. I don't believe there is anything in Outreach settings that I can change to fix this issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Pallavi Phade Profile Picture

Pallavi Phade 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans