Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

Strategy for replicating one Genesys Cloud org to another?

  • 1.  Strategy for replicating one Genesys Cloud org to another?

    Posted 05-13-2025 15:08

    I'm trying to piece together a general strategy for replpicating environments.  I know Terraform can be used for some of this, but I'm struggling on a few bits.

    1. The CX as Code documentation presumes the author is editing files locally and pushing to Terraform, either directly, or vis a source control automation.  How can we tell Terraform to look at the as-built configuration of one Genesys org, rather than a bunch of text files?  My concdern is users skipping the file part of this, because typical GCCX admins aren't writing code, they are clicking things.
    2. How are dependencies handled?  Example, an architect flow has dependencies on prompts, common modules, data actions, bot flows, other flows, etc.  Those need to be replicated as well or a publish would fail.  

    The only documentation I could find is a blueprint for deploying a single, extremely basic Architect flow.  That is not a real-world use case, as Architect Flow authors are not writing flows in YAML for anything even remotely complex, they are using Architect.  I also couldn't find documentation on using Archy to pull flows out of Genesys, only to push TO Genesys.  The former might be how we'd feed a whole inventory of flows to Terraform on a schedule (since flow publish events are limited to AWS Event Bridge, which we can't easily use).


    #CXasCode

    ------------------------------
    Paul McGurn
    Senior Manager, Telecom & DevOps
    Persistent Systems
    ------------------------------


  • 2.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 27 days ago
    Hi Paul,
    We've actually done this in practice across multiple Genesys Cloud orgs, and your concerns are very valid.
    At a high level, our approach is not asking admins to author YAML by hand or rebuild environments from scratch. Instead, we focus on bringing the as-built org under management first, then replicating from there.
    1. Capturing the as-built configuration (no manual authoring required)
    Rather than starting with hand-written Terraform files, we use a Python-based approach alongside CX as Code to inventory the source org. Existing, manually-created resources are brought under Terraform control using terraform import. This allows Terraform to reference the actual state of the org, instead of assuming users are editing files locally first (which, as you pointed out, is unrealistic for most GC admins).
    Once imported, Terraform becomes the system of record, and changes can then be promoted to other orgs in a controlled way.
    2. Handling dependencies (Architect flows, prompts, data actions, etc.)
    Dependencies are the hard part, and treating flows in isolation doesn't work in real-world Architect usage.
    What we've done instead is:
    You're also correct that Archy today is much stronger for push than pull. We don't rely on publish events or EventBridge either; instead, we periodically inventory flows and related objects directly via APIs and align Terraform state accordingly.
    Net result:
    Happy to go deeper on any of those areas if it helps-this is a space where the "happy path" docs don't really reflect production reality.
    Rukshan Tennakoon
    CTO at Tykans Group Inc.
    ~Revolutionizing the future of Contact Centers~


    ------------------------------
    Rukshan Tennakoon
    Director of Service Delivery
    ------------------------------



  • 3.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 25 days ago

    If you don't mind me asking, how did you get started with Genesys Cloud & Terraform? I've not really tried it at all and have no experience of Terraform, but it's something I want to explore to understand the value of. But, there doesn't seem to be any "total beginner" documentation out there, most of it assumes some level of Terraform knowledge.



    ------------------------------
    James Dunn
    Telecoms Specialist
    ------------------------------



  • 4.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 25 days ago

    I started with a book "Terraform Up & Running", then Genesys docs: CX as Code and finally the registry: Docs overview | MyPureCloud/genesyscloud | Terraform | Terraform Registry.



    ------------------------------
    Cesar Goncalves de Giao Mi
    Lead Professional Services Engineer
    ------------------------------



  • 5.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 24 days ago

    I'm struggling to envision how I can apply this to our day-to-day workflow. I've been able to install Terraform, used it to export the users list, created a test Call Routing thing etc - to get a general concept of it. But, to take it beyond that, I'm a little hazy.

    Presumably there aren't any orgs that do everything in Terraform. So how are people keeping their "Terraform environment" in sync with what's actually in production?

    Or do you do it on a more granular level, e.g. develop a flow in a lower environment and solely move that one flow? But don't touch the rest of the system? 

    In one of the DevDrop videos it shows adding a user, then adding a user to a queue. I'm just struggling to really understand the best use cases here.



    ------------------------------
    James Dunn
    Telecoms Specialist
    ------------------------------



  • 6.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 24 days ago

    Terraform (CX as Code) maps around 95% of what an org can do (Docs overview | MyPureCloud/genesyscloud | Terraform | Terraform Registry). So you can keep your DR environment like your PROD environment more or less like for like. CX as Code does not support WFM and some newer AI features, but the rest is all there.

    Assuming your DR org is empty apart from admin user + oauth + role.

    You have to completely export your org, all resources, take the .tf file, add your DR credentials to that .tf file, run terraform plan, determine what you need to _change_ or _remove_ like telephony trunks, write a script to do that (.tf and .yaml files), run it on the exported .tf file, plan again, until you have a successful plan. Then you can run apply, look at the errors, determine what you need to do, write a script for that.

    CX as Code will write the state (.tfstate) of your DR org, so next time only changes to that state will be effected.

    Export PROD again, but this time run all the scripts on that .tf and .yaml files, plan... fix, apply... fix.

    Of course this is more complicated than it seems, to start you may have to split your export into sub components, like users, flows, tables, core and determine _how_ they are linked, because tables refer divisions but you may want to manage divisions separate from tables. See replace with data source.

    This is not trivial and the best way to fully replicate an org and keep it in sync is to consider the full org and let CX as Code decide what changed. Not flow by flow or chunk of users by chunk of users.



    ------------------------------
    Cesar Goncalves de Giao Mi
    Lead Professional Services Engineer
    ------------------------------



  • 7.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 23 days ago
    Edited by Rukshan Tennakoon 23 days ago

    Hi James,

    I'll keep this simple and share how we actually got started.

    1. Start with individual objects
    We began by using Terraform to create basic objects like:

    • Queues

    • Data tables

    • Skills, roles, etc.

    Usually this started from a spreadsheet when a new project kicked off. This alone saved us a lot of time compared to creating everything manually in the UI.

    2. Faster Architect work
    Once those base objects existed:

    • Building Architect flows became much faster

    • Most dependencies were already in place

    • Changes were easier - update the "master" files and re-run CX as Code

    3. Architect flows and scripts
    Next, we started exporting Architect flows from a source org and importing them into a target org.
    For some teams, this can also be a starting point, depending on the problem they're trying to solve.

    4. Automation (longer-term)
    Later, we added GitHub pipelines and automation. This adds a lot of value long-term, but it does require more upfront effort.

    Which step makes sense first really depends on your current pain points - environment setup, user access, DR, etc.

    Hope this helps. Feel free to reach out if you want to chat further.

    -
    Rukshan



    ------------------------------
    Rukshan Tennakoon
    Director of Service Delivery
    ------------------------------



  • 8.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 22 days ago

    Thanks Rukshan, appreciate the pointers - thank you.



    ------------------------------
    James Dunn
    Telecoms Specialist
    ------------------------------



  • 9.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 22 days ago

    I don't know if these are any use, but I've written two articles about CX as Code aimed at beginners:



    ------------------------------
    Lucas Woodward
    Winner of Orchestrator of the Year, Developer (2025)

    LinkedIn - https://www.linkedin.com/in/lucas-woodward-the-dev
    Newsletter - https://makingchatbots.com
    ------------------------------



  • 10.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 22 days ago

    Thanks Lucas, yes, yours is one of the guides I had found useful to get a broad understanding of how it works. Appreciate it.



    ------------------------------
    James Dunn
    Telecoms Specialist
    ------------------------------



  • 11.  RE: Strategy for replicating one Genesys Cloud org to another?

    Posted 22 days ago

    Thank you Lucas, for sharing the links. Subscribed to your website too. You have a comprehensive set up tools there 👍



    ------------------------------
    Rukshan Tennakoon
    Chief Technology Officer
    Tykans Group Inc

    ~Re-imagining the future of Contact Centers~
    ------------------------------