This document explains the sync logic used in the trace mobile app.
Syncing in the trace mobile app is the process that updates the data between the trance mobile app and the trance backend. Since the app supports offline features we have to update new data from the app to the backend and vice versa.
Initial sync is happens on onboarding screen and it starts after login and user details APIs.When initial sync starts syncStage is updated to 1 and syncInProgress updated to true.Initial sync starts from company details API and end on farmer list API. After initial sync user is user will get continue option on onboarding screen to go to home page.Then syncStage is updated to 2, syncInProgress to false and, syncSuccessfull to true.
Company details:
Getting company details from server side and API response is saved in userCompanyDetails redux state.
Project details:
Getting project details from server side and API response is saved in userProjectDetails redux state. Also updating project premium table from premiums in this api response.
New farmers:
Syncing newly added farmers from app to server side.
New cards:
Syncing newly added cards from app to server side.
Buy transactions:
Syncing newly added buy transactions from app to server side.
Send transactions:
Syncing newly added buy transactions from app to server side.
Transaction invoices:
If the transaction verification method is manual then transaction invoice need to sync from app to server side.
Updated farmers:
Syncing updated farmer from app to server side.
Product list:
Syncing product list and updates from server side to app.
Buyer list:
Syncing buyer list and updates from server side to app.
Farmer list:
Syncing farmer list and updates from server side to app.
Transaction sync happens when user on dashboard after login. syncStage will be 2, transaction list and batch list will be synced from server side to app.After transaction sync, syncStage will be updated to 3. Syncing progress can be see in transaction list page.
Transaction list:
Syncing transaction list and updates from server side to app.
Batch list
Syncing batch list and updates from server side to app.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Trace Knowledge Center","colors":{"primary":"#4DCAF4","light":"#91DDF5","dark":"#003A60"},"favicon":"https://mintcdn.com/fairfood/mue2WthdgXa-O-CD/logo/dark.svg?fit=max\u0026auto=format\u0026n=mue2WthdgXa-O-CD\u0026q=85\u0026s=a1a5cf2a9e2c9bd33a8a113f3c0b6238","logo":{"light":"https://mintcdn.com/fairfood/wZv_VjTAcDs8jOQ0/logo/fairfood_logo.png?fit=max\u0026auto=format\u0026n=wZv_VjTAcDs8jOQ0\u0026q=85\u0026s=d96a6f0638fe2bddf54518ba5307fc57","dark":"https://mintcdn.com/fairfood/wZv_VjTAcDs8jOQ0/logo/fairfood_logo.png?fit=max\u0026auto=format\u0026n=wZv_VjTAcDs8jOQ0\u0026q=85\u0026s=d96a6f0638fe2bddf54518ba5307fc57"},"api":{"openapi":["openapi.yml"]},"background":{"decoration":null,"color":{"light":null,"dark":"#090014"}},"navbar":{"links":[{"label":"Support","href":"mailto:support@fairfood.org"}],"primary":{"type":"button","label":"GitHub","href":"https://github.com/orgs/Fairfood/repositories"}},"footer":{"socials":{"twitter":"https://twitter.com/mintlify","github":"https://github.com/mintlify","linkedin":"https://www.linkedin.com/company/mintsearch"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fairfood","hasAudioNarration":false,"actualSubdomain":"fairfood","customDomains":["docs.fairfood.org"],"gitSource":{"type":"github","owner":"fairfood","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aa0141ec6ea76bd4f7650ab","collectionId":"eb6925c6-2921-4629-bab9-6c5f6f89c36e","schemaVersion":"v2","latestBuiltDeploymentHistoryId":"6aa0141ec6ea76bd4f7650ab"},"entitlements":{},"buildId":"6aa0141ec6ea76bd4f7650ab","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Documentation","count":43},{"language":"default","tag":"API Documentation","count":33},{"language":"default","tag":"Trace Connect APIs","count":32},{"language":"default","tag":"Support","count":25},{"language":"default","tag":"Advanced APIs","count":21},{"language":"default","tag":"Connect","count":13},{"language":"default","tag":"App","count":11},{"language":"default","tag":"Trace Dashboard","count":10},{"language":"default","tag":"Supply Chain","count":8},{"language":"default","tag":"Basic APIs","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"sync_logic","slug":"/sync_logic","pageMetadata":{"title":"Sync logic","description":null,"href":"/sync_logic"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={em:`em`,li:`li`,ol:`ol`,p:`p`,..._provideComponents(),...props.components},{Heading,Tip}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Tip,{children:`This document explains the sync logic used in the trace mobile app.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.em,{children:`Syncing in the trace mobile app is the process that updates the data between the trance mobile app and the trance backend. Since the app supports offline features we have to update new data from the app to the backend and vice versa.`})}),`\n`,_jsx(Heading,{level:`3`,id:`sync-types`,children:`Sync types`}),`\n`,_jsx(Tip,{children:`Sync types are defined with which types of data are syncing.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Company details`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Project details`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`New farmers`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`New cards`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Buy transactions`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Send transactions`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Transaction invoices`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Updated farmers`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Product list`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Buyer list`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Farmer list`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Transaction list`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Batch list`}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`sync-variables`,children:`Sync variables`}),`\n`,_jsx(Tip,{children:`Syncing is done with 3 different stages. `}),`\n`,_jsx(_components.p,{children:`Stage 1: Initial sync`}),`\n`,_jsx(_components.p,{children:`Stage 2: Transaction sync`}),`\n`,_jsx(_components.p,{children:`Stage 3: Normal sync`}),`\n`,_jsx(Heading,{level:`3`,id:`1-initial-sync`,children:`1. Initial sync`}),`\n`,_jsx(_components.p,{children:`Initial sync is happens on onboarding screen and it starts after login and user details APIs.`}),`\n`,_jsx(_components.p,{children:`When initial sync starts syncStage is updated to 1 and syncInProgress updated to true.`}),`\n`,_jsx(_components.p,{children:`Initial sync starts from company details API and end on farmer list API. After initial sync user is user will get continue option on onboarding screen to go to home page.`}),`\n`,_jsx(_components.p,{children:`Then syncStage is updated to 2, syncInProgress to false and, syncSuccessfull to true.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Company details:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Getting company details from server side and API response is saved in userCompanyDetails redux state.`}),`\n`,_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsx(_components.li,{children:`Project details:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Getting project details from server side and API response is saved in userProjectDetails redux state. Also updating project premium table from premiums in this api response.`}),`\n`,_jsxs(_components.ol,{start:`3`,children:[`\n`,_jsx(_components.li,{children:`New farmers:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing newly added farmers from app to server side.`}),`\n`,_jsxs(_components.ol,{start:`4`,children:[`\n`,_jsx(_components.li,{children:`New cards:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing newly added cards from app to server side.`}),`\n`,_jsxs(_components.ol,{start:`5`,children:[`\n`,_jsx(_components.li,{children:`Buy transactions:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing newly added buy transactions from app to server side.`}),`\n`,_jsxs(_components.ol,{start:`6`,children:[`\n`,_jsx(_components.li,{children:`Send transactions:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing newly added buy transactions from app to server side.`}),`\n`,_jsxs(_components.ol,{start:`7`,children:[`\n`,_jsx(_components.li,{children:`Transaction invoices:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`If the transaction verification method is manual then transaction invoice need to sync from app to server side.`}),`\n`,_jsxs(_components.ol,{start:`8`,children:[`\n`,_jsx(_components.li,{children:`Updated farmers:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing updated farmer from app to server side.`}),`\n`,_jsxs(_components.ol,{start:`9`,children:[`\n`,_jsx(_components.li,{children:`Product list:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing product list and updates from server side to app.`}),`\n`,_jsxs(_components.ol,{start:`10`,children:[`\n`,_jsx(_components.li,{children:`Buyer list:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing buyer list and updates from server side to app.`}),`\n`,_jsxs(_components.ol,{start:`11`,children:[`\n`,_jsx(_components.li,{children:`Farmer list:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing farmer list and updates from server side to app.`}),`\n`,_jsx(Heading,{level:`3`,id:`2-transaction-sync`,children:`2. Transaction sync`}),`\n`,_jsx(_components.p,{children:`Transaction sync happens when user on dashboard after login. syncStage will be 2, transaction list and batch list will be synced from server side to app.`}),`\n`,_jsx(_components.p,{children:`After transaction sync, syncStage will be updated to 3. Syncing progress can be see in transaction list page.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Transaction list:`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing transaction list and updates from server side to app.`}),`\n`,_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsx(_components.li,{children:`Batch list`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Syncing batch list and updates from server side to app.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Sync logic","description":null,"href":"/sync_logic"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Sync types","slug":"sync-types","depth":3,"children":[]},{"title":"Sync variables","slug":"sync-variables","depth":3,"children":[]},{"title":"1. Initial sync","slug":"1-initial-sync","depth":3,"children":[]},{"title":"2. Transaction sync","slug":"2-transaction-sync","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"fairfood","siteName":"Trace Knowledge Center","title":"Sync logic - Trace Knowledge Center","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T23:47:47.113Z","originalFileLocation":"sync_logic.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Trace Knowledge Center\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Sync logic - Trace Knowledge Center\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Trace Knowledge Center\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fairfood.org/sync_logic\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://fairfood.mintlify.app/_mintlify/api/og/v2?division=Development\u0026amp;title=Sync+logic\u0026amp;theme=9c73c1d1f41ea162950a8f00\u0026amp;signature=d23a824189643a66b9e7952415dd0ce6a09a2e2605ee661abdf3a4e64dc6bf9d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Sync logic - Trace Knowledge Center\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://fairfood.mintlify.app/_mintlify/api/og/v2?division=Development\u0026amp;title=Sync+logic\u0026amp;theme=9c73c1d1f41ea162950a8f00\u0026amp;signature=d23a824189643a66b9e7952415dd0ce6a09a2e2605ee661abdf3a4e64dc6bf9d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/fairfood/G1F8ya8LTfEgmklL/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Trace Knowledge Center\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4DCAF4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fairfood.org/sync_logic\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sync_logic.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.fairfood.org/#organization\",\"name\":\"Trace Knowledge Center\",\"url\":\"https://docs.fairfood.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/fairfood/wZv_VjTAcDs8jOQ0/logo/fairfood_logo.png?fit=max\u0026auto=format\u0026n=wZv_VjTAcDs8jOQ0\u0026q=85\u0026s=d96a6f0638fe2bddf54518ba5307fc57\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fairfood.org#website\",\"name\":\"Trace Knowledge Center\",\"url\":\"https://docs.fairfood.org\",\"publisher\":{\"@id\":\"https://docs.fairfood.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fairfood.org/sync_logic#webpage\",\"url\":\"https://docs.fairfood.org/sync_logic\",\"name\":\"Sync logic\",\"dateModified\":\"2026-01-06T23:47:47.113Z\",\"isPartOf\":{\"@id\":\"https://docs.fairfood.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fairfood.org/sync_logic#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fairfood.org/sync_logic#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Development\",\"item\":\"https://docs.fairfood.org/trace_connect\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sync logic\",\"item\":\"https://docs.fairfood.org/sync_logic\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.fairfood.org/sync_logic#article\",\"headline\":\"Sync logic\",\"name\":\"Sync logic\",\"url\":\"https://docs.fairfood.org/sync_logic\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fairfood.org/sync_logic#webpage\"},\"dateModified\":\"2026-01-06T23:47:47.113Z\",\"publisher\":{\"@id\":\"https://docs.fairfood.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fairfood.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Trace Knowledge Center\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Trace Knowledge Center","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Introduction","pages":[{"title":"Trace Knowledge Center","href":"/introduction"},{"title":"Toolbox","href":"/toolbox"}]},{"group":"Support","pages":[{"group":"Trace Dashboard","pages":[{"title":"How login to Trace","href":"/how_login"},{"title":"Dashboard","href":"/trace_dashboard"},{"title":"Company profile","href":"/trace_company_profile"},{"title":"Connections","href":"/trace_connections"},{"title":"Requests","href":"/trace _requests"},{"title":"Transactions","href":"/trace_transactions"},{"title":"Stock","href":"/trace_stock"},{"title":"Claims","href":"/trace_claims"},{"title":"Export tables","href":"/trace_export"},{"title":"Sync data","href":"/trace_sync"}]},{"group":"Connect","pages":[{"group":"App","pages":[{"title":"Install \u0026 Update","href":"/install_app"},{"title":"SSO Login","href":"/login_app"},{"title":"Buy products","href":"/buy_products_app"},{"title":"Sell option","href":"/sell_products_app"},{"title":"Transactions","href":"/transactions_app"},{"title":"Onboarding Farmers","href":"/onboarding_farmers"},{"title":"User Profile","href":"/app_user_profile"},{"title":"Clear data and logout","href":"/app_clear_data"},{"title":"View / Print Invoice","href":"/Printinvoice"},{"title":"Data Migration","href":"/data_migration"},{"title":"More features","href":"/more_features"}]},{"title":null,"href":"/Connect-Library"},{"title":null,"href":"/Configure Connect Clients"}]},{"group":"Storytelling","pages":[{"title":"Trace -Storytelling Interface","href":"/storytelling_interface"}]},{"group":"Navigate","pages":[{"title":"Navigate","href":"/navigate"}]}]},{"group":"Development","pages":[{"title":"Trace Connect","description":null,"href":"/trace_connect"},{"title":"Sync logic","href":"/sync_logic"},{"title":"App packages","description":"Google Analytics integrated within the Trace Mobile App allows for the collection of data, enabling the creation of reports that showcase user interaction with the app.","href":"/app_packages"},{"title":"Google Analytics - Trace Mobile App","href":"/google_analytics"},{"group":"API Documentation","pages":[{"title":"Authentication","href":"/authentication"}]}]},{"group":"Updates","pages":[{"group":"Release notes","pages":[{"title":"Trace Dashboard Release Notes","href":"/release_notes_dashboard"},{"title":"Mobile App Release Notes","href":"/mobile_app_release_notes"},{"title":"Storytelling Release Notes","href":"/storytelling_release_notes"}]}]},{"group":"Others","pages":[{"title":"Farmer card","href":"/farmercard"}]},{"group":"Blogs","pages":[{"group":"Quarterly report","pages":[{"title":"Trace Tech: 2023 Q1 Highlights\n\n","href":"/trace_updates_q1_2023"},{"title":"Trace Tech: 2023 Q2 Highlights\n\n","href":"/trace_updates_q2_2023"},{"title":"Trace Tech: 2023 Q3 Highlights","href":"/trace_update_q3_2023"},{"title":"Trace Tech: 2023 Q4 Highlights","href":"/trace_update_q4_2023"}]}]},{"group":"Design Sytem","pages":[{"title":"Brand","href":"/design_system_brand"},{"title":"Foundations","href":"/design_system_foundations"}]},{"group":"Security \u0026 Privacy","pages":[{"title":"Connect app Privacy Policy","href":"/privacy_policy"}]}]},{"tab":"API Documentation","pages":[{"title":"API Documentation","href":"/api-references/introduction"}]}]},"title":"Sync logic - Trace Knowledge Center","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":[],"chunks":[]}