Emotion AI

Emotions AI is an AI-driven tool that evaluates the behavior of website or app visitors to determine their emotional needs.

Flagship client SDKs include the Emotion AI feature. This functionality captures visitor data such as page views, clicks, scrolls, and mouse or touch movements over a 30-second period. The collected data is then transmitted to the AB Tasty's Emotions AI api, where it is analyzed to generate a score representing the visitor's emotional needs.

📘

Feature activation

This feature must be enabled on your account to be used. Please contact your TSM to activate it.

Collecting Visitor Events

To initialize visitor data collection, the collectEmotionsAIEvents method should be called from the Visitor instance. Once initialized, the SDK starts collecting data on any touches, clicks, scrolls, mouse or touch movements, and page changes over a 30-second period. This data is then sent to the AB Tasty's EmotionsAI server for analysis, which generates the visitor score. At the end of this process, the visitor score will be stored in local cache.

Getting visitor score

When the Emotion AI feature is activated on a client's account, each time the FetchFlags method is called, the SDK retrieves the visitor score from the local cache. If the score is not available in the cache, the SDK makes an HTTP request to retrieve the score from the AB Tasty. The retrieved visitor score is then included in the visitor context before making the HTTP campaigns call.

General Considerations

  • Data collection occurs over a 30-second period and requires an additional interaction event afterward to conclude the collection and initiate scoring. If there is no interaction data within this timeframe, or no additional interaction or if the process is interrupted—such as by a page refresh, closing the browser page, or quitting the app on mobile—the visitor score generation may fail.
  • If the visitor scoring process fails for any reason, it will restart in the next session. This occurs when the page is refreshed in the browser or when the app is relaunched on mobile devices.
  • For mobile SDKs (iOS, Android, or React Native), it's essential to invoke the collectEmotionsAIEvents method promptly after the SDK has been successfully initialized and promptly after visitor enters the application. Avoid calling this method during splash screen, as user interactions are typically minimal at that stage. Insufficient interaction data may lead to irrelevant scoring or failure to generate a visitor score.
  • Once a visitor's score has been calculated for a given visitorId, it is cached. The score will not be recalculated for the same visitorId. Instead, the cached score will be used in subsequent sessions.
  • No data will be collected when the visitor has not given consent. See visitor consent.
  • No data will be collected when the SDK is in panic mode.

Collecting visitor events schema

This schema describes how and when flagship Sdks collect visitor events and send them to Emotion AI API.


Implementation flow

From the schema above:

  1. Once the app is launched, Flagship SDK fully initialized and Visitor consent obtained, call the _collectEmotionsAIEvents to start collecting events at the most appropriate location of your app.
    We recommend to start the collect as soon as the first most relevant interface is displayed to user ignoring any splash screen. During the EmotionsAI Collect, the SDK will intercept screen interactions like clicks, moves, scrolls, and navigation in background and then send hits to EmotionAI server for scoring. No data will be cached on the device at this time.
  2. Data collection will end automatically after a delay of 30 seconds plus one more additional interaction that will close it. When the collection has been successfully completed, it will be stored into the visitor cache to prevent re-collecting in the next session.
    Collect will fail when there is no interaction during the 30 seconds delay, or when no additional interaction is made afterward, or when the app is killed during this time. In this case a new collect will be possible in the next session.
  3. When the full plan is enabled, The SDK will poll the Emotions AI server to obtain the Visitor score and store it locally in the Visitor cache and its context for further targeting.

Example

Below are examples in different programming environments:

import React from "react";
import { FlagshipProvider, useFsFlag, useFlagship } from "@flagship.io/react-sdk";

const App = () => (
  <>
    ",
        hasConsented: true, 
          context: {
            isVIP: true,
          }
      }}
    >
      
    
  
);

const Page = () => {
  
  const { collectEAIEventsAsync } = useFlagship();
  
  useEffect(() => {
    collectEAIEventsAsync(); //Start collecting interaction dataÏ
  }, [collectEAIEventsAsync]);

  return (
    

My Page

); };
import React from "react";
import { FlagshipProvider, useFsFlag, useFlagship } from "@flagship.io/react-native-sdk";

