Centara
  • Introduction to Centara
  • Getting started with Centara
    • Software and hardware requirements
    • getCentara.exe
    • Install Centara Server
    • Centara Configuration
      • RDM overview
      • Create organization structure
      • General settings
      • Layouts and visual components
        • Creating layouts
        • Assigning layouts in configuration
        • Populating layouts with components
        • Applying functionalty to buttons
        • UI component reference
      • Hardware
        • OPOS installation
          • Epson OPOS
        • Centara server configuration
      • POS Receipts
        • Receipt parts
        • Receipt Directives
          • Formatting directives
          • General directives
          • Hospitality directives
          • Fiscal Printers directives
          • Tender slip directives
        • Receipt logo
        • Receipt template
          • Special formatting
      • POS operators and permissions
        • Create operators and permissions
      • Tenders
      • Other configuration
        • Customer configuration
        • Cash management
          • Setting up cash management
          • Balance report
        • Suspend / retrieve
        • Search
          • Applying customer search
          • Applying product search
            • Style search
            • Stock search
          • Applying transaction search
        • Custom settings
    • Install Centara POS
      • Alternative database configurations
      • Centara Licensing
    • Features
      • Conditional sub-layouts
      • Out of stock warning
  • User guides
    • POS User Guide
      • Operator sign on / off
      • Layouts
      • Selling products
      • Paying for products
      • Voiding
      • Customers
      • Suspend / retrieve
      • Cash management
    • Discount Offer module
      • Getting started
      • Basic discounts
      • Package deals
      • Seasonal offers
      • Miscellaneous
      • Working with the filters
      • Making changes to the discounts
      • Time restrictions
      • Selectors
      • Layered discounts
      • Audit Log
      • Glossary of Terms
    • Loyalty system
      • System overview
      • Creating organization stucture
      • Working with loyalty data
        • General handling
          • Adding loyalty data
        • Giftcards
          • Adding gift card data
        • Store credit
          • Instrument handling
        • Coupons
          • How to setup alphanumeric offer coupon
      • Connecting Centara to Loyalty
      • View loyalty data on POS
      • Loyalty operations
    • Snippet manager
  • Integrations
    • Sentry.io
    • Acumatica
      • Acumatica installation
      • Acumatica Connector
        • Customer creation
        • Cashier Groups
        • Avalara Configuration
        • Common configuration errors
        • General inquiries
  • Development
    • APIs
      • External orders
      • Item API
      • Loyalty API
        • Gift cards
        • Loyalty cards
        • Store credit
    • GraphQL
    • XVal
      • XVal List comprehensions
      • XVal operators
      • XVal examples
      • XVal usage
      • XVal testing
  • References
    • Data processes
      • XVal Library
      • Data process examples
    • POS macros
  • FAQ
    • Centara Server
      • Installation
      • Maintenance
    • Centara POS
Powered by GitBook
On this page

Was this helpful?

  1. Development
  2. XVal

XVal testing

PreviousXVal usageNextData processes

Last updated 2 years ago

Was this helpful?

It is best to use the testing platform below to test XVal

Test input:

