Distributors manage the big squeeze

Austerity and the euro crisis have made for a tough 2011. Billy MacInnes asks a panel of experts for their thoughts on the year and the road ahead

Six months ago, Irish Computer asked a number of distributor luminaries for their impressions of the year to date and what they thought the rest of the year would bring. Now we’ve gone back and asked them what actually happened in 2011 and how they think 2012 will shape up.

Justin Owens, managing director, Commtech
"We’ve grown by over 30% for the year and have doubled revenue during the course of 2010 and 2011," Owens says. Commtech had "a super year in storage", especially with EMC. The storage giant has made some major acquisitions in the last couple of years which have brought incremental business. In addition, a lot of corporates are moving to cloud, hybrid cloud and private cloud, "and to do that you need shared storage". Owens says that as EMC is the number one storage provider in areas like software storage management and de-duplication, it’s also helping to drive sales. Another boost has been provided by the end of EMC’s relationship with Dell, which has brought incremental business to the channel. The launch of products aimed at the SME and SMB market has yielded "literally hundreds of opportunities in the pipeline". 

The unified communications market, specifically around Microsoft’s Lync, is also presenting a lot of opportunities for the distributor which is concentrating on building up a portfolio of complementary products, while the acquisition of CT3 Europe has helped the drive into unified communications by bringing specialist skills to Commtech.
Investment

 

advertisement

 

Owens argues Commtech’s large investment in boosting its technical resource is also helping. The distributor has the same number of account managers as business development people: "We’ve put in a lot of investment over the year, and it’s showing good growth." He thinks storage will do well next year and Commtech is looking at smaller products that add value to storage and virtualisation solutions. When it comes to potential threats in 2012, he starts with the ongoing crisis in Europe. What happens with the euro can have a big effect on Ireland because a large percentage of business is conducted with large corporates and multinationals based here that are focused on the general EMEA region.

"A slowdown in growth will have a knock-on effect on ourselves," Owens warns. "It’s a really big threat in 2012." Another potential danger for Irish distributors is the pressure on US vendors to consolidate their European distribution activities. As Owens puts it, some vendors may have as little as three or four distributors in the US and as many as 50 in Europe, so the temptation to start reducing the number of European partners can be strong.

"The consolidation of distribution is always a threat," he admits. Looking ahead, Owens forecasts decent growth in 2012: "I’m pretty optimistic generally. We’re investing at the moment and we’re increasing our headcount. Margins are tough, but we can’t complain, we’re doing pretty well. We’ve got good vendors and good growth areas, which helps."

 

Michael O’Hara, managing director, Data Solutions
The fourth quarter of 2011 was very strong for Data Solutions, "one of our best quarters ever", reveals O’Hara. But he cautions against reading too much into it, suggesting it could be a seasonal trend with people making decisions to spend their budgets before they lose them: "People are making decisions after huffing and puffing on them all year." He says the start of 2011 was "a bit of a dust bowl" compared to the end of 2010 as people and companies came to terms with Brian Lenehan’s December budget: "It slowed down the sales process. We didn’t lose business this year but we couldn’t close enough of it in the year that was in it. The whole sales process slowed down."

In terms of success stories, he says that Citrix is "doing really well" on the back of a good year in 2010: "The technology is proven and Citrix is a mature system vendor, people are building their business around Citrix. It’s a very strong technology and we’re seeing bigger deals starting to happen." In addition to its virtualisation activity, Data Solutions is also strong on the security side.

"We’re lucky with our technologies," O’Hara admits. "People will always want security, it’s like insurance. There’s always something new that needs to be covered." Back in August, Data Solutions launched its SilverLine private cloud computing offering for the channel which enables partners to design a complete back office IT environment for customers online and have it built within 30 minutes. "Everyone’s talking about the cloud, there’s a lot of hype, but the market is still in its infancy," O’Hara says. "It’s a tremendous opportunity and we’re doing the right thing embracing the cloud opportunity, but I would say it’s still very much early doors into that market place."

While the likes of Microsoft’s Office 365 might not need a distributor, he believes there are as many as 95% of vendors that still need distributors, hundreds of thousands seeking to go worldwide that need an educated channel and someone to build the infrastructure for that application and implement it. As for threats, O’Hara says: "Short of the euro collapsing, I think we’re unshockable as a nation."

Overcautious

The shutters may well come down in January, but he believes businesses will be more confident of surviving having endured over the last four years: "They won’t be as afraid as in other years." But O’Hara worries credit is difficult to get as banks and credit insurance companies are becoming over-cautious: "In the good years, people were focused on selling and credit wasn’t a problem. Now, they’re working harder to win the business but they’re also looking at the credit side. You have to do more work for less."

