When to use CX as Code vs. the CLI

Hi guys,

I had a customer send me an email about whether they should CX as Code or the CLI. I wanted to post my answer out here the others could see it. As always, I have removed any customer specific information. Here was the question:

Hi John,

We want to migrate some config objects(queue , table etc) from our DEV org to PROD org infrequently. The volume of the object to migrate is low, the object config in PROD is pretty stable, but sometimes there are changes.

We want to lockdown access to our production orgs so we are looking at using scripts to replicate the config in DEV to PROD. At a first glance, CX as Code looks like a viable option, but because of the volume and frequency of object migration, we are thinking it might be easier to use CLI.

Can we do with CLI what they are requesting? Is CLI is still in beta? Are any other customers using it

Thanks in advance for your time,

So here are some of my thoughts.

  1. CLI is geared towards ad hoc administrative tasks. I usually use the CLI in those situations where you need something that is functional, but ugly and you are not afraid to throw away the code when you are done. While you can do some light DevOps work with the CLI, I usually caution people that over time that small piece of DevOps code can turn into a big mess of unmanageable scripts.

  2. CX as Code and Terraform is built for doing much of the configuration change management you are looking for. While there is more upfront investment and time in learning DevOps, Terraform and CX as Code in the long run you will have a more understandable and maintainable pipeline. For data that does not change regularly and is “infrastructure” (e.g. queues, locations, skills, call flows, etc….) CX as Code is probably a better fit.

We have a lot of resources available around the CLI, CX as Code, and Archy in our developer center. I would look at them in greater detail as they will help drive you to the right decision.

CX as Code

  1. [CX as Code DevCast]](https://youtu.be/21p6hDFipKY). This is a 45 minute style webinar talk introducing CX as Code. I walk through it and how it fits in our overall development tool portfolio. I also walk through the blueprint project I list below.

  2. CX as Code DevDrop. This is the original video I did around CX as Code.

  3. Developer Tools strike back. This is a guidance video that highlights our different tools and when and where to use these tools. I provide this as background material because there are often questions around when they should use the platform APIs, the SDKs, CLI, or CX as Code.

  4. CX as Code Terraform registry entry. This is the location in Terraform that holds the Terraform documents for our CX as Code plugin.

  5. CX as Code blog post. This was the introductory post on CX as Code. I noticed that some links in the article are broken, so I will try to get those fixed and reposted.

  6. CX as Code Developer Center page. This contains an introduction to setting up and configuring the CX as Code plugin.

  7. CX as Code blueprint. This is a comprehensive blueprint that shows how to use CX as Code to deliver an entire stack of functionality. We show how to integrate a flow into CX a Code using Archy and Python. We also show how to set up queues, data actions, and an email route using the CX as Code plugin. This blueprint is not on the Developer Center or AppFoundry yet because it is still being edited, but the raw blueprint is on GitHub. This blueprint has multiple components, including AWS components and some custom code, but the CX as Code example is here.

Terraform

Terraform is a pretty powerful tool and many of the questions I am getting right now are basic Terraform setup and code writing questions. I am including two links to books that I have used quite a bit to get myself and my team going with Terraform.

  1. Terraform for absolute beginners

  2. Terraform in Action](https://www.amazon.com/Terraform-Action-Scott-Winkler/dp/1617296899)

  3. Terraform Up and Running

Archy

  1. Archy Home Page. General landing page for all things Archy.

  2. Installing and configuring Archy. Video walking developers how to use and install Archy.

  3. Exporting Architect Flows with Archy]. Video showing how to export a flow from Genesys Cloud into a YAML format.

  4. Importing an Architect Flow with Archy. Video showing how to import a flow from a YAML file into Genesys Cloud.

  5. Integrating CX as Code with Archy(https://www.youtube.com/watch?v=vKs62oQglVA). Video showing how to integrate CX as Code with Archy and use it to deploy a flow.

CLI

  1. [CLI install page]](https://developer.genesys.cloud/api/rest/command-line-interface/). Instructions on how to install the CLI

  2. Introducing the CLI - DevDrop. 20 minute video providing an introduction and preview to the CLI.

  3. [Introducing the CLI – DevCast (https://www.youtube.com/watch?v=rb2xqZU5vNc) . 45 minute webinar on how to use the CLI.

  4. Using the CLI to move users between queues 20 minute video on how to use Python and the CLI to bulk users between queues.

  5. CLI Quick Hits Repository. Repository of various examples of how to use the CLI.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.