{
  "stores": [
    {
      "StoreCd": 1,
      "Name": "SCOTTSDALE",
      "Inactive": false,
      "StartOfDayTime": "1900-01-01T00:00:00",
      "CustomerCD": "C015201",
      "CustomerName": "Cash Customer-Scottsdale",
      "NotifyUser": null,
      "SiteCD": "SCOTTSRTL",
      "SiteName": "Scottsdale Retail Store",
      "BranchCD": "SCOTTSDALE",
      "BranchName": "Scottsdale Retail",
      "Store_AddressLine1": "15690 N 83RD Way",
      "Store_AddressLine2": null,
      "Store_City": "Scottsdale",
      "Store_State": "AZ",
      "Store_Zip": "85260",
      "Store_CountryID": "US",
      "Avalara_CompanyCode": "PXGSalesPortal",
      "Avalara_AccountID": "2000004933",
      "Avalara_LicenseKey": "F097A5B337DF96B6"
    },
    {
      "StoreCd": 2,
      "Name": "CHICAGO",
      "Inactive": false,
      "StartOfDayTime": "1900-01-01T00:00:00",
      "CustomerCD": "C008042",
      "CustomerName": "Cash Customer-Chicago",
      "NotifyUser": null,
      "SiteCD": "CHICAGORTL",
      "SiteName": "Chicago Retail Store",
      "BranchCD": "CHICAGO",
      "BranchName": "Chicago Retail",
      "Store_AddressLine1": "1955 Techny Rd",
      "Store_AddressLine2": "Suite 2",
      "Store_City": "Northbrook",
      "Store_State": "IL",
      "Store_Zip": "60062",
      "Store_CountryID": "US",
      "Avalara_CompanyCode": "PXGSalesPortal",
      "Avalara_AccountID": "2000004933",
      "Avalara_LicenseKey": "F097A5B337DF96B6"
    }
  ],
  "authorities": [
    {
      "Type": "State",
      "Name": "ILLINOIS",
      "RoundToAmount": 0.01,
      "RoundToTypeCode": 1
    },
    {
      "Type": "County",
      "Name": "COOK",
      "RoundToAmount": 0.01,
      "RoundToTypeCode": 1
    },
    {
      "Type": "City",
      "Name": "NORTHBROOK",
      "RoundToAmount": 0.01,
      "RoundToTypeCode": 1
    }  
  ],
  "taxes": [
    {
      "ScenarioId": 1,
      "EffDate": "2010-12-01T00:00:00",
      "EndDate": "9999-12-31T00:00:00",
      "LocationCode": "CHICAGO",
      "TaxCode": "PC040400",
      "ShipToCity": "Northbrook",
      "ShipToCounty": "Cook",
      "ShipToState": "IL",
      "ShipToPostalCode": "60062-5359",
      "ShipToCountry": "US",
      "JurisType": "State",
      "JurisName": "ILLINOIS",
      "TaxType": "Sales",
      "Tax_Description": "IL STATE TAX",
      "Tax_Rate": 0.062500,
      "Cap": 0,
      "Threshold": 0,
      "TaxRuleOptions": "",
      "IsCached": false,
      "CachedUTC": null
    },
    {
      "ScenarioId": 1,
      "EffDate": "2016-01-01T00:00:00",
      "EndDate": "9999-12-31T00:00:00",
      "LocationCode": "CHICAGO",
      "TaxCode": "PC040400",
      "ShipToCity": "Northbrook",
      "ShipToCounty": "Cook",
      "ShipToState": "IL",
      "ShipToPostalCode": "60062-5359",
      "ShipToCountry": "US",
      "JurisType": "County",
      "JurisName": "COOK",
      "TaxType": "Sales",
      "Tax_Description": "IL COUNTY TAX",
      "Tax_Rate": 0.017500,
      "Cap": 0,
      "Threshold": 0,
      "TaxRuleOptions": "",
      "IsCached": false,
      "CachedUTC": null
    },
    {
      "ScenarioId": 335,
      "EffDate": "2018-10-01T00:00:00",
      "EndDate": "9999-12-31T00:00:00",
      "LocationCode": "BOSTON",
      "TaxCode": "PC040129",
      "ShipToCity": "Framingham",
      "ShipToCounty": "Middlesex",
      "ShipToState": "MA",
      "ShipToPostalCode": "01701-5312",
      "ShipToCountry": "US",
      "JurisType": "State",
      "JurisName": "MASSACHUSETTS",
      "TaxType": "Sales",
      "Tax_Description": "MA STATE TAX",
      "Tax_Rate": 0.062500,
      "Cap": 0,
      "Threshold": 175.000000,
      "TaxRuleOptions": "",
      "IsCached": false,
      "CachedUTC": null
    },
    {
      "ScenarioId": 102,
      "EffDate": "2019-05-01T00:00:00",
      "EndDate": "9999-12-31T00:00:00",
      "LocationCode": "WESTGATE",
      "TaxCode": "PC040100",
      "ShipToCity": "Glendale",
      "ShipToCounty": "Maricopa",
      "ShipToState": "AZ",
      "ShipToPostalCode": "85305-3213",
      "ShipToCountry": "US",
      "JurisType": "City",
      "JurisName": "GLENDALE",
      "TaxType": "Sales",
      "Tax_Description": "AZ CITY TAX",
      "Tax_Rate": 0.022000,
      "Cap": 0.000000,
      "Threshold": 5000.010000,
      "TaxRuleOptions": "TaxAll",
      "IsCached": false,
      "CachedUTC": null
    },
    {
      "ScenarioId": 102,
      "EffDate": "2019-05-01T00:00:00",
      "EndDate": "9999-12-31T00:00:00",
      "LocationCode": "WESTGATE",
      "TaxCode": "PC040100",
      "ShipToCity": "Glendale",
      "ShipToCounty": "Maricopa",
      "ShipToState": "AZ",
      "ShipToPostalCode": "85305-3213",
      "ShipToCountry": "US",
      "JurisType": "City",
      "JurisName": "GLENDALE",
      "TaxType": "Sales",
      "Tax_Description": "AZ CITY TAX",
      "Tax_Rate": 0.029000,
      "Cap": 5000.000000,
      "Threshold": 0.000000,
      "TaxRuleOptions": "",
      "IsCached": false,
      "CachedUTC": null
    }
  ],
  "taxCodes": [
    "PC040400",
    "P0000000",
    "PC040200",
    "ON010000",
    "ON030000",
    "PC040148",
    "EXEMPT",
    "PC040100",
    "PC010000",
    "PC040128",
    "PC040208",
    "SR060200",
    "PC040129",
    "S0000000",
    "FR030000",
    "PC040000",
    "S0000001",
    "PC040403",
    "PG050000",
    "OR040000",
    "PR091000"
  ]
}

Test formula:

\data ->
({
    SomeStuff: data.stores
}
)
XValTester
Logo