Skip to main content

Updates

This document describes how Checkout App is kept up to date.

Desktop

POS/SCO updates are controlled using the release channels concept.

Config

Release channels control when POS/SCO updates are allowed using the CCC configuration.

Using CCC inheritance the auto update can be configured per tenant, bussiness unit or workstation.

   "AutoUpdateType": {
"description": "This is a definition of the app update maintenance window.",
"type": "object",
"required": [
"channel",
"maintenanceWindow"
],
"properties": {
"channel": {
"type": "string",
"enum": [
"internal",
"preview",
"stable"
],
"description": "The channel for the update. Customers must use only the preview and stable channels - internal is reserved. All new updates will appear in the preview channel before being promoted to the stable channel. A preview channel will get preview and stable updates. A stable channel will get only stable updates. Customers are encouraged to setup a few tills on the preview channels to test drive new updates before being promoted to stable."
},
"maintenanceExclusion": {
"type": "object",
"description": "The maintenance exclusion window for the update. The exclusion maintenance period takes precedence over any scheduled maintenance window. Maximum of 30 days allowed. The exlusion window is applied only for stable channel and only for major and minor updates(semantic versioning).",
"required": [
"start",
"duration"
],
"properties": {
"start": {
"type": "string",
"format": "date-time",
"example": "2024-01-14T07:00:00.000Z",
"description": "The start date and time of the maintenance exclusion. Specify in the UTC time zone."
},
"duration": {
"type": "integer",
"minimum": 1,
"maximum": 30,
"example": "5",
"description": "The number of days from the start date for the maintenance exclusion to take precedence."
}
}
},
"maintenanceWindow": {
"type": "object",
"description": "The maintenance window for the update. During this window the update will download and install automatically. To start update the app must be open else it will try to update on the next maintenance window. The maintenance window is applied to preview and stable channels for major, minor and patch updates(see semantic versioning)",
"required": [
"days",
"start",
"end"
],
"properties": {
"days": {
"description": "Days of the week when the maintenance can occur.",
"type": "array",
"items": {
"type": "string",
"enum": ["MO", "TU", "WE", "TH", "FR", "SA", "SU"]
},
"uniqueItems": true,
"minItems": 1
},
"start": {
"type": "string",
"format": "time",
"example": "18:00",
"description": "The start time of the maintenance window. Specify in the UTC time zone."
},
"end": {
"type": "string",
"format": "time",
"example": "24:00",
"description": "The end time of the maintenance window. Specify in the UTC time zone."
}
}
}
}
}

The config allows for the following 3 options:

Channels

Channels stable and preview are available to be configured.

Stable channels are production ready. Most of the workstations will run stable.

preview are builds that will pushed as release candidates for stable releases. It's encuraged to have a few workstations running on the preview to be able to test up comming featuresa and provide feedback.

Maintenance window

Maintenance window (specified in local time) allows to set the days and time when the update can be downloaded and installed.

Maintenance exclusion

Maintenance exclusion (UTC local date and time) allows to set a freeze period of max 30 days. During the specified period no update will occur only if its a quick fix(patch) release.

The maintenance period take over any specified maintenance period.

Flow

For the app to start to download and install the udpate the following must hold true:

  • App is running
  • maintenanceWindow and maintenanceExclusion are met
  • Update downloaded
  • No mid order or reschdule when there is no mid order

Once all the above conditions are satisfied the app will quit and install the new version.

Exceptions to the above rule are only if at least:

  • Patch releases (e.g. 3.7.1, 3.8.2 but not 3.8.0, 3.7.0)
  • No CCC auto update config set

Example configs

The examples provided are for bussiness unit EU800 and workstation id 601. Modify the requests appropriately.

  1. Allow auto update on TU, WE and TH starting 21:00 till 23:59. The app will get only production stable releases `.
curl --request PATCH 'https://ccc-api.retailsvc.com/api/v1/config/cha.settings.v1/values/business-units/EU800/workstations/601?replaceExistingPatch=false&calculateDiff=false&dryRun=false' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '
{
"value": {
"pos": {
"autoUpdate": {
"maintenanceWindow": {
"days": [
"TU",
"WE",
"TH"
],
"start": "21:00",
"end": "23:59"
}
}
}
}
}'
  1. Add freeze period starting 2030-12-01 on 00:00:00 for 5 days.
curl --request PATCH 'https://ccc-api.retailsvc.com/api/v1/config/cha.settings.v1/values/business-units/EU800/workstations/601?replaceExistingPatch=false&calculateDiff=false&dryRun=false' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '
{
"value": {
"pos": {
"autoUpdate": {
"maintenanceExclusion": {
"start": "2030-12-01T00:00:00Z",
"days": 5
}
}
}
}
}'
  1. Set preview chanel
curl --request PATCH 'https://ccc-api.retailsvc.com/api/v1/config/cha.settings.v1/values/business-units/EU800/workstations/601?replaceExistingPatch=false&calculateDiff=false&dryRun=false' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '
{
"value": {
"pos": {
"autoUpdate": {
"channel": "preview"
}
}
}
}'

Android

Mobile updates are distributed trough Google Play Store. Android devices must have the Google Play Store auto updates settings enabled for the app to update.