const App = () => (
  <>
    ",
        hasConsented: true, 
          context: {
            isVIP: true,
          }
      }}
    >
      
    
  
);

const View = () => {
  
  const { collectEAIEventsAsync } = useFlagship();
  
  useEffect(() => {
    collectEAIEventsAsync("My-view"); //Start collecting interaction data
  }, [collectEAIEventsAsync]);

  return (
    

My View

); };

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        CoroutineScope(Dispatchers.Default).async {
            
            Flagship.start(
                application,
                "your_env_id",
                "your_api_key",
                FlagshipConfig.DecisionApi()
            )

        }
        enableEdgeToEdge()
        setContent {
            FlagshipandroidTheme {
                Scaffold(modifier = Modifier.fillMaxSize(), containerColor = Color.Cyan) { innerPadding ->
                    Greeting(
                        name = "Android",
                        modifier = Modifier.padding(innerPadding)
                    )
                }
            }
        }
    }

    override fun onResume() {
        super.onResume()

        Flagship.runOnFlagshipIsInitialized {
            val visitor = Flagship.newVisitor("visitor_1234", true).build()
            visitor.collectEmotionsAIEvents(this@MainActivity3)
        }
    }
}
 
// In AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
     // Override point for customization after application launch.
   // Start Flagship & Create visitor
        Task {
            try await Flagship.sharedInstance.start(envId: "envId", apiKey: "apiKey")
            let visitor = Flagship.sharedInstance.newVisitor(visitorId: "visitorId", hasConsented: true).withContext(context: ["isVip": true]).build()
        }
       return true
 }

// In your HomeScreen or the from the view whereyou  want to collect the Emotion AI 
// Call collectEmotionsAIEvents function  by giving the main window for your App

Flagship.sharedInstance.sharedVisitor?.collectEmotionsAIEvents(window: window, screenName: "LoginScreen")

// Call the start sdk in your entry point or in your home screen Widget
startSdk() async {
  // Start Flagship & Create visitor
  await Flagship.start("envId", "apiKey");
  var visitor =
      Flagship.newVisitor(visitorId: "userId", hasConsented: true).build();
  
   // In your HomeScreen or the from the view whereyou want to collect the Emotion AI
   // Call collectEmotionsAIEvents function  by giving the main window for your App
  visitor.collectEmotionsAIEvents("LoginScreen");
 }

Please consult the reference documentation for your specific SDK for more detailed information:


