
The "three-way temp swap" is the pattern a programmer uses to rotate the values of three variables without losing any of them: first you set one value aside in a temporary variable, then you move the others, and finally you close the loop (temp = a; a = b; b = c; c = temp). If you are here for the code, the answer is all in that line. If instead you lead purchasing, ESG or brand at a multinational, the same pattern describes precisely the most delicate moment of a merchandise programme: moving from three or more scattered suppliers to a single framework agreement. There too you need a "temp", a safe place to park files, stock, certificates and emissions data while everything moves. We at Solution Group, an Italian corporate merchandise distributor active since 1985, play exactly this role: an external extension of the purchasing department that keeps the values safe during the swap and then manages them in more than 50 countries.
In short
- In code, swapping three values only works if a value is saved before it is overwritten; in procurement the same rule applies to artwork, stock, certifications and Scope 3 data.
- The typical mistake, in both cases, is the wrong order: closing a supplier before securing what it holds.
- The correct swap follows five steps: inventory, qualification, product compliance, order migration, local execution.
- A partner certified ISO 9001, ISO 14001 and ISO 27001, with an EcoVadis Platinum rating and CDP reporting, acts as a reliable "temp" and reduces the number of suppliers and tail spend.
- The expected result is a single agreement at headquarters level, with local execution and traceable data for the CSRD and Scope 3.
Contents
- What the three-way temp swap is and why it matters to procurement
- What you lose when the order is wrong
- The swap in five steps
- Before and after the swap: the comparison
- ESG data must not get lost in the swap
- Solution Group's point of view
- Entrusting the swap to a single partner
- Frequently asked questions
- Sources
What the three-way temp swap is and why it matters to procurement
In programming, assignment is destructive: when you write a = b, the old value of a disappears. That is why Chiara Bodei's lecture notes at the University of Pisa explain that the additional variable temp is essential for the swap, and that the sequence x = y; y = x swaps nothing. Politecnico di Milano uses an image that anyone who has managed a change of supplier will recognise at once: to swap the liquid in two glasses you need a third glass to pour into.
With three variables the principle does not change, the chain just gets longer. A solved exercise from Unisciel permutes three values with a single temporary variable and gives the golden rule: on the left of each assignment goes the variable just saved in the previous instruction. Translated for a buyer: every supplier you take out of scope must already have handed over what it holds to whoever will take charge of it.
In a large company's merchandise programmes, the "variables" are almost always three:
- The long-standing supplier at head office, which knows the brand guidelines and keeps the artwork files.
- The local suppliers of foreign subsidiaries, chosen country by country, often outside any framework agreement.
- Spot purchases by marketing, events and HR, which end up in tail spend and escape qualification and reporting.
Rotating them towards a single partner without a "temp" means losing something at every assignment.
What you lose when the order is wrong
A classic example in programming courses: with a = 1 and b = 2, writing a = b and then b = a leaves both variables at 2. The original value of a is gone. In corporate merchandise, the equivalent is closing a contract before recovering:
- Brand files and specifications: vectors, Pantone colours, logo placement, approved samples. Without these the new supplier starts from scratch and the brand manager reviews proofs that were already approved years ago.
- Stock and kits in the warehouse: welcome kits for new hires, promotional products for events already scheduled, staff clothing. If nobody takes charge of them, they sit idle or get reproduced.
- Compliance documentation: technical data sheets, declarations on substances, tests on food contact materials. These are the documents you need in the event of an audit or a request from an authority.
- Environmental data: weights, materials, origins, transport. They are the basis for estimating Scope 3 emissions linked to purchased goods, that is the indirect emissions generated in your supply chain.
- History of prices and volumes: without it you cannot demonstrate the reduction in tail spend or negotiate the new agreement on solid ground.
Each of these losses has a cost that does not appear on the invoice: hours of internal work, reprints, delays to events, gaps in sustainability reporting.
The swap in five steps
1. Save to temp: the complete inventory
The first step is always temp = a. Before any communication to outgoing suppliers, record what each of them holds: active items, files, stock, certificates, contracts and deadlines. The frequent mistake is to stop at the list of items and forget documents and data.
This is where we come in: as an external extension of your purchasing department, we gather and centralise these assets in one place, so nothing depends any more on the memory of a single contact or the goodwill of whoever is leaving.
2. Qualify whoever receives the values
A variable that receives a value must be able to hold it. In the same way, the incoming supplier must pass your qualification before receiving orders. For a multinational's purchasing department, the verifiable criteria are usually:
- ISO 9001 for the quality management system;
- ISO 14001 for the environmental management system;
- ISO 27001 for information security, relevant when the supplier handles employee data, shipping addresses or ordering platforms;
- EcoVadis rating, the independent assessment of suppliers' sustainability performance on environment, labour and human rights, ethics and sustainable procurement;
- CDP reporting, the organisation that collects the environmental information disclosed by companies.
Solution Group is certified ISO 9001, ISO 14001 and ISO 27001, holds an EcoVadis Platinum rating and reports to CDP. These are attestations issued by independent third parties, and that is what makes them useful in a qualification.
3. Securing product compliance
When you change supplier you often also change factories, materials and batches. Every item that reaches employees, clients or event attendees must comply with the applicable European rules: the General Product Safety Regulation (GPSR), the REACH regulation on chemicals and, for water bottles, mugs and containers, the rules on food contact materials and articles (MOCA). Which rules apply to a single item depends on the product: for the legal assessment, refer to your legal or compliance department.
In our model compliance is centralised: responsible sourcing, supply chain traceability and documentation gathered in one place, instead of scattered among three different contacts.

