Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Real time segments not using an "and" at a row level only Contact level

(0) ShareShare
ReportReport
Posted on by 65

Currently there is a requirement for customers to be able to return a Contact who meets criteria "A" and "B" on the same row, instead the behaviour is if Contact matches "A" on row 1 and "B" on row 2 - include. 

How do I have real time segments search the rows and behave the same as a view or as Outbound marketing. I don't want to have to transfer all the business users over onto Outbound. 

Cheers,

Josh 

  • Suggested answer
    Sayen Zhang Profile Picture
    Sayen Zhang on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Hi partner,

    DAX can be created and run in SQL Server Management Studio (SSMS) and open-source tools like DAX Studio (daxstudio.org).

    Here is a reference link: DAX overview - DAX | Microsoft Learn

    I'm afraid it is not available for now to edit real-time segment's definition the same as outbound segment.

    But you can create a new idea through the below URL, then ask your colleagues to raise up the votes: Ideas (dynamics.com) 

    Our product team has direct visibility of these ideas and they will implement it on the basis of the highest number of votes received. 

    Best Regards, 

    Sayen Zhang

  • JoshDB Profile Picture
    JoshDB 65 on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Appreciate your time looking into this! - can i confirm is this DAX as a language?

  • Sayen Zhang Profile Picture
    Sayen Zhang on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Hi partner,

    Thank you for your information. I will test later.

    Best Regards,

    Sayen Zhang

  • JoshDB Profile Picture
    JoshDB 65 on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Thanks for this - i've copied the 2 sets of XML for comparisons - top one is Realtime (not behaving as expected) bottom is Outbound (working as expected) - ignore the state code on Contact that made no difference to the results as all contacts in UAT are active anyways.

    (PROFILE(contact) //REALTIME XML QUERY

    .RELATE(lbu_contact_lbu_application_Contact, lbu_applicationdecision_2,

    RELATE(lbu_application_lbu_applicationdecision_Application, lbu_applicationdecision_2__1))

    .RELATE(lbu_contact_lbu_application_Contact, lbu_applicationdecision_1,

    RELATE(lbu_application_lbu_applicationdecision_Application, lbu_applicationdecision_1__1))

    .FILTER(lbu_applicationdecision_1__1.lbu_decisioncode == 'CF' && lbu_applicationdecision_2__1.lbu_latest == true)).TAKE(100)

    PROFILE(contact, contact_1) //OUTBOUND XML QUERY

       .RELATE(lbu_application_contact_lbu_contact, lbu_application_1,

       RELATE(lbu_applicationdecision_lbu_application_lbu_application, lbu_applicationdecision_1))

       .FILTER(contact_1.statecode == 0 && (

               lbu_applicationdecision_1.lbu_latest == true && lbu_applicationdecision_1.lbu_decisioncode == 'CF'

           ))

  • Suggested answer
    Sayen Zhang Profile Picture
    Sayen Zhang on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Hi partner,

    When you use real-time segment to query members, you can get fetch xml in network.

    pastedimage1682328152105v1.png

    We can compare real-time segment query statements with outbound segment query statements.

    By comparison, it is clearer for us to know what conditions we need to change in segment.

    Hope it will help you!

    Best Regards,

    Sayen Zhang

  • JoshDB Profile Picture
    JoshDB 65 on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Its fine when you're querying Contact directly because you're saying give me all the contacts who match this criteria. The issue arises when you're querying a linked table. Because that contact can appear multiple times in that linked table. It basically just stops evaluating the 2nd criteria WITH the first, instead just evaluates the table with all contacts who meet x and then all contacts who meet Y. Even if X and Y arent on the same row.

    In a comparison of Real time vs Outbound segments I ran the EXACT same query and in real time marketing it returned 208 contacts who match the criteria, in Outbound it returned 44. The 44 was the correct number to return. When I ran the same query with a view, it returned 44.

  • Suggested answer
    Sayen Zhang Profile Picture
    Sayen Zhang on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Hi Josh,

    I do a test like this:

    1. Create a Contact form record and save.

    pastedimage1682324374494v1.png

    2. Create a segment that contact meets "Address 1: City" in Group 1 and "Fax" in Group 2.

    pastedimage1682324631161v2.png

    3. From "View sample of included members" we can see that, contact is excluding from the segment.

    I don't know if this segment design can meet your needs.

    Best Regards,

    Sayen Zhang

  • JoshDB Profile Picture
    JoshDB 65 on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Hi Sayen,

    Thanks for the reply. I have tried using that operator however irrespective of me selecting an "And" it evaluates the contact against each row. Not like in Outbound where it evaluates each row individually. For example -

    Contact A -

    Row 1 - Criteria 1 = "Yes" , Criteria 2 = "No"

    Row 2 - Criteria 1 = "No", Criteria 2 = "Yes"

    Search = Criteria 1 = "Yes" && Criteria 2 = "Yes"

    It would match the Contact A into the segment because Criteria 1 is met on Row 1 and Criteria 2 is met on Row 2.

    What it should have done is -

    Exclude contact A from the segment because the 2 criteria are not met on 1 singular row. This is how outbound segments behave, and views.

  • Suggested answer
    Sayen Zhang Profile Picture
    Sayen Zhang on at
    RE: Real time segments not using an "and" at a row level only Contact level

    Hi Josh,

    We can select "and" or "or" operator between the subgroup in a group.

    pastedimage1681968537497v2.png

    If the customer wants to return a Contact who meets criteria "A" and "B" on the same row, he can create a sample demo like this:

    pastedimage1681968656214v3.png

    Real time segments can also search the rows like view.

    After we set conditions in the segment, we can click Refresh under the bottom toolbar, this will give us an estimated size of members who are included in this segment.

    pastedimage1681968937988v4.png

    To view the list of members, click on View sample on included members, records which meet the conditions will list in it.

    pastedimage1681969010007v5.png

    pastedimage1681969036202v6.png

    Here is a reference link: Segmentation in Real-Time Marketing within Microsoft Dynamics 365 Marketing - Microsoft Dynamics 365 CRM Tips and Tricks (inogic.com)

    Best Regards,

    Sayen Zhang

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,031 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,868 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans