This is a really important message about something. It could be about anything we deem important enough to tell everyone. It might have links to places, but shouldn't have any images or non-text content. Messages shouldn't be longer than two lines on normal sized layouts.
Genesys Cloud Developer CenterGenesys Cloud Developer Center
Browser storage is disabled

Your theme selection will not be remembered when you refresh the page. Please enable browser storage in the Account Switcher above to allow this setting to be remembered.

Removed from toolbox

Lesson 8 - YAML Escaping

Since Archy YAML files are written in YAML, it is important to remember that you need to escape values accordingly. In many cases this isn't an issue, but we wanted to bring it up to make sure you're aware of this.

Here's an example. Let's say we are entering Architect expression text for the condition property on a decision action, and the condition we want to test is this Architect expression:

Copied
Append("hello ", "world") == "hello world"

Initially you might think this is what you should enter in the YAML for the decision action:

Copied
  - decision:
      condition:
        exp: "Append("hello ", "world") == "hello world""

but that is not how you should handle those embedded quotes like what you see around the words hello and world. In this case we are entering a string value for the expression text and since it does contain those embedded quotes, they need to be escaped. It's not hard but what you want to do is add backslashes in front of those embedded quotes:

Copied
  - decision:
      condition:
        exp: "Append(\"hello \", \"world\") == \"hello world\""

That's how you express the string:

Copied
Append("hello ", "world") == "hello world"`

in YAML. This pretty much boils down to a "make sure you understand YAML" before attempting to write YAML. Yeah, a lot of it might be trial and error but knowing details like this will help.

If it helps, Archy does have a preprocess command where you can have it pre-process a YAML file which will run through the YAML, embed all externally referenced objects, apply substitutions, and write out resulting JSON so that you can see what the values are that will be processed by the Archy processor.

To see help on this command, you can run:

Copied
archy preprocess --help

Tutorial Main | Previous Lesson


Archy - Ver. 2.33.1, generated on January 3, 2025