Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Access Marketing Segment Query Language

(0) ShareShare
ReportReport
Posted on by 75

Hey Guys,

we are currently facing an topic with the segmentation in D365 Marketing.

Here ist the case: We have contacts with a 1:n related entity (e.g. Subscriptions or Subscriptionservices), we can select the Subscriptionservices related with the contacts based on specific criteria. For Example

"Give me every contact with a unsubscribed Subscription with Cancellation reason = XXX", so we get a Subset of our contacts, later in the customer journey we only want to write to the contacts for the specific (and previously segmented) subscription service. But the customer journey doesn't know by which criteria we have segmented before and just takes all contacts from the segment and writes him to each of his subscription services (A Contact can have more than one Subscriptionservice, but not all of them are relevant for the current marketing campaign).

Question: Is there any way to solve this issue, my first idea is that I will create a Parser for the Query Language used in the segments and store this sepratly, but maybe someone has a better idea or tools?

Best regards Sven

  • Suggested answer
    Nya Profile Picture
    29,060 on at
    RE: Access Marketing Segment Query Language

    Hi,

    Your description is a little difficult to understand.

    Do you mean that you want to send an email to these Contacts via Customer Journey and that the content of the email contains the Subscription as a filter in Segment?

     

    For example, Contact has a 1: N relationship with Account as the Primary Contact of Account.

    I created a Segment to find out the Primary Contacts of the Accounts whose name equals a certain value.

    Then I created an email and inserted a Code block into it.

     pastedimage1616134663077v1.png

    Here is the code:

     

    Account:

      {{#each contact.account_contact_primarycontactid}} {{#if (eq this.name 'Acc 01')}}
    • {{this.name}}
    • {{/if}} {{/each}}

    Then I got the account from the segment whose primary contact is the receiver of the email.

     pastedimage1616134669032v2.png

    You can set the subscriptions in the same way.

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 113 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 78 Super User 2025 Season 1

#3
Sahra Profile Picture

Sahra 43

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans