When magento2 store has 3rd parties system integration then we might be need to store 3rd parties data in magento to make relationships.

We might be need additional attribute to save 3rd parties data in magento 2. Here is post for create new customer attribute in magento2.
https://www.magedad.com/magento-2-create-a-customer-attribute-programmatically-using-setup-data-patch/

1. Get Custom Customer Attribute Value Programatically

PHP
/* Magento\Customer\Api\CustomerRepositoryInterface */
$customer = $this->customerRepository->getById($customerId);
$externalIdAttribute = $customer->getCustomAttribute('external_id');
if ($externalIdAttribute) {
    $externalId =  $externalIdAttribute->getValue();
}


2. Save Custom Customer Attribute Value Programatically

PHP
/* Magento\Customer\Api\CustomerRepositoryInterface */
$customer = $this->customerRepository->getById($customerId);
$customer->setCustomAttribute('external_id', 'ABC123');
$this->customerRepository->save($customer);


That’s it. We also have other customer related post might be it’s help to you.

You can follow this link for more help.

I hope this blog is useful to set/get customer attribute value in magento2 and save. In case, I missed anything or need to add some more information, Don’t heisted to leave a comment in this blog, I’ll get back with some positive approach.

Keep liking 👍 Keep sharing 📣 Keep loving ❤️ Keep inspiring 🤩

