What is_order_sm_valid means, why it matters, and how to use it correctly in queries.
is_order_sm_valid is the primary filter for order-based analysis. It tells you whether an order should be included in reporting.
If you’re querying obt_orders or obt_order_lines, start with:
WHERE is_order_sm_valid = TRUE.
What it means
At a high level:
TRUE: include the order in revenue / order-count reporting
FALSE: exclude the order (e.g., cancelled/voided/draft/uncollectible and other non-reportable states)
SourceMedium computes this at the order-line level and rolls it up to orders. An order is valid if it has at least one valid order line.
What makes an order invalid
For current standard order tables, an order is invalid when any of these are true:
Payment status is missing, or is voided, cancelled, uncollectible, draft, or refunded.
The order was cancelled for fraud or a declined payment. These are excluded even if the order still shows as paid, because the payment was never genuinely collected.
Channel is outside Online DTC, Amazon, Retail, Wholesale, or TikTok Shop. The sales channel table shows which sm_channel values count.
The merchant has exclude-$0-sales enabled and the order’s net revenue is 0.
Two common edge cases:
Unpaid or payment-due orders are not excluded just because they are unpaid. They are valid unless they hit one of the invalid conditions above.
Gift-card-only orders are flagged separately as is_order_only_gift_cards on order-line tables. They are not excluded by is_order_sm_valid itself, unless your store has Exclude $0 Orders on, because their net revenue is $0. Some report tables may exclude them from placed-order counts.
Why it matters
Most “why don’t my numbers match” issues come from one of these:
Missing the is_order_sm_valid = TRUE filter
Mixing valid + invalid orders across joined tables
Comparing valid-order metrics to external exports that include cancelled/test orders
Recommended query pattern
SELECT COUNT(*) AS valid_order_count, SUM(order_net_revenue) AS net_revenueFROM `your_project.sm_transformed_v2.obt_orders`WHERE is_order_sm_valid = TRUE AND order_processed_at_local_datetime >= DATETIME_SUB(CURRENT_DATETIME(), INTERVAL 30 DAY);
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SourceMedium","colors":{"primary":"#A084FC","light":"#BAA6FC","dark":"#A084FC"},"logo":{"light":"https://mintcdn.com/sourcemedium/OjSPvBj0a9ize7d2/logo/light.png?fit=max\u0026auto=format\u0026n=OjSPvBj0a9ize7d2\u0026q=85\u0026s=ba06a2e9bd59b5f68b0d9a5293f04a59","dark":"https://mintcdn.com/sourcemedium/OjSPvBj0a9ize7d2/logo/dark.png?fit=max\u0026auto=format\u0026n=OjSPvBj0a9ize7d2\u0026q=85\u0026s=5e84a70aace4dd33fa1c91426acce72a","href":"https://sourcemedium.com"},"favicon":"https://mintcdn.com/sourcemedium/pt-qB7Ich-aAP65i/favicon.png?fit=max\u0026auto=format\u0026n=pt-qB7Ich-aAP65i\u0026q=85\u0026s=0f2c4639e64047f9b27d40e07f581618","appearance":{"default":"light","strict":false},"navbar":{"links":[{"href":"https://sourcemedium.com/case-study/","label":"Customer stories"},{"href":"https://sourcemedium.com/docs/data-inputs/platform-integration-instructions/all-available-integrations","label":"Integrations"}],"primary":{"type":"button","label":"Get started","href":"https://sourcemedium.com/request-demo"}},"footer":{"socials":{"twitter":"https://twitter.com/sourcemediumhq","linkedin":"https://www.linkedin.com/company/sourcemedium"}},"seo":{"metatags":{"canonical":"https://sourcemedium.com/docs"}},"integrations":{"ga4":{"measurementId":"G-LKSGE9NY1B"},"posthog":{"apiKey":"phc_yEZthPWGFIyJz42b7EPyqO7lPFRzjvDBJaw21cDcRmX","apiHost":"https://us.i.posthog.com","sessionRecording":true}},"errors":{"404":{"redirect":false,"title":"That page moved or no longer exists","description":"Try the [docs home](/index) to pick a section, [search the glossary](/help-center/glossary) for a term, or [open a support request from your workspace](/product-tours/get-support)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sourcemedium","hasAudioNarration":false,"actualSubdomain":"sourcemedium","customDomains":["docs.sourcemedium.com"],"gitSource":{"type":"github","owner":"source-medium","repo":"sourcemedium-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b08c2ca572bfd10997ac204","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"Connect","count":109},{"language":"default","tag":"Warehouse","count":74},{"language":"default","tag":"Tables","count":51},{"language":"default","tag":"Dashboards","count":45},{"language":"default","tag":"sm_transformed_v2","count":42},{"language":"default","tag":"Data Studio dashboard","count":28},{"language":"default","tag":"Marketing \u0026 Advertising","count":28},{"language":"default","tag":"How your data works","count":26},{"language":"default","tag":"Dashboard modules","count":21},{"language":"default","tag":"Ecommerce \u0026 Subscription","count":21}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"site-roles","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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"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":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"help-center/core-concepts/data-definitions/is-order-sm-valid","slug":"/help-center/core-concepts/data-definitions/is-order-sm-valid","pageMetadata":{"title":"Valid orders (is_order_sm_valid)","description":"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.","sidebarTitle":"Valid orders","icon":"shield-check","href":"/help-center/core-concepts/data-definitions/is-order-sm-valid"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"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={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`is_order_sm_valid`}),` is the `,_jsx(_components.strong,{children:`primary filter`}),` for order-based analysis. It tells you whether an order should be included in reporting.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you’re querying `,_jsx(_components.code,{children:`obt_orders`}),` or `,_jsx(_components.code,{children:`obt_order_lines`}),`, start with:\n`,_jsx(_components.code,{children:`WHERE is_order_sm_valid = TRUE`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-it-means`,children:`What it means`}),`\n`,_jsx(_components.p,{children:`At a high level:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TRUE`}),`: include the order in revenue / order-count reporting`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`FALSE`}),`: exclude the order (e.g., cancelled/voided/draft/uncollectible and other non-reportable states)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`SourceMedium computes this at the order-line level and rolls it up to orders. An order is valid if it has at least one valid order line.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-makes-an-order-invalid`,children:`What makes an order invalid`}),`\n`,_jsx(_components.p,{children:`For current standard order tables, an order is invalid when any of these are true:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Payment status is missing, or is `,_jsx(_components.code,{children:`voided`}),`, `,_jsx(_components.code,{children:`cancelled`}),`, `,_jsx(_components.code,{children:`uncollectible`}),`, `,_jsx(_components.code,{children:`draft`}),`, or `,_jsx(_components.code,{children:`refunded`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The order was cancelled for `,_jsx(_components.code,{children:`fraud`}),` or a `,_jsx(_components.code,{children:`declined`}),` payment. These are excluded `,_jsxs(_components.strong,{children:[`even if the order still shows as `,_jsx(_components.code,{children:`paid`})]}),`, because the payment was never genuinely collected.`]}),`\n`,_jsxs(_components.li,{children:[`Channel is outside `,_jsx(_components.code,{children:`Online DTC`}),`, `,_jsx(_components.code,{children:`Amazon`}),`, `,_jsx(_components.code,{children:`Retail`}),`, `,_jsx(_components.code,{children:`Wholesale`}),`, or `,_jsx(_components.code,{children:`TikTok Shop`}),`. The `,_jsx(_components.a,{href:`/data-transformations/order-segmentation/sales-channel#standard-channel-values`,children:`sales channel table`}),` shows which `,_jsx(_components.code,{children:`sm_channel`}),` values count.`]}),`\n`,_jsxs(_components.li,{children:[`The merchant has exclude-$0-sales enabled and the order’s net revenue is `,_jsx(_components.code,{children:`0`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Two common edge cases:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Unpaid or payment-due orders are not excluded just because they are unpaid. They are valid unless they hit one of the invalid conditions above.`}),`\n`,_jsxs(_components.li,{children:[`Gift-card-only orders are flagged separately as `,_jsx(_components.code,{children:`is_order_only_gift_cards`}),` on order-line tables. They are not excluded by `,_jsx(_components.code,{children:`is_order_sm_valid`}),` itself, unless your store has Exclude `,`$0 Orders on, because their net revenue is $`,`0. Some report tables may exclude them from placed-order counts.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`why-it-matters`,children:`Why it matters`}),`\n`,_jsx(_components.p,{children:`Most “why don’t my numbers match” issues come from one of these:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Missing the `,_jsx(_components.code,{children:`is_order_sm_valid = TRUE`}),` filter`]}),`\n`,_jsx(_components.li,{children:`Mixing valid + invalid orders across joined tables`}),`\n`,_jsx(_components.li,{children:`Comparing valid-order metrics to external exports that include cancelled/test orders`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`recommended-query-pattern`,children:`Recommended query pattern`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COUNT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` valid_order_count,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(order_net_revenue) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` net_revenue`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `your_project.sm_transformed_v2.obt_orders`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` is_order_sm_valid `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TRUE`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AND`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` order_processed_at_local_datetime `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` DATETIME_SUB(CURRENT_DATETIME(), INTERVAL `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` DAY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`related-resources`,children:`Related resources`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/data-activation/template-resources/sql-query-library`,children:`SQL Query Library`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/data-activation/data-tables/sm_transformed_v2/obt_orders`,children:_jsx(_components.code,{children:`obt_orders`})})}),`\n`]})]})}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":"Valid orders (is_order_sm_valid)","description":"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.","sidebarTitle":"Valid orders","icon":"shield-check","href":"/help-center/core-concepts/data-definitions/is-order-sm-valid"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What it means","slug":"what-it-means","depth":2,"children":[]},{"title":"What makes an order invalid","slug":"what-makes-an-order-invalid","depth":2,"children":[]},{"title":"Why it matters","slug":"why-it-matters","depth":2,"children":[]},{"title":"Recommended query pattern","slug":"recommended-query-pattern","depth":2,"children":[]},{"title":"Related resources","slug":"related-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"sourcemedium","siteName":"SourceMedium","title":"Valid orders (is_order_sm_valid) - SourceMedium","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-21T07:10:04.722Z","originalFileLocation":"help-center/core-concepts/data-definitions/is-order-sm-valid.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=\"light\"}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=\"description\" content=\"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SourceMedium\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_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=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Valid orders (is_order_sm_valid) - SourceMedium\">\u003cmeta data-mint-head property=\"og:description\" content=\"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SourceMedium\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sourcemedium.mintlify.site/docs/_mintlify/api/og/v2?division=How+numbers+are+defined\u0026amp;title=Valid+orders+%28is_order_sm_valid%29\u0026amp;description=What+is_order_sm_valid+means%2C+why+it+matters%2C+and+how+to+use+it+correctly+in+queries.\u0026amp;theme=e85dc6896c3d34dff0291eab\u0026amp;signature=3e246eefdacf59f25f5f53ae31a9879cdaf9d3c8ebc2d269424740fa022fb2fd\">\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=\"Valid orders (is_order_sm_valid) - SourceMedium\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sourcemedium.mintlify.site/docs/_mintlify/api/og/v2?division=How+numbers+are+defined\u0026amp;title=Valid+orders+%28is_order_sm_valid%29\u0026amp;description=What+is_order_sm_valid+means%2C+why+it+matters%2C+and+how+to+use+it+correctly+in+queries.\u0026amp;theme=e85dc6896c3d34dff0291eab\u0026amp;signature=3e246eefdacf59f25f5f53ae31a9879cdaf9d3c8ebc2d269424740fa022fb2fd\">\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=\"/docs/mintlify-assets/_mintlify/favicons/sourcemedium/UPM2GdCpP7mp5Nu9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SourceMedium\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#A084FC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/help-center/core-concepts/data-definitions/is-order-sm-valid.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://sourcemedium.com/#organization\",\"name\":\"SourceMedium\",\"url\":\"https://sourcemedium.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/sourcemedium/OjSPvBj0a9ize7d2/logo/light.png?fit=max\u0026auto=format\u0026n=OjSPvBj0a9ize7d2\u0026q=85\u0026s=ba06a2e9bd59b5f68b0d9a5293f04a59\"}},{\"@type\":\"WebSite\",\"@id\":\"https://sourcemedium.com/docs#website\",\"name\":\"SourceMedium\",\"url\":\"https://sourcemedium.com/docs\",\"publisher\":{\"@id\":\"https://sourcemedium.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid#webpage\",\"url\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid\",\"name\":\"Valid orders (is_order_sm_valid)\",\"description\":\"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.\",\"dateModified\":\"2026-11-21T07:10:04.722Z\",\"isPartOf\":{\"@id\":\"https://sourcemedium.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"How numbers are defined\",\"item\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Valid orders (is_order_sm_valid)\",\"item\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid#article\",\"headline\":\"Valid orders (is_order_sm_valid)\",\"name\":\"Valid orders (is_order_sm_valid)\",\"description\":\"What is_order_sm_valid means, why it matters, and how to use it correctly in queries.\",\"url\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid\",\"mainEntityOfPage\":{\"@id\":\"https://sourcemedium.com/docs/help-center/core-concepts/data-definitions/is-order-sm-valid#webpage\"},\"dateModified\":\"2026-11-21T07:10:04.722Z\",\"publisher\":{\"@id\":\"https://sourcemedium.com/#organization\"},\"isPartOf\":{\"@id\":\"https://sourcemedium.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SourceMedium\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"SourceMedium\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/help-center/core-concepts/data-definitions/is-order-sm-valid.md","siteName":"SourceMedium","nav":{"global":null,"tabs":[{"tab":"Workspace","pages":[{"title":"Workspace","href":""}]},{"tab":"Connect","pages":[{"title":"Connect","href":"/data-inputs/data-inputs-overview"}]},{"tab":"How your data works","groups":[{"group":"How the model works","pages":[{"title":"SourceMedium data architecture","sidebarTitle":"Data architecture","icon":"sitemap","href":"/help-center/core-concepts/data-transformation/data-architecture"},{"title":"How SourceMedium models your data","sidebarTitle":"How we model data","icon":"gear","href":"/data-transformations/philosophy"},{"title":"Data freshness","icon":"clock","href":"/help-center/core-concepts/data-transformation/data-freshness"},{"title":"Importance of good data hygiene","sidebarTitle":"Good data hygiene","icon":"heart-pulse","href":"/onboarding/data-docs/data-hygiene/importance-of-good-data-hygiene"}]},{"group":"How numbers are defined","pages":[{"title":"Data definitions","description":"Canonical definitions for the fields and business rules that show up across SourceMedium tables, dashboards, and recipes.","sidebarTitle":"Data definitions","icon":"book-open","href":"/help-center/core-concepts/data-definitions/index"},{"title":"Valid orders (is_order_sm_valid)","sidebarTitle":"Valid orders","icon":"shield-check","href":"/help-center/core-concepts/data-definitions/is-order-sm-valid"},{"title":"Revenue fields (net vs gross vs total)","description":"How SourceMedium defines gross, net, and total revenue, and how discounts and refunds affect each.","sidebarTitle":"Revenue fields","icon":"currency-dollar","href":"/help-center/core-concepts/data-definitions/revenue-fields"},{"title":"Reporting currency","sidebarTitle":"Reporting currency","icon":"currency-dollar","href":"/help-center/core-concepts/data-definitions/reporting-currency"},{"title":"Refund logic","sidebarTitle":"Refund logic","icon":"arrow-uturn-left","href":"/help-center/core-concepts/data-definitions/refund-logic"},{"title":"Subscription flags","sidebarTitle":"Subscription flags","icon":"repeat","href":"/help-center/core-concepts/data-definitions/subscription-flags"},{"title":"Channel mapping (sm_channel + sm_sub_channel)","sidebarTitle":"Channel mapping","icon":"map","href":"/help-center/core-concepts/data-definitions/channel-mapping"},{"title":"UTM normalization","sidebarTitle":"UTM normalization","icon":"tag","href":"/help-center/core-concepts/data-definitions/utm-normalization"},{"title":"Event + journey deduping","sidebarTitle":"Event + journey deduping","icon":"fingerprint","href":"/help-center/core-concepts/data-definitions/event-and-journey-deduping"},{"title":"Metric definitions","icon":"chart-line","href":"/onboarding/data-docs/metrics"},{"title":"Dimension definitions","icon":"filter","href":"/onboarding/data-docs/dimensions"}]},{"group":"Order segmentation","pages":[{"title":"Order segmentation","icon":"layer-group","href":"/data-transformations/order-segmentation/index"},{"title":"Sales channel (sm_channel)","sidebarTitle":"Sales channel","icon":"store","href":"/data-transformations/order-segmentation/sales-channel"},{"title":"Order type (sm_order_type)","sidebarTitle":"Order type","icon":"repeat","href":"/data-transformations/order-segmentation/order-type"}]},{"group":"Customer record","pages":[{"title":"Customer record enrichment (CDP foundations)","sidebarTitle":"Customer record","icon":"users","href":"/help-center/core-concepts/customer-record-enrichment/index"},{"title":"Demographic data: what you can (and can’t) do","sidebarTitle":"Demographic Data","icon":"users","href":"/help-center/core-concepts/demographics/demographic-data-sources"}]},{"group":"Attribution","pages":[{"title":"Attribution in SourceMedium","sidebarTitle":"Attribution","icon":"sitemap","href":"/help-center/core-concepts/attribution/attribution-in-sourcemedium"},{"title":"What is last-click attribution?","icon":"question-mark","href":"/help-center/faq/account-management-faqs/what-is-last-click-attribution"},{"title":"Why am I seeing (direct) / (none)?","sidebarTitle":"(direct) / (none)","icon":"heart-pulse","href":"/help-center/core-concepts/attribution/direct-none"},{"title":"What is first-party attribution?","sidebarTitle":"First-Party Attribution","icon":"shield","href":"/help-center/core-concepts/attribution/first-party-attribution"},{"title":"What is zero-party attribution?","sidebarTitle":"Zero-Party Attribution","icon":"square-poll-vertical","href":"/help-center/core-concepts/attribution/zero-party-attribution"},{"title":"Attribution source hierarchy","icon":"layer-group","href":"/data-transformations/attribution-source-hierarchy"}]}]},{"tab":"Dashboards","pages":[{"title":"Dashboards","href":"/onboarding/analytics-tools/dashboards-and-apps"}]},{"tab":"Warehouse","pages":[{"title":"Warehouse","href":"/data-activation/managed-data-warehouse/overview"}]},{"tab":"Multi-Touch Attribution","pages":[{"title":"Multi-Touch Attribution","href":"/mta/mta-overview"}]},{"tab":"AI Agents","pages":[{"title":"AI Agents","href":"/ai-analyst"}]},{"tab":"Help","pages":[{"title":"Help","href":"/faq"}]}]},"basePath":"","title":"Valid orders (is_order_sm_valid) - SourceMedium","deploymentId":"dpl_HkhFaM7Z4J8aYo89NEttjgSHLi43","buildId":"dpl_HkhFaM7Z4J8aYo89NEttjgSHLi43","dynamics":[],"chunks":[]}