{ "edoc": "{\"guid\": \"b63aa6a1-260c-4ab7-8038-037e7bc02941\",\"model\": {\"name\": \"Territory Manager Model v2\",\"model_tables\": [{\"name\": \"SALES\"},{\"name\": \"REPQUOTA\",\"joins\": [{\"with\": \"SALES\",\"on\": \"[REPQUOTA::REGIONID] = [SALES::REGIONCODE] AND [REPQUOTA::REPTYPE] = [SALES::REPTYPE] AND [REPQUOTA::SALEYEAR] = [SALES::SALEYEAR] AND [REPQUOTA::REP] = [SALES::REPID] AND [REPQUOTA::SALEQTR] = [SALES::SALEQUARTER]\",\"type\": \"LEFT_OUTER\",\"cardinality\": \"ONE_TO_MANY\"}]},{\"name\": \"USERS\",\"joins\": [{\"with\": \"SALES\",\"on\": \"[USERS::USERID] = [SALES::REPID] AND [USERS::REPTYPE] = [SALES::REPTYPE]\",\"type\": \"LEFT_OUTER\",\"cardinality\": \"ONE_TO_MANY\"}]},{\"name\": \"MONTHLYQUOTA\",\"joins\": [{\"with\": \"SALES\",\"on\": \"[MONTHLYQUOTA::REP] = [SALES::REPID] AND [MONTHLYQUOTA::SALEMONTH] = [SALES::SALEMONTH] AND [MONTHLYQUOTA::REPTYPE] = [SALES::REPTYPE] AND [MONTHLYQUOTA::SALEQTR] = [SALES::SALEQUARTER] AND [MONTHLYQUOTA::SALEYEAR] = [SALES::SALEYEAR]\",\"type\": \"LEFT_OUTER\",\"cardinality\": \"ONE_TO_MANY\"}]},{\"name\": \"CUSTOMER\",\"joins\": [{\"with\": \"SALES\",\"on\": \"[CUSTOMER::BPCNUM_0] = [SALES::CUSTOMERID]\",\"type\": \"LEFT_OUTER\",\"cardinality\": \"ONE_TO_MANY\"}]}],\"formulas\": [{\"id\": \"% Through Month\",\"name\": \"% Through Month\",\"expr\": \"[Elapsed Business Days in Month] / [Total Business Days in Month]\"},{\"id\": \"% Through Quarter\",\"name\": \"% Through Quarter\",\"expr\": \"[Elapsed Business Days in Quarter] / [Total Business Days in Quarter]\"},{\"id\": \"Contract Group\",\"name\": \"Contract Group\",\"expr\": \"if ( [CUSTOMER::GPO] = null or [CUSTOMER::GPO] = \\\" \\\" ) then \\\" \\\" else [CUSTOMER::GPO]\"},{\"id\": \"Product\",\"name\": \"Product\",\"expr\": \"if ( [SALES::PRODUCTDESC] = null or [SALES::PRODUCTDESC] = \\\" \\\" ) then \\\" \\\" else [SALES::PRODUCTDESC]\"},{\"id\": \"Total Business Days in Month\",\"name\": \"Total Business Days in Month\",\"expr\": \"[Elapsed Business Days in Month] + [Remaining Business Days in Month]\"},{\"id\": \"Elapsed Business Days in Month\",\"name\": \"Elapsed Business Days in Month\",\"expr\": \"max ( [SALES::BUSDAYMTH] )\"},{\"id\": \"Remaining Business Days in Month\",\"name\": \"Remaining Business Days in Month\",\"expr\": \"min ( [SALES::REMBUSDAYMTH] )\"},{\"id\": \"Total Business Days in Quarter\",\"name\": \"Total Business Days in Quarter\",\"expr\": \"[Elapsed Business Days in Quarter] + [Remaining Business Days in Quarter]\"},{\"id\": \"Elapsed Business Days in Quarter\",\"name\": \"Elapsed Business Days in Quarter\",\"expr\": \"max ( [SALES::BUSDAYQTR] )\"},{\"id\": \"Remaining Business Days in Quarter\",\"name\": \"Remaining Business Days in Quarter\",\"expr\": \"min ( [SALES::REMBUSDAYQTR] )\"}],\"filters\": [{\"column\": [\"Role Type\"],\"oper\": \"in\",\"values\": [\"rep\"]},{\"column\": [\"Invoice Date\"],\"oper\": \">=\",\"values\": [\"01/01/2020\"]}],\"columns\": [{\"name\": \"Invoice Status\",\"column_id\": \"SALES::INVOICESTATUS\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"status\",\"billing status\",\"invoice state\",\"document status\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Product Category\",\"column_id\": \"SALES::BRAND\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"label\",\"trade name\",\"brand name\"]}},{\"name\": \"Net Unit Price\",\"column_id\": \"SALES::NETUNITPRICE\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"unit price\",\"price per item\",\"net price\"],\"currency_type\": {\"iso_code\": \"USD\"},\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Revenue\",\"column_id\": \"SALES::LINEAMT\",\"properties\": {\"column_type\": \"MEASURE\",\"aggregation\": \"SUM\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"sales revenue\",\"income\",\"turnover\",\"growth\"],\"currency_type\": {\"iso_code\": \"USD\"},\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Remaining Business Days in Quarter\",\"formula_id\": \"Remaining Business Days in Quarter\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"pending workdays in quarter\",\"days left in quarter\",\"open business days\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Remaining Business Days in Month\",\"formula_id\": \"Remaining Business Days in Month\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"pending workdays in month\",\"days left in month\",\"open business days\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Elapsed Business Days in Quarter\",\"formula_id\": \"Elapsed Business Days in Quarter\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"workdays passed in quarter\",\"completed days\",\"elapsed workdays\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Elapsed Business Days in Month\",\"formula_id\": \"Elapsed Business Days in Month\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"workdays passed in month\",\"days completed\",\"elapsed days\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Total Business Days in Quarter\",\"formula_id\": \"Total Business Days in Quarter\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"full quarter business days\",\"quarter workdays\",\"total working days in quarter\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Total Business Days in Month\",\"formula_id\": \"Total Business Days in Month\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"full business month\",\"total workdays\",\"business month length\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"% Through Quarter\",\"formula_id\": \"% Through Quarter\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"quarter progress\",\"percentage elapsed\",\"quarter completion %\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"% Through Month\",\"formula_id\": \"% Through Month\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"month progress\",\"percentage elapsed in month\",\"monthly completion %\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Product\",\"formula_id\": \"Product\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"item\",\"goods\",\"merchandise\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Region\",\"column_id\": \"SALES::REGION\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"area\",\"zone\",\"territory\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Customer\",\"column_id\": \"CUSTOMER::BPCNAM_0\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"client\",\"buyer\",\"purchaser\"]}},{\"name\": \"Customer ID\",\"column_id\": \"CUSTOMER::BPCNUM_0\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"client account\",\"client id\",\"\",\"buyer id\",\"purchaser id\"]}},{\"name\": \"Role Type\",\"column_id\": \"USERS::ROLETYPE\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"position type\",\"job role\",\"function\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Month\",\"column_id\": \"MONTHLYQUOTA::SALEMONTH\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"calendar month\",\"month number\",\"monthly period\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Product ID\",\"column_id\": \"SALES::PRODUCT\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"item id\",\"sku\",\"product identifier\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Rep\",\"column_id\": \"SALES::REPNAME\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"sales representative\",\"agent\",\"salesperson\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Quarter\",\"column_id\": \"REPQUOTA::SALEQTR\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"qtr\",\"three months\",\"quarter period\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Year\",\"column_id\": \"REPQUOTA::SALEYEAR\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"fiscal year\",\"calendar year\",\"annual period\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Monthly Quota\",\"column_id\": \"MONTHLYQUOTA::QUOTA\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"monthly goal\",\"monthly target\",\"expected monthly sales\"],\"currency_type\": {\"iso_code\": \"USD\"},\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"State\",\"column_id\": \"SALES::STATE\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"province\",\"region name\",\"subregion\"],\"geo_config\": {\"region_name\": {\"country\": \"UNITED STATES\",\"region_name\": \"state\"}},\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Quarterly Quota\",\"column_id\": \"REPQUOTA::QUOTA\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"quarter target\",\"quarterly goal\",\"3-month quota\"],\"currency_type\": {\"iso_code\": \"USD\"},\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Area\",\"column_id\": \"SALES::AREANAME\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"territory\",\"zone\",\"district\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Quota Type\",\"column_id\": \"REPQUOTA::QUOTATYPE\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"target type\",\"goal type\",\"quota category\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Region ID\",\"column_id\": \"REPQUOTA::REGIONID\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"region code\",\"territory id\",\"zone identifier\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Invoice Date\",\"column_id\": \"SALES::INVOICEDATE\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"billing date\",\"date of invoice\",\"invoice issued date\"],\"format_pattern\": \"MM/dd/YYYY\",\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Category\",\"column_id\": \"SALES::BRANDCATEGORY\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"segment\",\"group\",\"product category\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Brand\",\"column_id\": \"SALES::FORECASTEDBRAND\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"label\",\"trade name\",\"brand name\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Invoice Number\",\"column_id\": \"SALES::INVOICENUMBER\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"bill number\",\"invoice code\",\"billing id\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Units\",\"column_id\": \"SALES::QTY\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"index_type\": \"DONT_INDEX\",\"synonyms\": [\"quantity\",\"count\",\"number of items\"],\"synonym_type\": \"USER_DEFINED\"}},{\"name\": \"Contract Group\",\"formula_id\": \"Contract Group\",\"properties\": {\"column_type\": \"ATTRIBUTE\",\"synonyms\": [\"contract category\",\"agreement group\",\"deal type\"]}}],\"properties\": {\"is_bypass_rls\": false,\"join_progressive\": true,\"sage_config\": {\"is_sage_enabled\": true}}}}", "info": { "filename": "Territory Manager Model v2.model.tml", "name": "Territory Manager Model v2", "id": "b63aa6a1-260c-4ab7-8038-037e7bc02941", "type": "model", "status": { "status_code": "OK" } } }