Differentiating Deployment Versions

If we have deployed an update, is there a way we can tell if a user has updated to it? Our client is having an issue where users see the update bar, they hit update, then they get concerned about the pop-up message so they hit no and never update:

I’ve already made a post about this so I’m aware that we cannot change this message. But could we somehow compare the user’s current deployment to a centrally stored latest deployment (e.g. via a cloudcode task) and show a message if it’s older? I’m just not sure where or how to get at a version number that would indicate this since it’s not the journey.container.version.

The platform does not currently expose a commit hash (or something similar) in App that you would be able to compare unfortunately.

However, it is pretty easy to manage this yourself. I would recommend a combination of a Global JS var and a value stored in the DB that is synced to the device. You will then update both values every time you deploy a change to the app. This will then allow you to compare the value in the DB (which will get synced and updated automatically) to the value of the Global JS var, which will only get updated once the App Update is applied by user)

It is also good practice to copy the value of the Global JS var onto the User object so that you can track that remotely from the Backend / API, and identify users that have not updated.

Hope this makes sense.

That does make sense. I haven’t tried it yet, but the missing piece in my head was using Global JS. This is something we can easily make unique per deployment to compare against a globally tracked “expectedVersion”

Agreed, you can have an Object variable or something that has a key|value pair for each Environment.

That said, having programmatic access to either last deployment time and/or a commit hash is a reasonable feature request so I will add your voice to that on our roadmap as we have seen it before