96 Comments

  1. **breathe**

    breathe is a plant-powered tincture crafted to promote lung performance and enhance your breathing quality.

  2. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  3. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  4. Alright folks, mcgamesbet.info…seems like a combo of gaming and betting? What’s the deal? Are the odds any good on this site or is it just another trap? Would love to hear if anyone’s actually won something here. mcgamesbet

  5. Hey Beeph! Beeph is the name, and legit gaming is the game. Solid platform, easy to navigate. Worth a look if you’re hunting for some fun. beeph

  6. Okay, tk88vina is legit! Been playing for a while now and haven’t had any issues. Reliable and fun, which is all I ask for. What are you waiting for tk88vina

  7. **balmorex pro**

    balmorex is an exceptional solution for individuals who suffer from chronic joint pain and muscle aches.

  8. Alright, slot fanatics, listen up! 33wwslots is a solid option if you’re looking to go on a spin. The user experience is decent with a fairly large collection. Hit them up here: 33wwslots

  9. Yo, 51gameapp is legit! I had some decent luck there last week. Worth checking out if you’re looking for a new spot to play. Get your game on at 51gameapp!

  10. **finessa**

    Finessa is a natural supplement made to support healthy digestion, improve metabolism, and help you achieve a flatter belly.

  11. Một trong những lý do khiến xn88 được yêu thích là tốc độ nạp rút nhanh chóng qua nhiều phương thức phổ biến tại Việt Nam. Giao dịch minh bạch, xử lý tự động giúp người chơi an tâm khi tham gia lâu dài. TONY03-07O

  12. Những chương trình khuyến mãi hấp dẫn luôn là điểm sáng của nhà cái taptap. Với ưu đãi 1.500.000 đồng khi người chơi bet88 thực hiện nạp lần đầu, cơ hội gia tăng vốn cược chưa bao giờ dễ dàng đến thế. Không chỉ vậy, các chương trình hoàn trả cược tại casino, bắn cá, hay cá cược thể thao cũng được nhà cái taptap cập nhật liên tục với tiền thưởng không giới hạn. Khi chơi tại taptap, bạn sẽ luôn cảm nhận được sự quan tâm từ hệ thống qua các ưu đãi hàng tuần, khuyến mãi sinh nhật hay sự kiện đặc biệt. Hệ thống cá cược tại taptap luôn được nâng cấp liên tục, đảm bảo trải nghiệm chơi tốt nhất cho mọi người. Với hàng loạt trò chơi, giải đấu, tỷ lệ cược hấp dẫn cùng giao dịch rút tiền về ngân hàng dễ dàng, đây chính xác là nơi bạn cần để tham gia cá cược trực tuyến. Còn chần chờ gì nữa, hãy truy cập website 888slot apk HIPHOP ngay để đăng ký tài khoản tapbet thôi nào! TONY03-11O

  13. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  14. Backbiome is an advanced daily wellness supplement formulated to help support spinal comfort, reduce feelings of built-up tension, and promote freer, smoother movement throughout backbiome everyday life.

  15. Boostaro is a modern men’s wellness boostaro formula created to support daily vitality, stamina, and confidence through a practical, natural routine.

  16. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  17. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  18. Fast withdrawals and great customer support. It is rare to find a platform this reliable these days. Trust pkji8888 for your gaming.

  19. [1115]cv999 Login PH | Legit Online Slots at GCash App,Gamitin ang cv999 login ph para sa legit online slots gcash. Maaari ring mag-cv999 download apk para sa mabilis na access. Mag-register na at maglaro! visit: cv999

  20. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  21. The login process is seamless and the site loads quickly even on my mobile data. Everything feels very intuitive. I suggest using jljl8login for a hassle free session.

  22. 789rpgame… caught my eye. If you are into RPG games you’ll love this place, it has a great selection. You might love it if you gave it a chance. Give your luck right now 789rpgame

  23. cobplay has quickly become my go to destination for some serious fun online. The variety of games available keeps things fresh and the bonuses are actually worth claiming. I love how easy it is to navigate and how fair everything feels when I am spinning or placing bets. Come join us and experience the thrill yourself. cobplay

  24. I’ve tried a few platforms lately and this one really stands out. The interface is smooth and the payouts are surprisingly fast. Definitely worth checking out phuujili

  25. Great vibes and even better wins! I had a lucky streak last night and the withdrawal was processed almost instantly. Visit dtg288 for some real action.

  26. Finally found a platform that actually pays out on time. The registration process was a breeze and I was playing within minutes. kr86kr

  27. Love the vibe here! Everything feels professional and the games are addictive in a good way. I’m spending most of my free time on phevojili now.

  28. Really glad I stumbled upon this site. The registration is quick and the games are top notch. vny8858 is a hidden gem for sure.

  29. I’ve tried a few different sites recently but this one feels the most secure. The customer support is also quite responsive which gives me peace of mind while using vnc188.

  30. Everything is so streamlined here. No hassle signing up and the games load instantly. Total thumbs up for vnc168s.

  31. [7008]Jago368: Login Daftar Akun Slot Deposit Dana 10rb,Jago368 menyediakan akses login mudah dan cara main baccarat online yang simpel. Download apk slot gacor sekarang untuk pengalaman bermain yang lancar. visit: jago368

  32. Such a fun place to spend some time and make some extra cash. The community is great and the games are fair. Visit 888fbapp now.

  33. Super friendly community and a very polished website. I appreciate how they handle the promotions. It is a great place to relax and win some cash. Try beekingph

  34. This site has a great vibe and the payouts are consistent. I love how easy it is to navigate through the different sections. Happy with xxx999bet so far.

  35. If you are looking for a platform that actually pays out on time then this is it. Everything is transparent and fair. Big wins at br333win!

  36. [3530]Zorototo: Login Daftar Akun Slot Gacor Deposit Dana,Zorototo menyediakan akses login dan daftar akun mudah. Nikmati slot gacor deposit dana serta download apk slot terpercaya sekarang juga di sini. visit: zorototo

  37. [5548]firejlbet Login PH – Legit Online Slots via GCash,Mag-firejlbet login ph na para sa legit online slots gcash. I-download ang APK at alamin kung paano maglaro ng baccarat. Sumali na sa aming game lobby! visit: firejlbet

  38. The odds here are way better than other sites I’ve tried. It is an exciting place to put your stakes. Check out xpbetgame if you want a real thrill.

  39. I’ve been looking for a reliable platform and this one really delivers. The interface is smooth and the payouts are fast. Definitely check out vn123winpro if you want a great experience.

  40. Great vibe and the games are always updated. I appreciate the transparency with the odds. bd8e884 is a winner in my book.

  41. Really liking the atmosphere here. Everything is well organized and the games are fair. I’ll definitely be coming back to idplanet88 frequently.

Write A Comment