On the whole, he’s very positive about the channel: "Who did we lose this year? Offhand I can’t think of anyone. We know we’re in a dog fight and people have made the changes and reset their business accordingly. They mightn’t be making a lot of money, but they’re paying their bills." Like Owens, he considers one potential threat could come from US vendors being tempted to consolidate their European distribution partner numbers. Vendors in the US might get 40% of their global turnover from distributors in their home territory and wonder why they can’t adopt a pan-European strategy?

"Distributors have got to recognise this is a challenge for them," O’Hara says. To stave off the threat of pan-Europeanism, local distributors need to ensure they have a strong value proposition. "If you put a plaque on the wall and wait for the orders to come, you’re going to be taking down the plaque fairly quick." As for next year, O’Hara feels there will be retrenchment in the first quarter as the purchasing process slows down again. "My hope and gut feeling is that it’s tough, but we’re here, we’re in business and we’re going to work our way out of this and yes, we are going to invest," he adds.

John Dunne, managing director; Emer Breathnach, commercial & sales director, Sharptext
Sharptext had a strong 2011 on the back of growth in the enterprise market and the SME sector. Commercial and sales director Emer Breathnach says it’s done well out of operating as a value added distributor for vendors, especially at a time when they have pulled their resources out of Ireland. They’ve never needed distributors more, she argues, because they are missing people in areas like technical and marketing. Providing sales and enablement is good for Sharptext because it takes the distributor beyond the purely transactional.

Managing director John Dunne says the newly-launched consumables business is gaining good traction and giving the distributor a new base of partners to work with. Sharptext has a history in print and is "very comfortable with the cost per copy model" so it’s in a good position for the move towards managed print services. It has the ability to provide an end to end solution while partners "tool up to become managed print services providers in their own right". Breathnach says the distributor’s value added distribution approach is about helping vendors and partners to sell more because of what Sharptext does.

"No customer wakes up and says ‘I need a server’," she states. "They have a budget and they have a requirement." It’s not about individual boxes any more but ‘value stacks’ and that is an approach Sharptext has "taken for a very long time". A lot of Irish resellers often have to be masters of everything, which is very hard to do, as more and more users try to cut down their number of suppliers.

They’re looking to distributors like Sharptext to provide advice. And while local distributors like Sharptext might struggle against global rivals when it comes to price points, Breathnach argues they have an advantage when it "comes down to understanding the Irish market". 

Confidence
Dunne says credit is continuing to be an issue here and has probably been more pronounced over the last six months. Credit insurers are becoming more sceptical. "Credit could become a real challenge," he admits. Looking towards 2012, he wonders about the state of consumer sentiment and the impact of the VAT rise: "It’s very difficult to know how people are going to behave when the budget comes through."

Breathnach says that although business has been strong in 2011, it’s "very hard to call things with any level of confidence". There’s nervousness about the effect of budget, especially given what happened in January 2011 at the consumer level. If you’re trying to judge the effects of budget on 2012, she says, you might as well call out a fortune teller. When it comes to the state of the channel, Dunne has been impressed by the channel’s resilience. There have been very few significant failures, he observes. There has been a slow down in the number of new entrants but there have been very few departures.

"Our reseller numbers continue to go up," Breathnach adds. As for the vendors, relationships are "stronger than they have ever been", she claims. Even if their distribution operations are part managed centrally in the UK or Europe, vendors still have to maintain in-country relationships. If their account managers, directors and contracts are managed out of country, they still have to make sure they keep their profile up locally.

As for 2012, Dunne says that if credit levels do not become an increasing issue and consumer/corporate sentiment stays as it is, things will be positive but they are subject to external influences "beyond all of our control".

Michael Callaghan, managing director, CMS Ireland 
The big story for CMS in 2011 was the acquisition of UK distributor CCI Distribution in September and the number of brands it brought to the Irish market. Managing director Michael Callaghan says the acquisition "has progressed extremely well" and it expects sales to increase in 2012 on the back of the additional brands such as Qnap, Qsan, LG, Wenger and Storage Options. There was minimal overlap between the CMS and CCI product portfolios and, when combined, they span the data storage needs of small, medium and large businesses.

Callaghan says the acquisition will also help the distributor to achieve its overall three-year business objective of 20% annual growth and a turnover of €250 million. He freely admits 2011 has "been another challenging year in the Irish market" but reveals CMS is on track to see more than 10% growth over 2010 on the back of an improvement in market momentum and "a lot more interest in technology right across the board". Success stories in 2011 include the introduction of Symantec’s Net Back Up de-duplication appliances.

Callaghan claims they give Symantec resellers "a compelling offering in this space which enables real return on investment in a short time period". Data Loss Prevention is also a strong emerging space, driven by a number of high profile breaches in recent months. On the enterprise hardware side of the business, tape and disk vendor Quantum is proving "particularly successful" in a price conscious market, and is gaining significant market share. Other areas of growth for 2011 were the NAS market with Iomega, Seagate and Qnap, and data replication with Double Take. 

