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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Stopping virtual segments by using power automate flow

(4) ShareShare
ReportReport
Posted on by 125
Hello everyone,
 
When we had Outbound marketing it was possible to deactivate segments (msdyncrm_segments) by using power automate flow. The segments we use are for events and if the event is 4 weeks past its end date a flow deactivates the event. Another flow deactivates the segment.
 
We want to do the same for segments in Customer Insights.
How can I stop a segment by using Power automate flow? When I select a record in the segment view, the selected segment is called 'msdynmkt_virtualsegment' and when I open te record the segment is called 'msdynmkt_segmentdefinitions'. I can stop the Segment Definition by using flow, but the virtual segment is still in a 'Ready to use' status.
 
I also tried getting the msdynmkt_virtualsegment and stopping the record, but this is giving me below error:
 
SDK Message 'Update' is not implemented for entity 'msdynmkt_virtualsegment'.
 
Is there a way to stop a virtual segment by using power automate flow?
I have the same question (0)
  • CU07070830-0 Profile Picture
    4 on at
    After the segment definition is deactivated solitaired, the Customer Insights system will automatically update the status of virtual segments based on the segment definition. However, this process may take some time.
  • Verified answer
    Muhammad Shahzad Shafique Profile Picture
    2,375 Most Valuable Professional on at
    In Customer Insights - Journeys (Real-time Marketing), the entity msdynmkt_virtualsegment is read-only and system-managed, representing the compiled state of the segment. That’s why you get the error:
    SDK Message 'Update' is not implemented for entity 'msdynmkt_virtualsegment'.

    So, you can only control segment status via the msdynmkt_segmentdefinitions entity (not msdynmkt_virtualsegment).
    To stop a segment using Power Automate, follow these steps:
    Power Automate Steps to Stop a Segment:
    1. Trigger: Your preferred trigger (e.g., scheduled recurrence or event end date check).
    2. List Records: Use List rows from Dataverse to get msdynmkt_segmentdefinitions records where:
      • Status = Active
      • Event end date condition met
    3. Update Record: For each matching record, use Update a row to change:
      • statuscode (Status Reason): Set to 1 (Inactive)
      • statecode (Status): Set to 1 (Inactive)
  • Jackie-20021515-0 Profile Picture
    125 on at
    Thank you for the reply.
     
     
    Below was really helpful:
     
    • statuscode (Status Reason): Set to 1 (Inactive)
    • statecode (Status): Set to 1 (Inactive)
    The Segment Definition is inactive now, but the Virtual segment is still 'Ready to use'. It's been 24 hours since I made the Segment definition inactive. How long does it usually take before the Virtual segment goes inactive?
  • Verified answer
    Muhammad Shahzad Shafique Profile Picture
    2,375 Most Valuable Professional on at
    The virtual segment status (e.g., Ready to use) does not change immediately after inactivating the segment definition. Based on observed behavior and documentation:
    • The virtual segment can remain in “Ready to use” status for up to 24–48 hours, even if the segment definition is inactive.
    • This delay occurs because the system performs background processing and cache invalidation at intervals.
    • As long as the segment definition is inactive, the segment will not be evaluated in real-time journeys or used for targeting, regardless of the virtual segment status.
    Recommendation:
    If it's been over 48 hours and the virtual segment still shows “Ready to use”, but you’ve confirmed that the segment definition is inactive, there is no action required — it will not be used in any new processing. However, if you're still concerned, consider:
    • Opening a Microsoft support ticket for a backend refresh.
    • Ensuring no active journeys are still referencing that segment.
    Let me know if you’d like a Power Automate flow to validate segment usage before deactivation.
     
  • Jackie-20021515-0 Profile Picture
    125 on at
    Good day,
     
    Just an update.
     
    9 days later, the virtual segment is still active. It does take a while.
    We are going to deactivate the virtual segments and segment definitions manually now. 
     
    Thank you for your help. Have a great day.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 165

#2
ManoVerse Profile Picture

ManoVerse 156 Super User 2026 Season 1

#3
Zhilan Profile Picture

Zhilan 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans