BizTalk Server Tips and Tricks for developers: How to copy several variables from a BizTalk orchestration to another

  • Sandro Pereira
  • Apr 29, 2026
  • 3 min read

One of the most common questions I still hear from developers working with BizTalk Server orchestrations is:

“What is the best way to copy multiple variables from one orchestration to another?”

Orchestration Variables

At first glance, this looks like a trivial task because it is an easy task:

  • You access the variable you want to copy and right-click and select Copy.
Copy Variable
  • And then you go to the other orchestration, right-click the Variables folder, and select Paste.
Paste Variable
  • And the Variable will be present inside your orchestration
Orchestration Variable

However, as the number of variables grows, the solution can quickly become ugly, repetitive, and error-prone.

In this post, I’ll walk you through simple, clean approaches to copying several variables between orchestrations, helping you keep your solutions maintainable and readable.

📝 One-Minute Brief

Bulk-copying variables between BizTalk orchestrations can save time and prevent repetitive errors. This post shows a simple XML editor trick to copy multiple variables at once, keeping orchestrations clean, scalable, and easier to maintain.

The problem

Imagine you have a parent orchestration calling a child orchestration. Both orchestrations share a set of variables; in other cases:

  • varUNB21
  • varUNB22
  • varUNB31
  • varUNB32
  • varXML

We have to copy and paste each of these variables individually. This works… but:

  • It does not scale well.
  • It is time-consuming.

Let’s look at a better alternative.

Alternative option: Bulk-copy all the variables

And if I tell you, with a small trick, you can bulk-copy all the variables you need! Yes, you heard correctly!

To accomplish that, you need to:

  • Right-click the Orchestration that contains the Variables you want to copy, then select Open With…
Open Orchestration With
  • And then, from the Open With window, select the XML (Text) Editor option and then click OK.
Open with XML (Text) Editor
  • In the Orchestration file that was opened by the XML (Text) Editor, and inside the segment <om:Element Type=”Module”>.
    • Minimize all the <om:Element Type=”PortType”> elements.
    • And inside the <om:Element Type=”ServiceDeclaration”> element, copy all the variable declarations you want.
  • Now open the other orchestration and copy the same variable declarations to the same place in it.

Now, if you open the orchestration with the normal Orchestration Designer, you will have all the variables available!

Check the YouTube video I made to exemplify this tip and trick!

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top