Credit crunch
Callaghan says the most significant development in the latter stages of 2011 was the impact of the floods in Thailand on hard disk drive production and the effects on supply and pricing, which has doubled in the last few months. "With our strong vendor relationships and presence in the UK we have been able to work with key Irish customers to meet their demand requirements during this challenging period," he claims. Callaghan says tightened credit lines and reduced cash flow are major inhibitors of growth in the Irish market, situations which are likely to continue. This will result in a number of projects being deferred, and reduced government spend in 2012 will also hit the IT market in Ireland. Nevertheless, he thinks the Irish channel is "performing well" overall in the current economic conditions and well-managed distributors and resellers are weathering the storm. But he warns there have been "mixed reports" about certain competitors and resellers "and we expect to see further consolidation and closures in the coming months".

Vendors "serious about the Irish market" are very supportive of distribution partners that have "made the investment in supporting the channel locally and we have very strong partnerships with our key vendors, which is very important". But Irish-based distributors face competition "from UK-based distributors that, while not prepared to support the Irish market, attempt to win market share through aggressive pricing".

As for 2012, CMS has "a strong pipeline of opportunity" for the first quarter, "so we would expect to see a continuation of year on year growth".

 

Garnett Stewart, general manager, SquareOne 
SquareOne has "had a reasonably good year", according to general manager Garnett Stewart. The company is starting to see the benefit of having the strength and size of parent company Midwich behind it. It has grown in its traditional AV business, as well as print and has also developed two additional areas in CCTV and video-conferencing, and Auto ID and EPOS. AV has benefited over the past two years from significant government spending on projectors in education but that’s coming to an end. There was "a little bit more corporate spend" in the second half of 2011, particularly around digital signage.

Stewart accepts there will be a challenge next year to plug the gap from the loss of significant chunks of spending in the education market. He thinks there will be an increase in technology refresh in companies that need to upgrade and update their equipment. "But whether the plug is large enough to fill the gap from the loss of the education sector is hard to know. There will still be business in education, but we’re close to the end of the large capital spend." The print business has "developed very well over the last year and a half", Stewart adds. It has brought on Samsung, Lexmark, Oki and Brother, and developed a channel within that business.

Robust
The company has taken on Celine Hackett, latterly of PC Cubed, to develop the Auto ID and EPOS business. It’s a new area for SquareOne although parent Midwich has a UK company in the AutoID space. "We’re looking at new partners and new vendors all the time," Stewart comments. It represents a good market opportunity because it’s an incremental area where SquareOne hasn’t operated before. As for CCTV and video conferencing, SquareOne has gained access to a number of solutions through parent company Midwich which acquired a security distributor in the UK.

Stewart says the channel has proved to be very robust in the current circumstances. SquareOne hasn’t seen any huge drop off in business from its key resellers. People have obviously looked at their costs and cut back where necessary. As for vendors, he says it’s important that they recognise that different markets have their own local needs and don’t try to lump Ireland under the general banner of UK and Ireland.

He believes it’s important they look at Ireland in terms of market share rather than overall volumes because it’s not a massive market. Looking ahead, he is "quietly positive" after a solid year. "I can’t see huge growth but if we keep going and keep adding [business], we’ll be OK."