","html_footer":"","html_body":"","html_promo":"","javascript_hub2":"","javascript":"","stylesheet_hub2":"","stylesheet":"","favicon":["https://files.readme.io/f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png","f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png",35,32,"#d4fc04","https://files.readme.io/cb34f6c05c74f4a3266c28591a27fb0115bf92ba95d1472c85a3bfa877456a18-ABTasty_Marque_Yellow_small.png","66e21fb3ab0cd3000f012006"],"logo_white_use":true,"logo_white":["https://files.readme.io/d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png","d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png",523,80,"#ffffff","https://files.readme.io/6cf190bece7dc0371b785f67199f09f459b86ab7be06d734b43da8515bf73c31-Logo.FER.White.Small.png","66e21f7faad094004498a762"],"logo":["https://files.readme.io/924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png","924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png",523,80,"#dcdce4","https://files.readme.io/5bebeb29e71174ae8ef3ef721b54658f2fde9ed63b6c9b7a1ba5dee0adf17ce5-Logo.FER.Blue.Small.png","66e21f780960780069648645"],"promos":[{"extras":{"type":"buttons","buttonPrimary":"get-started","buttonSecondary":"docs"},"title":"Feature Experimentation & Rollouts - Developer Docs","text":"Welcome to the Feature Experimentation & Rollouts Developer Hub.\n\nFeature Experimentation & Rollouts is AB Tasty's dedicated product optimization platform for teams to manage, release, personalize, and experiment with features across all codebases, channels, and devices.\n\nWant access?\nCreate your free account now: https://www.flagship.io/sign-up/","_id":"5e4aa55643caba00730ba9be"}],"body":{"style":"none"},"header":{"img_pos":"tl","img_size":"auto","img":[],"style":"solid","linkStyle":"buttons"},"typography":{"tk_body":"","tk_headline":"","tk_key":"","typekit":false,"body":"Open+Sans:400:sans-serif","headline":"Open+Sans:400:sans-serif"},"colors":{"body_highlight":"#A3B902","header_text":"","main_alt":"","main":"#3100BE","highlight":"","custom_login_link_color":""},"main_body":{"type":"links"},"splitReferenceDocs":false,"childrenAsPills":false,"hide_logo":true,"sticky":false,"landing":true,"overlay":"circuits","theme":"solid","link_logo_to_url":false,"referenceLayout":"column","subheaderStyle":"dropdown","showMetricsInReference":true,"rdmd":{"callouts":{"useIconFont":false},"theme":{"background":"","border":"","markdownEdge":"","markdownFont":"","markdownFontSize":"","markdownLineHeight":"","markdownRadius":"","markdownText":"","markdownTitle":"","markdownTitleFont":"","mdCodeBackground":"","mdCodeFont":"","mdCodeRadius":"","mdCodeTabs":"","mdCodeText":"","tableEdges":"","tableHead":"","tableHeadText":"","tableRow":"","tableStripe":"","tableText":"","text":"","title":""}},"referenceSimpleMode":true,"stylesheet_hub3":"","loginLogo":[],"logo_large":true,"colorScheme":"system","changelog":{"layoutExpanded":false,"showAuthor":true,"showExactDate":false},"allowApiExplorerJsonEditor":false,"ai_dropdown":"enabled","ai_options":{"chatgpt":"enabled","claude":"enabled","clipboard":"enabled","view_as_markdown":"enabled","copilot":"enabled"},"showPageIcons":true},"custom_domain":"docs.developers.flagship.io","childrenProjects":[],"derivedPlan":"startup2018","description":"Learn about using Flagship, AB Tasty's Feature and Experimentation Management platform. Direct access to API reference and SDKs, how to's and developer guides.","isExternalSnippetActive":false,"error404":"","experiments":[],"first_page":"landing","flags":{"translation":false,"directGoogleToStableVersion":false,"disableAnonForum":false,"newApiExplorer":true,"newMarkdown":false,"newEditor":true,"hideGoogleAnalytics":false,"cookieAuthentication":false,"allowXFrame":false,"speedyRender":false,"correctnewlines":false,"swagger":false,"oauth":false,"migrationSwaggerRun":false,"migrationRun":false,"hub2":true,"enterprise":false,"allow_hub2":false,"alwaysShowDocPublishStatus":false,"newSearch":true,"tutorials":true,"useReactApp":true,"allowApiExplorerJsonEditor":false,"allowReferenceUpgrade":false,"dashReact":false,"graphql":false,"newMarkdownBetaProgram":true,"oldMarkdown":false,"rdmdCompatibilityMode":false,"singleProjectEnterprise":false,"staging":false,"metricsV2":true,"newEditorDash":true,"enableRealtimeExperiences":false,"reviewWorkflow":true,"star":false,"allowDarkMode":false,"forceDarkMode":false,"useReactGLP":false,"disablePasswordlessLogin":false,"personalizedDocs":false,"myDevelopers":false,"superHub":true,"developerDashboard":false,"allowReusableOTPs":false,"dashHomeRefresh":false,"owlbotAi":false,"apiV2":false,"git":{"read":false,"write":false},"superHubBeta":false,"dashQuickstart":false,"disableAutoTranslate":false,"customBlocks":false,"devDashHub":false,"disableSAMLScoping":false,"allowUnsafeCustomHtmlSuggestionsFromNonAdmins":false,"apiAccessRevoked":false,"passwordlessLogin":"default","disableSignups":false,"billingRedesignEnabled":true,"developerPortal":false,"mdx":true,"superHubDevelopment":false,"annualBillingEnabled":true,"devDashBillingRedesignEnabled":false,"enableOidc":false,"customComponents":true,"disableDiscussionSpamRecaptchaBypass":false,"developerViewUsersData":false,"changelogRssAlwaysPublic":false,"bidiSync":true,"superHubMigrationSelfServeFlow":true,"apiDesigner":false,"hideEnforceSSO":false,"localLLM":false,"superHubManageVersions":true,"gitSidebar":true,"superHubGlobalCustomBlocks":false,"childManagedBidi":false,"superHubBranches":false,"externalSdkSnippets":false,"migrationPreview":false,"requiresJQuery":false,"superHubPreview":false},"fullBaseUrl":"https://docs.developers.flagship.io/","git":{"migration":{"createRepository":{"start":"2025-01-14T11:26:59.981Z","end":"2025-01-14T11:27:00.758Z","status":"successful"},"transformation":{"end":"2025-01-14T11:27:02.464Z","start":"2025-01-14T11:27:01.196Z","status":"successful"},"migratingPages":{"end":"2025-01-14T11:27:04.793Z","start":"2025-01-14T11:27:02.496Z","status":"successful"},"enableSuperhub":{"start":"2025-01-14T12:28:05.135Z","status":"successful","end":"2025-01-14T12:28:05.135Z"}},"sync":{"linked_repository":{"id":"917183488","name":"readme.io","url":"https://github.com/flagship-io/readme.io","provider_type":"github","privacy":{"visibility":"private","private":true},"linked_at":"2025-01-15T14:17:06.678Z","linked_by":"55f0353fd58f9b1900acf993","connection":"6787c2b79038ee984c933bdc","full_name":"flagship-io/readme.io","error":{}},"installationRequest":{},"connections":[{"_id":"6787c2b79038ee984c933bdc","active":true,"created_at":"2025-01-15T14:14:13.000Z","installation_id":59615051,"owner":{"type":"Organization","id":80262559,"login":"flagship-io","site_admin":false},"provider_type":"github"}],"providers":[]}},"glossaryTerms":[{"_id":"611fb9eba0648a0018313b47","term":"KPI","definition":"Collect events and analysed through the KPIs feature inside your report. You can set all the KPIs you want to analysed in the first step of the use case creation."},{"_id":"611fb9fb3fc26b0204e56988","term":"flags","definition":"A flag is a variable present in your code that you want to act on with a specific value (Boolean, integer, string). That variable can also be called Dynamic Variable or Remote Variable.\nFlagship will be the remote for the feature behind the flag."},{"_id":"611fba1354861501f2a2872a","term":"Server SDK","definition":"A Server SDK is a library present in your server.\nIt manages several users at a time (thousands/billions)."},{"_id":"611fba4962a583002c503523","term":"Client SDK","definition":"A Client SDK is a library present in the code of the device (mobile, browser, IoT, ...) and serves only one user at a time.\nExample: An Android application would benefit from the Android SDK. That SDK is directly present inside the code of the application, on the device of the user. That's a client SDK. It also means that it serves only one user at a time."},{"_id":"611fba60c0d2f70241d2c0a0","term":"Environments","definition":"Each environment gives the customer the possibility to separate their features and experiments inside the platform: the ones which are already in production from the ones which have not been released yet and are still in QA."},{"_id":"611fba81210c990022e60eaa","term":"Panic Mode","definition":"The panic mode is a way to not display any modifications set up in Flagship anymore. It could be also used as a \"Code Freeze mode\""},{"_id":"611fbada60399d025030d6e1","term":"visitorId","definition":"The visitorId has to be unique for each user/visitor. Thanks to that ID, you can guarantee the same experience to each of your users every time."},{"_id":"611fbb5ebe6f91002b629916","term":"user context","definition":"It enables you to target your visitors/users. Each user has a context with some criteria."}],"graphqlSchema":"","gracePeriod":{"enabled":false,"endsAt":null},"shouldGateDash":false,"healthCheck":{"provider":"","settings":{}},"intercom_secure_emailonly":false,"intercom":"","is_active":true,"integrations":{"login":{}},"internal":"","jwtExpirationTime":0,"landing_bottom":[{"type":"text","alignment":"left","pageType":"Documentation","text":"> 📘 Nota bene:\n> \n> In all article, Flagship refers to the **AB Tasty - Feature Experimentation & Rollouts**\n> [Learn more](https://flagship.zendesk.com/hc/en-us/articles/7536827849628--Flagship-January-2023-Release-Notes-)","title":""},{"type":"docs","alignment":"left","pageType":"Documentation"},{"type":"html","alignment":"left"}],"mdxMigrationStatus":"rdmd","metrics":{"thumbsEnabled":true,"enabled":false,"monthlyLimit":0,"planLimit":1000000,"realtime":{"dashEnabled":false,"hubEnabled":false},"monthlyPurchaseLimit":0,"meteredBilling":{}},"modules":{"logs":false,"suggested_edits":true,"discuss":false,"changelog":false,"reference":true,"examples":false,"docs":true,"landing":true,"custompages":true,"tutorials":false,"graphql":false},"name":"Developer Docs | Flagship","nav_names":{"discuss":"","changelog":"","reference":"","docs":"","tutorials":"","recipes":""},"oauth_url":"","onboardingCompleted":{"documentation":true,"appearance":true,"api":true,"jwt":true,"logs":true,"domain":false,"metricsSDK":false},"owlbot":{"enabled":false,"isPaying":false,"customization":{"answerLength":"long","customTone":"","defaultAnswer":"","forbiddenWords":"","tone":"neutral"},"copilot":{"enabled":false,"hasBeenUsed":false,"installedCustomPage":""}},"owner":{"id":null,"email":null,"name":null},"plan":"startup2018","planOverride":null,"planSchedule":{"stripeScheduleId":null,"changeDate":null,"nextPlan":null},"planStatus":"active","planTrial":"startup2018","readmeScore":{"components":{"newDesign":{"enabled":true,"points":25},"reference":{"enabled":true,"points":50},"tryItNow":{"enabled":true,"points":35},"syncingOAS":{"enabled":true,"points":10},"customLogin":{"enabled":true,"points":25},"metrics":{"enabled":false,"points":40},"recipes":{"enabled":false,"points":15},"pageVoting":{"enabled":true,"points":1},"suggestedEdits":{"enabled":true,"points":10},"support":{"enabled":true,"points":5},"htmlLanding":{"enabled":true,"points":5},"guides":{"enabled":true,"points":10},"changelog":{"enabled":false,"points":5},"glossary":{"enabled":true,"points":1},"variables":{"enabled":true,"points":1},"integrations":{"enabled":true,"points":2}},"totalScore":180},"reCaptchaSiteKey":"","reference":{"alwaysUseDefaults":true,"defaultExpandResponseExample":false,"defaultExpandResponseSchema":false,"enableOAuthFlows":false},"seo":{"overwrite_title_tag":false},"stable":{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},"subdomain":"flagship","subpath":"","superHubWaitlist":false,"topnav":{"edited":true,"right":[{"type":"search"},{"type":"user","text":"User","url":"/login?redirect_uri=/docs/emotion-ai"}],"left":[{"type":"url","text":"Developer Documentation","url":"https://docs.developers.flagship.io/"}],"bottom":[]},"trial":{"trialEndsAt":"2020-03-17T14:38:14.358Z","trialDeadlineEnabled":true},"translate":{"languages":[],"project_name":"","org_name":"","key_public":"","show_widget":false,"provider":"transifex"},"url":"https://www.flagship.io","versions":[{"_id":"679a3cb2ab901b0012f0f9f2","version":"0.0.0-preprod","version_clean":"0.0.0-preprod","codename":"0.0.0-preprod","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":["679a3cb1ab901b0012f0f88b","679a3cb1ab901b0012f0f88c","679a3cb1ab901b0012f0f88d","679a3cb1ab901b0012f0f88e","679a3cb1ab901b0012f0f88f","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","679a3cb1ab901b0012f0f890","679a3cb1ab901b0012f0f891","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","679a3cb1ab901b0012f0f892","679a3cb1ab901b0012f0f893","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","679a3cb1ab901b0012f0f894","679a3cb1ab901b0012f0f895","679a3cb1ab901b0012f0f896"],"pdfStatus":"","project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2025-01-29T14:35:26.504Z","__v":0,"updatedAt":"2025-01-29T14:35:26.504Z","forked_from":"61127b93152a69007f6f75ee","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},{"_id":"679ce7a096cdeb000f5423e3","version":"0.1.1-doc","version_clean":"0.1.1-doc","codename":"Flagship Reference","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":["679ce7a096cdeb000f54227c","679ce7a096cdeb000f54227d","679ce7a096cdeb000f54227e","679ce7a096cdeb000f54227f","679ce7a096cdeb000f542280","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","679ce7a096cdeb000f542281","679ce7a096cdeb000f542282","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","679ce7a096cdeb000f542283","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","679ce7a096cdeb000f542284","679ce7a096cdeb000f542285","679ce7a096cdeb000f542286","679ce7a096cdeb000f5423e5"],"pdfStatus":"","project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2025-01-31T15:09:19.440Z","__v":1,"updatedAt":"2025-01-31T15:09:52.432Z","forked_from":"61127b93152a69007f6f75ee","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},{"_id":"6810d743b32a3c0011bc960e","version":"1.0-FixFlutter","version_clean":"1.0.0-FixFlutter","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","source":"readme","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-04-29T13:42:27.003Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-04-29T13:42:27.004Z","updatedAt":"2025-04-29T13:42:27.003Z","__v":0},{"_id":"68024865817782003538000a","version":"1.0-codebase-analyzer-vscode-guide","version_clean":"1.0.0-codebase-analyzer-vscode-guide","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","source":"readme","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-04-18T12:41:09.034Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-04-18T12:41:09.036Z","updatedAt":"2025-04-18T12:41:09.034Z","__v":0},{"_id":"67d9391510ba08004c38f4da","version":"1.0-flutter","version_clean":"1.0.0-flutter","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-03-18T09:12:53.380Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-03-18T09:12:53.381Z","updatedAt":"2025-03-18T09:12:53.380Z","__v":0},{"_id":"67e6ffd0e78129003dc55824","version":"1.0-js-fix","version_clean":"1.0.0-js-fix","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","source":"readme","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-03-28T20:00:16.414Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-03-28T20:00:16.416Z","updatedAt":"2025-03-28T20:00:16.414Z","__v":0},{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]}],"variableDefaults":[{"source":"","_id":"6373cab5f93f9f125712b7fe","name":"apiurl","default":"https://decision.flagship.io/v2","type":""},{"source":"","_id":"611a8b3ccd1de0002364b7fb","name":"toto","default":"coucou","type":""},{"source":"security","_id":"64196db40dab86002d6afe1b","name":"Authorization","type":"apiKey","apiSetting":"632320b7a3ed67005851f378"}],"webhookEnabled":false,"isHubEditable":true},"projectStore":{"data":{"allow_crawlers":"disabled","canonical_url":null,"default_version":{"name":"1.0"},"description":"Learn about using Flagship, AB Tasty's Feature and Experimentation Management platform. Direct access to API reference and SDKs, how to's and developer guides.","git":{"connection":{"repository":{"full_name":"flagship-io/readme.io","name":"readme.io","provider_type":"github","url":"https://github.com/flagship-io/readme.io"},"organization":{"name":"flagship-io","provider_type":"github"},"status":"active"}},"glossary":[{"_id":"611fb9eba0648a0018313b47","term":"KPI","definition":"Collect events and analysed through the KPIs feature inside your report. You can set all the KPIs you want to analysed in the first step of the use case creation."},{"_id":"611fb9fb3fc26b0204e56988","term":"flags","definition":"A flag is a variable present in your code that you want to act on with a specific value (Boolean, integer, string). That variable can also be called Dynamic Variable or Remote Variable.\nFlagship will be the remote for the feature behind the flag."},{"_id":"611fba1354861501f2a2872a","term":"Server SDK","definition":"A Server SDK is a library present in your server.\nIt manages several users at a time (thousands/billions)."},{"_id":"611fba4962a583002c503523","term":"Client SDK","definition":"A Client SDK is a library present in the code of the device (mobile, browser, IoT, ...) and serves only one user at a time.\nExample: An Android application would benefit from the Android SDK. That SDK is directly present inside the code of the application, on the device of the user. That's a client SDK. It also means that it serves only one user at a time."},{"_id":"611fba60c0d2f70241d2c0a0","term":"Environments","definition":"Each environment gives the customer the possibility to separate their features and experiments inside the platform: the ones which are already in production from the ones which have not been released yet and are still in QA."},{"_id":"611fba81210c990022e60eaa","term":"Panic Mode","definition":"The panic mode is a way to not display any modifications set up in Flagship anymore. It could be also used as a \"Code Freeze mode\""},{"_id":"611fbada60399d025030d6e1","term":"visitorId","definition":"The visitorId has to be unique for each user/visitor. Thanks to that ID, you can guarantee the same experience to each of your users every time."},{"_id":"611fbb5ebe6f91002b629916","term":"user context","definition":"It enables you to target your visitors/users. Each user has a context with some criteria."}],"homepage_url":"https://www.flagship.io","id":"5e4aa55643caba00730ba9bd","name":"Developer Docs | Flagship","parent":null,"redirects":[],"sitemap":"disabled","llms_txt":"disabled","subdomain":"flagship","suggested_edits":"enabled","uri":"/projects/me","variable_defaults":[{"name":"apiurl","default":"https://decision.flagship.io/v2","source":"","type":"","id":"6373cab5f93f9f125712b7fe"},{"name":"toto","default":"coucou","source":"","type":"","id":"611a8b3ccd1de0002364b7fb"},{"name":"Authorization","source":"security","type":"apiKey","id":"64196db40dab86002d6afe1b"}],"webhooks":[],"api_designer":{"allow_editing":"enabled"},"custom_login":{"login_url":null,"logout_url":null},"features":{"mdx":"enabled"},"mcp":{},"onboarding_completed":{"api":true,"appearance":true,"documentation":true,"domain":false,"jwt":true,"logs":true,"metricsSDK":false},"pages":{"not_found":null},"privacy":{"openapi":"admin","password":null,"view":"public"},"refactored":{"status":"enabled","migrated":"successful"},"seo":{"overwrite_title_tag":"disabled"},"plan":{"type":"startup2018","grace_period":{"enabled":false,"end_date":null},"trial":{"expired":false,"end_date":"2020-03-17T14:38:14.358Z"}},"reference":{"api_sdk_snippets":"enabled","defaults":"always_use","json_editor":"disabled","oauth_flows":"disabled","request_history":"enabled","response_examples":"collapsed","response_schemas":"collapsed","sdk_snippets":{"external":"disabled"}},"health_check":{"provider":"none","settings":{"manual":{"status":"down","url":null},"statuspage":{"id":null}}},"integrations":{"aws":{"readme_webhook_login":{"region":null,"external_id":null,"role_arn":null,"usage_plan_id":null}},"bing":{"verify":null},"google":{"analytics":null,"site_verification":null},"heap":{"id":null},"koala":{"key":null},"localize":{"key":null},"postman":{"key":null,"client_id":null,"client_secret":null},"recaptcha":{"site_key":null,"secret_key":null},"segment":{"key":null,"domain":null},"speakeasy":{"key":null},"stainless":{"key":null,"name":null},"typekit":{"key":null},"zendesk":{"subdomain":null},"intercom":{"app_id":null,"secure_mode":{"key":null,"email_only":false}}},"permissions":{"appearance":{"private_label":"disabled","custom_code":{"css":"disabled","html":"disabled","js":"disabled"}}},"appearance":{"brand":{"primary_color":"#3100BE","link_color":"#A3B902","theme":"system"},"changelog":{"layout":"collapsed","show_author":true,"show_exact_date":false},"markdown":{"callouts":{"icon_font":"emojis"}},"table_of_contents":"enabled","whats_next_label":null,"footer":{"readme_logo":"hide"},"logo":{"size":"large","dark_mode":{"uri":"/images/66e21f7faad094004498a762","url":"https://files.readme.io/d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png","name":"d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png","width":523,"height":80,"color":"#ffffff","links":{"original_url":"https://files.readme.io/6cf190bece7dc0371b785f67199f09f459b86ab7be06d734b43da8515bf73c31-Logo.FER.White.Small.png"}},"main":{"uri":"/images/66e21f780960780069648645","url":"https://files.readme.io/924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png","name":"924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png","width":523,"height":80,"color":"#dcdce4","links":{"original_url":"https://files.readme.io/5bebeb29e71174ae8ef3ef721b54658f2fde9ed63b6c9b7a1ba5dee0adf17ce5-Logo.FER.Blue.Small.png"}},"favicon":{"uri":"/images/66e21fb3ab0cd3000f012006","url":"https://files.readme.io/f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png","name":"f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png","width":35,"height":32,"color":"#d4fc04","links":{"original_url":"https://files.readme.io/cb34f6c05c74f4a3266c28591a27fb0115bf92ba95d1472c85a3bfa877456a18-ABTasty_Marque_Yellow_small.png"}}},"custom_code":{"css":null,"js":null,"html":{"header":"","home_footer":null,"page_footer":null}},"header":{"type":"solid","gradient_color":null,"link_style":"buttons","overlay":{"fill":"auto","type":"circuits","position":"top-left","image":{"uri":null,"url":null,"name":null,"width":null,"height":null,"color":null,"links":{"original_url":null}}}},"ai":{"dropdown":"enabled","options":{"chatgpt":"enabled","claude":"enabled","clipboard":"enabled","copilot":"enabled","view_as_markdown":"enabled"}},"navigation":{"first_page":"landing_page","left":[{"type":"link_url","title":"Developer Documentation","url":"https://docs.developers.flagship.io/","custom_page":null}],"logo_link":"landing_page","page_icons":"enabled","right":[{"type":"search_box","title":null,"url":null,"custom_page":null},{"type":"user_controls","title":null,"url":null,"custom_page":null}],"sub_nav":[],"subheader_layout":"dropdown","version":"disabled","links":{"home":{"label":"Home","visibility":"enabled"},"graphql":{"label":"GraphQL","visibility":"disabled"},"guides":{"label":"Guides","alias":null,"visibility":"enabled"},"reference":{"label":"API Reference","alias":null,"visibility":"enabled"},"recipes":{"label":"Recipes","alias":null,"visibility":"disabled"},"changelog":{"label":"Changelog","alias":null,"visibility":"disabled"},"discussions":{"label":"Discussions","alias":null,"visibility":"disabled"}}}}}},"version":{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]}},"is404":false,"isDetachedProductionSite":false,"lang":"en","langFull":"Default","reqUrl":"/docs/emotion-ai","version":{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},"gitVersion":{"base":null,"display_name":null,"name":"1.0","release_stage":"release","source":"readme","state":"current","updated_at":"2025-06-10T17:13:30.000Z","uri":"/branches/1.0","privacy":{"view":"default"}},"versions":{"total":7,"page":1,"per_page":100,"paging":{"next":null,"previous":null,"first":"/flagship/api-next/v2/branches?page=1&per_page=100","last":null},"data":[{"base":"1.0","display_name":"0.0.0-preprod","name":"0.0.0-preprod","release_stage":"release","source":"readme","state":"current","updated_at":"2025-01-29T16:01:34.974Z","uri":"/branches/0.0.0-preprod","privacy":{"view":"hidden"}},{"base":"1.0","display_name":"Flagship Reference","name":"0.1.1-doc","release_stage":"release","source":"readme","state":"current","updated_at":"2025-01-31T15:12:30.626Z","uri":"/branches/0.1.1-doc","privacy":{"view":"hidden"}},{"base":null,"display_name":null,"name":"1.0","release_stage":"release","source":"readme","state":"current","updated_at":"2025-06-10T17:13:30.354Z","uri":"/branches/1.0","privacy":{"view":"default"}},{"base":"1.0","display_name":null,"name":"1.0-flutter","release_stage":"release","source":"readme","state":"current","updated_at":"2025-04-07T10:21:28.603Z","uri":"/branches/1.0-flutter","privacy":{"view":"hidden"}},{"base":"1.0","display_name":null,"name":"1.0-js-fix","release_stage":"release","source":"readme","state":"current","updated_at":"2025-03-28T20:20:54.314Z","uri":"/branches/1.0-js-fix","privacy":{"view":"hidden"}},{"base":"1.0","display_name":null,"name":"1.0-codebase-analyzer-vscode-guide","release_stage":"release","source":"readme","state":"current","updated_at":"2025-04-18T12:43:24.020Z","uri":"/branches/1.0-codebase-analyzer-vscode-guide","privacy":{"view":"hidden"}},{"base":"1.0","display_name":null,"name":"1.0-FixFlutter","release_stage":"release","source":"readme","state":"current","updated_at":"2025-04-29T13:43:48.182Z","uri":"/branches/1.0-FixFlutter","privacy":{"view":"hidden"}}]}}">