Stores 1.0.0

Welcome to Stores - created and maintained by Sascha Wildgrube.

Overview

Manages stores and opening hours.

Table of Contents

Disclaimer

Stores is NOT an officially supported ServiceNow product.

Stores does NOT come with any kind of warranty. If you use it, you own it!

System Requirements

Installation

  1. Create an account on GitHub - if not done already.
  2. Create a personal access token (classic with "repo" scope) for your GitHub account.
  3. Add credentials to access GitHub - use "Basic Auth".
  4. Perform all installation steps for the DevTools application documented here: https://www.wildgrube.com/servicenow-devtools/ 
  5. Fork the repository https://github.com/saschawildgrube/servicenow-stores.
  6. Go to Studio and import the Stores application from source control.
  7. Execute installation scripts.
    Run the following script as a background script in scope x_snc_stores:
  8. x_snc_devtools.InstallApp("x_snc_stores");

Features

  • Manage Store base data.
  • Manage Store specific opening hours.
  • Prepare changes to opening hours by deciding when specific rules are active.
  • Consider nation-wide and regional public holidays.
  • Provide relevant opening hours rules for a store on a given date via REST API.

Reference

Configuration Options

Roles

Tables

Script Includes

  • AppGetDependencies

    Retrieves information about the app's dependencies to other apps and required versions.

  • AppGetProperty

    Gets a system property of this application.

  • AppInstall

    This script installs Stores.

  • AppSetDefaults

    Sets all system properties to default values.

  • AppSetProperty

    Sets a system property of this application.

  • Debug

    Produces a log output in the application log using the DevTools Debug function.

  • DevTools

    Implements the extension point for DevTools.
    |
    Methods:
    * initialize()
    * GetParentRecord()
    * GetLinkDirectory()
    * GetFormatConfig()
    * GetApplicationStatus()
    * RenderDebugDump()
    * GetInstancePipelineName()
    * GetEncodedQueryToPreventUselessChecks()
    * AppVersionBaselineOnFinish()
    * Prompt()
    * IsTechnicalUser()

  • DevToolsGetLinkDirectory

    The DevToolsGetLinkDirectory function is called by the DevTools extension point instance class and returns an extended (or modified) link directory object that serves as the basis for the DevTools Link page.

  • DevToolsGetParentRecord

    The DevToolsGetParentRecord function is called by the DevTools extension point instance class and returns a parent record for the given record if it can be determined.

  • GetActiveHoursRulesForStoreByDate

    Returns Hours Rules relevant for the given Store that are active on the given date.
    This includes Hours Rules which apply to the past and the future.

  • GetAllHoursRuleSetsForStore

    Returns an array of objects representing all Hour Rule Sets that are relevant for the given Store.

  • GetAllHoursRulesForStore

    Returns an array of objects representing all individual Hours Rules relating to a given Store.

  • GetStore

    Returns a clean object representing a Store.

  • GetStoreRecord

    Returns the GlideRecord object representing the Store identified by number, Sys ID or number.

  • GetStores

    Returns an array of objects representing active Stores stored in the x_snc_stores_store table.

  • IsActive

    Returns true if the application is active, otherwise false.

  • Log

    Produces a log output in the application log.

  • LogError

    Produces an error log output in the application log.

  • LogWarning

    Produces a warning log output in the application log.

  • RenderTime

    Renders the given date time object, number or string in the format "hh:mm".

REST APIs

Stores API

Provides information about stores and their opening hours.

  • Get Store

    Returns the store data including opening hours
    Method: GET
    URI: /api/x_snc_stores/stores/store

  • ParameterDescriptionRequiredExample Value
    storeSpecifies a Store by Sys Id, number or name.true
    dateSpecifies a date in ISO format.false2026-01-23

  • Get Stores

    Returns the full list of all Stores.
    Method: GET
    URI: /api/x_snc_stores/stores/stores

Dependencies

Technical Debt

No technical debt has been documented for this application.

License

Copyright 2026 by Sascha Wildgrube

Licensed under the Apache License, Version 2.0 (the "License")

You may not use Stores except in compliance with the License.

You may obtain a copy of the License at: https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Release Notes

1.0.0 - 2026-01-23

First baselined version