Personalization Fields for domin | Community
Skip to main content
Level 4
December 23, 2024
Solved

Personalization Fields for domin

  • December 23, 2024
  • 2 replies
  • 1372 views

Hi Community,

I need to extract the domain name from an email address (e.g., "abc@gmail.com") and include it in an email template. Specifically, I want the email to display the domain of the sender (e.g., "@gmail.com"). Is it possible to achieve this in an AJO or through an automated workflow?

Example:

If the sender's email is "abc@gmail.com," I want the email body to print:

"Hi ABC,

This email is coming from the @1334967.com domain."

Is there a way to automate this?

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anuhya-Y

@ajo_wisdomchase Add the logic for email surface selection criteria, as defined by the marketer, within the expression fragment, and use this fragment for email personalization. For instance, the marketer configures the email channel section in the email settings based on the customer's country. The same logic can be implemented in the expression fragment (e.g., if the customer is from France, display the fr.XYZ.com domain). Note that this approach does not fetch the domain from the 'FROM address' configured in the email channel; the logic for domain selection based on the customer's country needs to be explicitly implemented.

 

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/expression-editor/use-expression-fragments

2 replies

somen-sarkar
Community Advisor
Community Advisor
December 24, 2024

Hi @ajo_wisdomchase ,
You can utilize OOTB Helper function {%= extractEmailDomain(string) %} to achieve the same . In Email body personalize the same using the above mentioned function. Hope this will help you in achieving the objective.

Thanks,
Somen

Level 4
December 24, 2024

Thanks @somen-sarkar ,

 

1) which attribute i am using for replace the string? 

{%= extractEmailDomain(string) %}

 

2) i have 4 domain its automatically fetch the current FROM  address domain.

 

@somen-sarkar @anuhya-y @davidkangni @mohan_dugganab @satheeskannak @parvesh_parmar 

somen-sarkar
Community Advisor
Community Advisor
December 24, 2024

Pass the "From" address as a variable to String {%= extractEmailDomain(string) %}  to retrieve the domain name.

Thanks,

Somen

Anuhya-Y
Community Advisor
Anuhya-YCommunity AdvisorAccepted solution
Community Advisor
December 26, 2024

@ajo_wisdomchase Add the logic for email surface selection criteria, as defined by the marketer, within the expression fragment, and use this fragment for email personalization. For instance, the marketer configures the email channel section in the email settings based on the customer's country. The same logic can be implemented in the expression fragment (e.g., if the customer is from France, display the fr.XYZ.com domain). Note that this approach does not fetch the domain from the 'FROM address' configured in the email channel; the logic for domain selection based on the customer's country needs to be explicitly implemented.

 

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/expression-editor/use-expression-fragments