Archy JSON object schemas and the refresh command
When you initially set up Archy by running archy setup
, if you told Archy to perform a refresh, Archy generates JSON object schemas both for Archy flow objects but also objects for individual queues, groups, wrapup codes, data actions, etc. etc. that were configured for your organization at that point in time when the setup command was run.
If you're not familiar with what a JSON Schema is, think of it as a blueprint that describes an object. For example, we could use a JSON schema to describe a Person object that has two properties, name and age. The name property is a string and the age property is a number. It's the JSON Schema that lets us do this in a common way. JSON Schemas are available in Genesys Cloud to describe data action inputs, output, script inputs, canned response inputs, flow inputs, etc. etc. It just so happens that Archy generates them too. If you are interested in learning more about JSON Schemas in general, you can click here. You do not need to know the in's and out's of a JSON Schema for Archy, but we wanted to make sure you know what they are about briefly.
Over time an organization's configuration can and inevitably changes. You might add new queues, new data actions, delete a group, etc. etc. Since Archy JSON Schemas are generated at a point in time and these objects have JSON Schemas generated on a per instance basis, you will need to regenerate schemas to reflect the updated organization state.
Additionally, sometimes Archy itself gets new functionality and in order for a third party code editor to display some new functionality in a typeahead, a schema regeneration might be needed as well so that the editor can see the new property expressed in a schema. One thing to remember is that these schemas are generated by Archy for external consumers. Archy itself does not need JSON Schemas to run commands.
And finally, how do you have Archy regenerate JSON object schemas for an organization so that they are up to date?
It's easy, at the command line run the refresh command:
archy refresh
That will use the default client id / secret or authToken that you have configured and is typically what developers want when developing flow YAML since the organization credentials are set up in the Archy default setting values. This processing can take a couple of minutes to complete, but a refreshing the schemas is good practice overall. :)
For more information on the refresh command and the parameters it supports, you can run this at the command line:
archy refresh --help
As a general practice, when you use the archy version command to change the current Archy version, we recommend running an archy refresh
after changing to a different major or minor version to be safe if you're integrating Archy with a third party code editor or something else that consumes the Archy generated JSON object schemas.
Archy - Ver. 2.33.1, generated on January 3, 2025