4. Migrate orders to a single platform
Tail spend almost always starts here: a subsidiary that needs fifty polo shirts for a trade fair and orders them from the first available supplier. The swap is truly complete when those orders move to a controlled channel.
We design dedicated e-commerce platforms for internal orders, with budget and brand control: subsidiaries and departments order from an already approved catalogue, within spending limits set by head office. Marketing, HR and events keep their autonomy, procurement keeps visibility.
5. Close the loop with local execution
The last instruction of the swap, c = temp, returns the value saved at the start. For an international programme, it means the local suppliers that are dropped are replaced by local execution consistent with the central agreement.
As a member of IGC Global Promotions we sign framework agreements at headquarters level and guarantee local execution in more than 50 countries, with logistics, bulk global shipping and kit preparation. You will find the operating model on the page dedicated to IGC Global Promotions for the international purchasing office.
Before and after the swap: the comparison
| Aspect | Three or more scattered suppliers | A framework agreement with Solution Group |
|---|---|---|
| Contracts | One per supplier and per country | One agreement at headquarters level |
| Qualification | Repeated, with different levels of certification | ISO 9001, 14001, 27001, EcoVadis Platinum, CDP |
| Execution abroad | Local suppliers chosen case by case | Local execution in more than 50 countries through IGC Global Promotions |
| Internal orders | Email, spot purchases, tail spend | E-commerce platform with budget and brand control |
| Environmental data | Fragmented or missing | Supply chain traceability and product LCA |
| Compliance documents | Spread among several contacts | Managed centrally |
ESG data must not get lost in the swap
For sustainability managers, the most concrete risk of a change of supplier is a gap in the historical data series. Promotional products, clothing and kits purchased fall within Scope 3 emissions linked to purchased goods, and companies subject to the European Corporate Sustainability Reporting Directive (CSRD) must be able to explain where the figures they publish come from. For the regulatory framework of your specific case, the reference remains your legal function or auditor.
What the supplier can do is put solid data in your hands. We offer product LCA, that is the life cycle assessment that estimates an item's environmental impact from raw materials to disposal, and advice on sustainable purchasing. This makes it possible to compare product alternatives on the basis of data rather than generic labels.
One more element, separate from the emissions calculation: with Forest Nation we plant 100 trees for every €5,000 of merchandise, and to date we have planted more than 135,000 trees. It is a reforestation initiative, not offsetting that makes products or deliveries neutral. The details are on Solution Group's sustainability page.

If you are considering how to make the communication side more effective, the analysis of green promotional campaigns that work helps choose items consistent with your ESG goals. To plan the timing of the transition, also consider the real production times of sustainable promotional products, to be built into the migration calendar.
Solution Group's point of view
In forty years of activity, since 1985, we have learned that corporate merchandise is a category that is small in the budget and large in risk. It touches the brand, people, the supply chain and sustainability reporting all at once.
That is why we do not present ourselves as one more supplier to add to the list, but as the external extension of your purchasing department. The swap we propose is simple to describe: a single framework agreement at headquarters level instead of many contracts, local execution in more than 50 countries thanks to IGC Global Promotions, centralised compliance instead of scattered documents.
Our credentials can be verified: ISO 9001, ISO 14001 and ISO 27001, an EcoVadis Platinum rating, CDP reporting. To these we add supply chain traceability, LCA and ordering platforms with budget and brand control. This is what lets procurement, CSR and marketing reduce the number of suppliers, tail spend and risk, finally dealing with a single contact.
The "temp" of a well-executed swap is invisible: everything arrives where it should, and nothing gets lost along the way.
Manuel Xueref
Entrusting the swap to a single partner
If you are consolidating merchandise suppliers or preparing an international framework agreement, we can take charge of the whole programme: customised promotional products, staff clothing, preparation of promotional kits and welcome kits, logistics and bulk global shipping, online shops for internal orders and sustainable promotional purchasing.

Discover all our merchandise services for large companies and ask our team for a review of your current programme.
Frequently asked questions
How do you swap three variables with a temporary variable?
You save the value of one variable in temp, assign each variable the value of the next one and finish with the last one receiving temp: temp = a; a = b; b = c; c = temp. Reversing the direction (temp = c; c = b; b = a; a = temp) rotates the values the other way. The rule is never to overwrite a value before saving it.
How many merchandise suppliers should a multinational have?
It depends on the organisation, but the aim of consolidation is to reduce contracts and tail spend without losing local coverage. A framework agreement at headquarters level with local execution gives you a single contact even for programmes spread across many countries. With Solution Group, local execution covers more than 50 countries through IGC Global Promotions.
Which certifications should you ask a corporate promotional products supplier for?
For a complete qualification, what counts is quality management (ISO 9001), environmental management (ISO 14001), information security (ISO 27001) and an independent sustainability assessment such as EcoVadis. Solution Group is certified ISO 9001, 14001 and 27001, holds an EcoVadis Platinum rating and reports to CDP.
Does changing supplier create problems for Scope 3 data?
It can, if data on materials, weights and transport stays with the outgoing supplier. That is why it must be gathered in the first step of the swap, together with files and certificates. A supplier with supply chain traceability and product LCA helps maintain continuity in the historical series.
Sources
- University of Pisa, Chiara Bodei's lecture notes: assignment and swapping variables
- Politecnico di Milano, C exercises (InfoA 2018 course)
- Unisciel, Permutation de variables: solved exercise in C++
Recommended
- Incoterms in corporate merchandise: a guide for procurement
- International merchandise programme for multinationals: the guide
- Sustainable logistics for merchandise: what really changes
Related articles
- International merchandise programme for multinationals: the guide
- Sustainable logistics for merchandise: what really changes
- Best sustainable merchandise suppliers for large companies: 2027 criteria
Our certifications are listed on the ESG-certified supplier page.