RELATED ARTICLES
#mc_embed_signup{background:#fff; false;clear:left; font:14px Helvetica,Arial,sans-serif; width: px;} /* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
Sign up for the
Technology Minute
(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='MMERGE2';ftypes[2]='text';fnames[3]='MMERGE3';ftypes[3]='text';fnames[4]='MMERGE4';ftypes[4]='text';fnames[5]='SIGNUP';ftypes[5]='text';fnames[6]='MMERGE6';ftypes[6]='imageurl';}(jQuery));var $mcj = jQuery.noConflict(true); // SMS Phone Multi-Country Functionality if(!window.MC) { window.MC = {}; } window.MC.smsPhoneData = { defaultCountryCode: 'IE', programs: [], smsProgramDataCountryNames: [] }; function getCountryUnicodeFlag(countryCode) { return countryCode.toUpperCase().replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397)) }; // HTML sanitization function to prevent XSS function sanitizeHtml(str) { if (typeof str !== 'string') return ''; return str .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, ''') .replace(/\//g, '/'); } // URL sanitization function to prevent javascript: and data: URLs function sanitizeUrl(url) { if (typeof url !== 'string') return ''; const trimmedUrl = url.trim().toLowerCase(); if (trimmedUrl.startsWith('javascript:') || trimmedUrl.startsWith('data:') || trimmedUrl.startsWith('vbscript:')) { return '#'; } return url; } const getBrowserLanguage = () => { if (!window?.navigator?.language?.split('-')[1]) { return window?.navigator?.language?.toUpperCase(); } return window?.navigator?.language?.split('-')[1]; }; // getBrowserLanguageCode() and getSmsProgramForCountryAndLanguage() are provided globally // by the external mc-sms-phone.js script loaded alongside this inline form script. function getDefaultCountryProgram(defaultCountryCode, smsProgramData) { if (!smsProgramData || smsProgramData.length === 0) { return null; } var browserCountryCode = getBrowserLanguage(); var browserLangCode = getBrowserLanguageCode(); if (browserCountryCode) { var match = getSmsProgramForCountryAndLanguage(smsProgramData, browserCountryCode, browserLangCode); if (match) { return match; } } if (defaultCountryCode) { var match = getSmsProgramForCountryAndLanguage(smsProgramData, defaultCountryCode, browserLangCode); if (match) { return match; } } return smsProgramData[0]; } function updateSmsLegalText(countryCode, fieldName) { if (!countryCode || !fieldName) { return; } var programs = window?.MC?.smsPhoneData?.programs; if (!programs || !Array.isArray(programs)) { return; } var browserLangCode = getBrowserLanguageCode(); var program = getSmsProgramForCountryAndLanguage(programs, countryCode, browserLangCode); if (!program || !program.requiredTemplate) { return; } var smsConsentHtmlRenderingFixEnabled = true; const legalTextElement = document.querySelector('#legal-text-' + fieldName); if (!legalTextElement) { return; } const divRegex = new RegExp(']*>', 'gi'); const blockWrapperRegex = new RegExp(']*>', 'gi'); const fullAnchorRegex = new RegExp('<a.*?', 'g'); const anchorRegex = new RegExp('(.*?)'); const template = smsConsentHtmlRenderingFixEnabled ? program.requiredTemplate .replace(/\s*

]*>/gi, ' ') .replace(blockWrapperRegex, '') : program.requiredTemplate.replace(divRegex, ''); legalTextElement.textContent = ''; const parts = template.split(/(.*?)/g); parts.forEach(function(part) { if (!part) { return; } const anchorMatch = part.match(/(.+?)/); if (anchorMatch) { const linkElement = document.createElement('a'); linkElement.href = sanitizeUrl(anchorMatch[1]); linkElement.target = anchorMatch[2] ? sanitizeHtml(anchorMatch[2]) : '_blank'; linkElement.rel = 'noopener noreferrer'; linkElement.textContent = sanitizeHtml(anchorMatch[3]); legalTextElement.appendChild(linkElement); } else { legalTextElement.appendChild(document.createTextNode(part)); } }); } function generateDropdownOptions(smsProgramData) { if (!smsProgramData || smsProgramData.length === 0) { return ''; } var programs = true ? smsProgramData.filter(function(p, i, arr) { return arr.findIndex(function(q) { return q.countryCode === p.countryCode; }) === i; }) : smsProgramData; return programs.map(program => { const flag = getCountryUnicodeFlag(program.countryCode); const countryName = getCountryName(program.countryCode); const callingCode = program.countryCallingCode || ''; // Sanitize all values to prevent XSS const sanitizedCountryCode = sanitizeHtml(program.countryCode || ''); const sanitizedCountryName = sanitizeHtml(countryName || ''); const sanitizedCallingCode = sanitizeHtml(callingCode || ''); return '' + sanitizedCountryName + ' ' + sanitizedCallingCode + ''; }).join(''); } function getCountryName(countryCode) { if (window.MC?.smsPhoneData?.smsProgramDataCountryNames && Array.isArray(window.MC.smsPhoneData.smsProgramDataCountryNames)) { for (let i = 0; i < window.MC.smsPhoneData.smsProgramDataCountryNames.length; i++) { if (window.MC.smsPhoneData.smsProgramDataCountryNames[i].code === countryCode) { return window.MC.smsPhoneData.smsProgramDataCountryNames[i].name; } } } return countryCode; } function getDefaultPlaceholder(countryCode) { if (!countryCode || typeof countryCode !== 'string') { return '+1 000 000 0000'; // Default US placeholder } var mockPlaceholders = [ { countryCode: 'US', placeholder: '+1 000 000 0000', helpText: 'Include the US country code +1 before the phone number', }, { countryCode: 'GB', placeholder: '+44 0000 000000', helpText: 'Include the GB country code +44 before the phone number', }, { countryCode: 'CA', placeholder: '+1 000 000 0000', helpText: 'Include the CA country code +1 before the phone number', }, { countryCode: 'AU', placeholder: '+61 000 000 000', helpText: 'Include the AU country code +61 before the phone number', }, { countryCode: 'DE', placeholder: '+49 000 0000000', helpText: 'Fügen Sie vor der Telefonnummer die DE-Ländervorwahl +49 ein', }, { countryCode: 'FR', placeholder: '+33 0 00 00 00 00', helpText: 'Incluez le code pays FR +33 avant le numéro de téléphone', }, { countryCode: 'ES', placeholder: '+34 000 000 000', helpText: 'Incluya el código de país ES +34 antes del número de teléfono', }, { countryCode: 'NL', placeholder: '+31 0 00000000', helpText: 'Voeg de NL-landcode +31 toe vóór het telefoonnummer', }, { countryCode: 'BE', placeholder: '+32 000 00 00 00', helpText: 'Incluez le code pays BE +32 avant le numéro de téléphone', }, { countryCode: 'CH', placeholder: '+41 00 000 00 00', helpText: 'Fügen Sie vor der Telefonnummer die CH-Ländervorwahl +41 ein', }, { countryCode: 'AT', placeholder: '+43 000 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die AT-Ländervorwahl +43 ein', }, { countryCode: 'IE', placeholder: '+353 00 000 0000', helpText: 'Include the IE country code +353 before the phone number', }, { countryCode: 'IT', placeholder: '+39 000 000 0000', helpText: 'Includere il prefisso internazionale IT +39 prima del numero di telefono', }, { countryCode: 'NO', placeholder: '+47 000 00 000', helpText: 'Inkluder NO landskode +47 før telefonnummeret', }, { countryCode: 'SE', placeholder: '+46 00 000 00 00', helpText: 'Inkludera SE landskod +46 före telefonnumret', }, { countryCode: 'DK', placeholder: '+45 00 00 00 00', helpText: 'Inkluder DK landekode +45 før telefonnummeret', }, { countryCode: 'FI', placeholder: '+358 00 000 0000', helpText: 'Sisällytä FI-maakoodi +358 ennen puhelinnumeroa', }, { countryCode: 'EE', placeholder: '+372 0000 0000', helpText: 'Lisage EE riigikood +372 telefoninumbri ette', }, { countryCode: 'PL', placeholder: '+48 000 000 000', helpText: 'Podaj numer kierunkowy PL +48 przed numerem telefonu', }, { countryCode: 'SK', placeholder: '+421 000 000 000', helpText: 'Pred telefónne číslo uveďte kód krajiny SK +421', }, { countryCode: 'LV', placeholder: '+371 0000 0000', helpText: 'Iekļaujiet LV valsts kodu +371 pirms tālruņa numura', }, { countryCode: 'LT', placeholder: '+370 0000 0000', helpText: 'Įtraukite LT šalies kodą +370 prieš telefono numerį', }, { countryCode: 'GR', placeholder: '+30 000 000 0000', helpText: 'Συμπεριλάβετε τον κωδικό χώρας GR +30 πριν από τον αριθμό τηλεφώνου', }, { countryCode: 'PT', placeholder: '+351 000 000 000', helpText: 'Inclua o código de país PT +351 antes do número de telefone', }, { countryCode: 'HR', placeholder: '+385 00 000 0000', helpText: 'Uključite HR pozivni broj države +385 prije telefonskog broja', }, { countryCode: 'SI', placeholder: '+386 00 000 000', helpText: 'Vključite SI kodo države +386 pred telefonsko številko', }, { countryCode: 'IS', placeholder: '+354 000 0000', helpText: 'Láttu IS landsnúmer +354 fylgja á undan símanúmerinu', }, { countryCode: 'LU', placeholder: '+352 000 000 000', helpText: 'Incluez le code pays LU +352 avant le numéro de téléphone', }, { countryCode: 'MC', placeholder: '+377 00 00 00 00', helpText: 'Incluez le code pays MC +377 avant le numéro de téléphone', }, { countryCode: 'AD', placeholder: '+376 000 000', helpText: 'Incloeu el codi de país AD +376 abans del número de telèfon', }, { countryCode: 'JE', placeholder: '+44 0000 000000', helpText: 'Include the JE country code +44 before the phone number', }, { countryCode: 'IM', placeholder: '+44 0000 000000', helpText: 'Include the IM country code +44 before the phone number', }, { countryCode: 'GG', placeholder: '+44 0000 000000', helpText: 'Include the GG country code +44 before the phone number', }, { countryCode: 'AL', placeholder: '+355 00 000 0000', helpText: 'Përfshini kodin e vendit AL +355 para numrit të telefonit', }, { countryCode: 'SM', placeholder: '+378 0000 000000', helpText: 'Includere il prefisso internazionale SM +378 prima del numero di telefono', }, { countryCode: 'FO', placeholder: '+298 000000', helpText: 'Inkluder FO landekode +298 før telefonnummeret', }, { countryCode: 'MT', placeholder: '+356 0000 0000', helpText: 'Include the MT country code +356 before the phone number', }, { countryCode: 'LI', placeholder: '+423 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die LI-Ländervorwahl +423 ein', }, { countryCode: 'GI', placeholder: '+350 000 00000', helpText: 'Include the GI country code +350 before the phone number', }, { countryCode: 'MD', placeholder: '+373 00 000 000', helpText: 'Includeți codul de țară MD +373 înaintea numărului de telefon', }, { countryCode: 'HU', placeholder: '+36 00 000 0000', helpText: 'A telefonszám előtt adja meg a HU országkódot +36', }, { countryCode: 'NZ', placeholder: '+64 00 000 0000', helpText: 'Include the NZ country code +64 before the phone number', }, { countryCode: 'ME', placeholder: '+382 00 000 000', helpText: 'Uključite ME pozivni broj države +382 prije telefonskog broja', }, ]; const selectedPlaceholder = mockPlaceholders.find(function(item) { return item && item.countryCode === countryCode; }); return selectedPlaceholder ? selectedPlaceholder.placeholder : mockPlaceholders[0].placeholder; } function updatePlaceholder(countryCode, fieldName) { if (!countryCode || !fieldName) { return; } const phoneInput = document.querySelector('#mce-' + fieldName); if (!phoneInput) { return; } const placeholder = getDefaultPlaceholder(countryCode); if (placeholder) { phoneInput.placeholder = placeholder; } } function updateCountryCodeInstruction(countryCode, fieldName) { updatePlaceholder(countryCode, fieldName); } function getDefaultHelpText(countryCode) { var mockPlaceholders = [ { countryCode: 'US', placeholder: '+1 000 000 0000', helpText: 'Include the US country code +1 before the phone number', }, { countryCode: 'GB', placeholder: '+44 0000 000000', helpText: 'Include the GB country code +44 before the phone number', }, { countryCode: 'CA', placeholder: '+1 000 000 0000', helpText: 'Include the CA country code +1 before the phone number', }, { countryCode: 'AU', placeholder: '+61 000 000 000', helpText: 'Include the AU country code +61 before the phone number', }, { countryCode: 'DE', placeholder: '+49 000 0000000', helpText: 'Fügen Sie vor der Telefonnummer die DE-Ländervorwahl +49 ein', }, { countryCode: 'FR', placeholder: '+33 0 00 00 00 00', helpText: 'Incluez le code pays FR +33 avant le numéro de téléphone', }, { countryCode: 'ES', placeholder: '+34 000 000 000', helpText: 'Incluya el código de país ES +34 antes del número de teléfono', }, { countryCode: 'NL', placeholder: '+31 0 00000000', helpText: 'Voeg de NL-landcode +31 toe vóór het telefoonnummer', }, { countryCode: 'BE', placeholder: '+32 000 00 00 00', helpText: 'Incluez le code pays BE +32 avant le numéro de téléphone', }, { countryCode: 'CH', placeholder: '+41 00 000 00 00', helpText: 'Fügen Sie vor der Telefonnummer die CH-Ländervorwahl +41 ein', }, { countryCode: 'AT', placeholder: '+43 000 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die AT-Ländervorwahl +43 ein', }, { countryCode: 'IE', placeholder: '+353 00 000 0000', helpText: 'Include the IE country code +353 before the phone number', }, { countryCode: 'IT', placeholder: '+39 000 000 0000', helpText: 'Includere il prefisso internazionale IT +39 prima del numero di telefono', }, { countryCode: 'NO', placeholder: '+47 000 00 000', helpText: 'Inkluder NO landskode +47 før telefonnummeret', }, { countryCode: 'SE', placeholder: '+46 00 000 00 00', helpText: 'Inkludera SE landskod +46 före telefonnumret', }, { countryCode: 'DK', placeholder: '+45 00 00 00 00', helpText: 'Inkluder DK landekode +45 før telefonnummeret', }, { countryCode: 'FI', placeholder: '+358 00 000 0000', helpText: 'Sisällytä FI-maakoodi +358 ennen puhelinnumeroa', }, { countryCode: 'EE', placeholder: '+372 0000 0000', helpText: 'Lisage EE riigikood +372 telefoninumbri ette', }, { countryCode: 'PL', placeholder: '+48 000 000 000', helpText: 'Podaj numer kierunkowy PL +48 przed numerem telefonu', }, { countryCode: 'SK', placeholder: '+421 000 000 000', helpText: 'Pred telefónne číslo uveďte kód krajiny SK +421', }, { countryCode: 'LV', placeholder: '+371 0000 0000', helpText: 'Iekļaujiet LV valsts kodu +371 pirms tālruņa numura', }, { countryCode: 'LT', placeholder: '+370 0000 0000', helpText: 'Įtraukite LT šalies kodą +370 prieš telefono numerį', }, { countryCode: 'GR', placeholder: '+30 000 000 0000', helpText: 'Συμπεριλάβετε τον κωδικό χώρας GR +30 πριν από τον αριθμό τηλεφώνου', }, { countryCode: 'PT', placeholder: '+351 000 000 000', helpText: 'Inclua o código de país PT +351 antes do número de telefone', }, { countryCode: 'HR', placeholder: '+385 00 000 0000', helpText: 'Uključite HR pozivni broj države +385 prije telefonskog broja', }, { countryCode: 'SI', placeholder: '+386 00 000 000', helpText: 'Vključite SI kodo države +386 pred telefonsko številko', }, { countryCode: 'IS', placeholder: '+354 000 0000', helpText: 'Láttu IS landsnúmer +354 fylgja á undan símanúmerinu', }, { countryCode: 'LU', placeholder: '+352 000 000 000', helpText: 'Incluez le code pays LU +352 avant le numéro de téléphone', }, { countryCode: 'MC', placeholder: '+377 00 00 00 00', helpText: 'Incluez le code pays MC +377 avant le numéro de téléphone', }, { countryCode: 'AD', placeholder: '+376 000 000', helpText: 'Incloeu el codi de país AD +376 abans del número de telèfon', }, { countryCode: 'JE', placeholder: '+44 0000 000000', helpText: 'Include the JE country code +44 before the phone number', }, { countryCode: 'IM', placeholder: '+44 0000 000000', helpText: 'Include the IM country code +44 before the phone number', }, { countryCode: 'GG', placeholder: '+44 0000 000000', helpText: 'Include the GG country code +44 before the phone number', }, { countryCode: 'AL', placeholder: '+355 00 000 0000', helpText: 'Përfshini kodin e vendit AL +355 para numrit të telefonit', }, { countryCode: 'SM', placeholder: '+378 0000 000000', helpText: 'Includere il prefisso internazionale SM +378 prima del numero di telefono', }, { countryCode: 'FO', placeholder: '+298 000000', helpText: 'Inkluder FO landekode +298 før telefonnummeret', }, { countryCode: 'MT', placeholder: '+356 0000 0000', helpText: 'Include the MT country code +356 before the phone number', }, { countryCode: 'LI', placeholder: '+423 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die LI-Ländervorwahl +423 ein', }, { countryCode: 'GI', placeholder: '+350 000 00000', helpText: 'Include the GI country code +350 before the phone number', }, { countryCode: 'MD', placeholder: '+373 00 000 000', helpText: 'Includeți codul de țară MD +373 înaintea numărului de telefon', }, { countryCode: 'HU', placeholder: '+36 00 000 0000', helpText: 'A telefonszám előtt adja meg a HU országkódot +36', }, { countryCode: 'NZ', placeholder: '+64 00 000 0000', helpText: 'Include the NZ country code +64 before the phone number', }, { countryCode: 'ME', placeholder: '+382 00 000 000', helpText: 'Uključite ME pozivni broj države +382 prije telefonskog broja', }, ]; if (!countryCode || typeof countryCode !== 'string') { return mockPlaceholders[0].helpText; } const selectedHelpText = mockPlaceholders.find(function(item) { return item && item.countryCode === countryCode; }); return selectedHelpText ? selectedHelpText.helpText : mockPlaceholders[0].helpText; } function setDefaultHelpText(countryCode) { const helpTextSpan = document.querySelector('#help-text'); if (!helpTextSpan) { return; } } function updateHelpTextCountryCode(countryCode, fieldName) { if (!countryCode || !fieldName) { return; } setDefaultHelpText(countryCode); } function initializeSmsPhoneDropdown(fieldName) { if (!fieldName || typeof fieldName !== 'string') { return; } const dropdown = document.querySelector('#country-select-' + fieldName); const displayFlag = document.querySelector('#flag-display-' + fieldName); if (!dropdown || !displayFlag) { return; } const smsPhoneData = window.MC?.smsPhoneData; if (smsPhoneData && smsPhoneData.programs && Array.isArray(smsPhoneData.programs)) { dropdown.innerHTML = generateDropdownOptions(smsPhoneData.programs); } const defaultProgram = getDefaultCountryProgram(smsPhoneData?.defaultCountryCode, smsPhoneData?.programs); if (defaultProgram && defaultProgram.countryCode) { dropdown.value = defaultProgram.countryCode; const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName); if (flagSpan) { flagSpan.textContent = getCountryUnicodeFlag(defaultProgram.countryCode); flagSpan.setAttribute('aria-label', sanitizeHtml(defaultProgram.countryCode) + ' flag'); } updateSmsLegalText(defaultProgram.countryCode, fieldName); updatePlaceholder(defaultProgram.countryCode, fieldName); updateCountryCodeInstruction(defaultProgram.countryCode, fieldName); } var smsNotRequiredRemoveCountryCodeEnabled = true; var smsField = Object.values({"EMAIL":{"name":"EMAIL","label":"Email Address","helper_text":"","type":"email","required":true,"audience_field_name":"Email Address","merge_id":0,"help_text_enabled":false,"enabled":true,"order":0,"field_type":"merge"},"FNAME":{"name":"FNAME","label":"First Name","helper_text":"","type":"text","required":false,"audience_field_name":"First Name","enabled":false,"order":null,"field_type":"merge","merge_id":1},"MMERGE2":{"name":"MMERGE2","label":"Second Name","helper_text":"","type":"text","required":false,"audience_field_name":"Second Name","enabled":false,"order":null,"field_type":"merge","merge_id":2},"MMERGE3":{"name":"MMERGE3","label":"Company Name","helper_text":"","type":"text","required":false,"audience_field_name":"Company Name","enabled":false,"order":null,"field_type":"merge","merge_id":3},"MMERGE4":{"name":"MMERGE4","label":"Job Title","helper_text":"","type":"text","required":false,"audience_field_name":"Job Title","enabled":false,"order":null,"field_type":"merge","merge_id":4},"SIGNUP":{"name":"SIGNUP","label":"Signup form location","helper_text":"","type":"text","required":false,"audience_field_name":"Signup form location","enabled":false,"order":null,"field_type":"merge","merge_id":5},"MMERGE6":{"name":"MMERGE6","label":"Image URL","helper_text":"","type":"imageurl","required":false,"audience_field_name":"Image URL","enabled":false,"order":null,"field_type":"merge","merge_id":6}}).find(function(f) { return f.name === fieldName && f.type === 'smsphone'; }); var isRequired = smsField ? smsField.required : false; var shouldAppendCountryCode = smsNotRequiredRemoveCountryCodeEnabled ? isRequired : true; var phoneInput = document.querySelector('#mce-' + fieldName); if (phoneInput && defaultProgram.countryCallingCode && shouldAppendCountryCode) { phoneInput.value = defaultProgram.countryCallingCode; } displayFlag?.addEventListener('click', function(e) { dropdown.focus(); }); dropdown?.addEventListener('change', function() { const selectedCountry = this.value; if (!selectedCountry || typeof selectedCountry !== 'string') { return; } const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName); if (flagSpan) { flagSpan.textContent = getCountryUnicodeFlag(selectedCountry); flagSpan.setAttribute('aria-label', sanitizeHtml(selectedCountry) + ' flag'); } const selectedProgram = window.MC?.smsPhoneData?.programs.find(function(program) { return program && program.countryCode === selectedCountry; }); var smsNotRequiredRemoveCountryCodeEnabled = true; var smsField = Object.values({"EMAIL":{"name":"EMAIL","label":"Email Address","helper_text":"","type":"email","required":true,"audience_field_name":"Email Address","merge_id":0,"help_text_enabled":false,"enabled":true,"order":0,"field_type":"merge"},"FNAME":{"name":"FNAME","label":"First Name","helper_text":"","type":"text","required":false,"audience_field_name":"First Name","enabled":false,"order":null,"field_type":"merge","merge_id":1},"MMERGE2":{"name":"MMERGE2","label":"Second Name","helper_text":"","type":"text","required":false,"audience_field_name":"Second Name","enabled":false,"order":null,"field_type":"merge","merge_id":2},"MMERGE3":{"name":"MMERGE3","label":"Company Name","helper_text":"","type":"text","required":false,"audience_field_name":"Company Name","enabled":false,"order":null,"field_type":"merge","merge_id":3},"MMERGE4":{"name":"MMERGE4","label":"Job Title","helper_text":"","type":"text","required":false,"audience_field_name":"Job Title","enabled":false,"order":null,"field_type":"merge","merge_id":4},"SIGNUP":{"name":"SIGNUP","label":"Signup form location","helper_text":"","type":"text","required":false,"audience_field_name":"Signup form location","enabled":false,"order":null,"field_type":"merge","merge_id":5},"MMERGE6":{"name":"MMERGE6","label":"Image URL","helper_text":"","type":"imageurl","required":false,"audience_field_name":"Image URL","enabled":false,"order":null,"field_type":"merge","merge_id":6}}).find(function(f) { return f.name === fieldName && f.type === 'smsphone'; }); var isRequired = smsField ? smsField.required : false; var shouldAppendCountryCode = smsNotRequiredRemoveCountryCodeEnabled ? isRequired : true; var phoneInput = document.querySelector('#mce-' + fieldName); if (phoneInput && selectedProgram.countryCallingCode && shouldAppendCountryCode) { phoneInput.value = selectedProgram.countryCallingCode; } updateSmsLegalText(selectedCountry, fieldName); updatePlaceholder(selectedCountry, fieldName); updateCountryCodeInstruction(selectedCountry, fieldName); }); } document.addEventListener('DOMContentLoaded', function() { const smsPhoneFields = document.querySelectorAll('[id^="country-select-"]'); smsPhoneFields.forEach(function(dropdown) { const fieldName = dropdown?.id.replace('country-select-', ''); initializeSmsPhoneDropdown(fieldName); }); });

- Advertisment -

Most Popular