Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Filter Examples

This topic describes two examples of filtering to find specific customers with Optimizely Data Platform's (ODP's) GraphQL API.

You can find specific customers using the GraphQL filter function. Below are some examples.

  1. Find the customer whose first name is Jacob.
query MyQuery {
customers (filter: "first_name = 'Jacob'") {
   edges {
     node {
        first_name
        email
        name
     }
   }
 }
}
  1. Find the customers whose email contains Jacob.
query MyQuery {
customers (filter: "email =~ 'Jacob*'") {
   edges {
     node {
        first_name
        email
        name
     }
   }
 }
}