Skip to main content
Solved

Gender specific greeting in email template


Forum|alt.badge.img
  • Freshman I
  • 15 replies

Hi, 

I would like to make the greeting in the email template for a sales order gender specific. 

Depending on the title it should be Mr oder Mrs for example. 

I tried to use it Document.ContactID.Title with if and then logic but somehow I failed.

Has anybody done this before or an idea how the HTML code should like?

Acutally I am not sure if Acumatica understands if and then in the HTML code for templates.

 

Lars

 

Best answer by meganfriesen37

Here’s an example from our AR Statement where I have an IIF statement in the body of an email, but my email template is embedded in my report designer file:
 

 

There are some things to watch out for with using the embedded email notifications and it’s harder to make them look pretty with graphics and stuff.

Check out this similar post with more information:

 

View original
Did this topic help you find an answer to your question?

10 replies

Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • June 14, 2024

Hello,

Are you using the Contacts → CRM Info tab --> Gender field on the Customer Contact record to identify the gender and then an If statement to display ‘Mr.’ or ‘Mrs.’? 

It will help us answer, to see your If statement logic. 

The gender choices above look very limited to me.  I think the world is moving in a different direction, to include more choices of gender. A customization may be needed to add more gender choices.

 

Laura


Forum|alt.badge.img
  • Author
  • Freshman I
  • 15 replies
  • June 14, 2024

Hi Laura, 

 

actually I am using the title in the Contacts → Details. 

Sorry, my screenshot is in German as we use Acumatica in Germany. 

My idea is to distinguish the greeting in the email depending on the value in the title (marked in yellow). 

 

Lars

 

 


Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • June 14, 2024

Hello, Thank you for showing the field.  I am showing version 2024 R1 and I do not see the same field on my screen:

*Where are you adding the Contact’s Title field?  It looks like the Email Template is coming from inside the Sales Order Report:

It will help us to answer if you show the Expression you are using, please. Thank you! Ich danke Ihnen.

Laura


Forum|alt.badge.img
  • Author
  • Freshman I
  • 15 replies
  • June 14, 2024

Hi Laura, 

thank you for your answer. 

The title field seems to be a standard field in the contact as we use it German as standard. 

So the basic idea is that if the value of the title is =’Frau” then the wording shoud be ‘Sehr geehrte” followed by Title and last name. 

If the value of title is =’Herr’ then the wording should be ‘Sehr geehrter’ followed by title and last name. 

 

So the difference is only in the word “geehrte” or “geehrter” depending on the title.

I tried to put this into the email template but my IF clause seems to not ok. 

Maybe you are able to help me out here. 

Vielen Dank :-) 

Lars

 

 

 


meganfriesen37
Captain II
Forum|alt.badge.img+11

@LarsD 

What version of Acumatica are you on?  I remember when that field used to be visible, but since at least 2023 that field is not visible by default on the Contacts screen (at least not in the North American version).  However when I checked the DAC, the title field is still there.  The field is Contact.Title.  In the English version we have Mr., Mrs. Dr. etc.

In your “iif” statement in your email you have a combination of square brackets [ ] and parenthesis ( ).  In the Email template, you should just have the  ( ) type brackets.  Try swapping out the square brackets on the placeholder fields and let me know if that works.

Megan


Forum|alt.badge.img
  • Author
  • Freshman I
  • 15 replies
  • June 17, 2024

Hi Megan, 

many thanks for your help. 

I use the contact.title and can show the value in the email. 

So this does work. 

But my if / els statement does not work although I left out the square brackets. 

So I need to check more how the if statement works correctly. 

Lars

 


meganfriesen37
Captain II
Forum|alt.badge.img+11

Hi Lars,

I’d check out this idea here, it looks like it may not be possible today?

https://community.acumatica.com/ideas/conditionals%2Din%2Dnotification%2Dtemplates%2D2601

I know I’ve used iif statements in email notifications, but I think I’ve only done that all for reports where I have the email notification embedded in the report designer rpx file.


Forum|alt.badge.img
  • Author
  • Freshman I
  • 15 replies
  • June 21, 2024

Hi Megan, 

 

I tried several versions with th if statement but it does not work somehow. 

If you have a working if statement available it would be fantastic if you can send me one example. 

Thanks again 

Lars

 


meganfriesen37
Captain II
Forum|alt.badge.img+11

Here’s an example from our AR Statement where I have an IIF statement in the body of an email, but my email template is embedded in my report designer file:
 

 

There are some things to watch out for with using the embedded email notifications and it’s harder to make them look pretty with graphics and stuff.

Check out this similar post with more information:

 


GlenMartin34
Acumatica Employee
Forum|alt.badge.img
  • Acumatica Employee
  • 67 replies
  • March 19, 2025
meganfriesen37 wrote:

@LarsD

What version of Acumatica are you on?  I remember when that field used to be visible, but since at least 2023 that field is not visible by default on the Contacts screen (at least not in the North American version).  However when I checked the DAC, the title field is still there.  The field is Contact.Title.  In the English version we have Mr., Mrs. Dr. etc.

In your “iif” statement in your email you have a combination of square brackets [ ] and parenthesis ( ).  In the Email template, you should just have the  ( ) type brackets.  Try swapping out the square brackets on the placeholder fields and let me know if that works.

Megan

The Title field was removed from the UI in 2020 R2. It is still available in the DAC and can be exposed on the UI through a customization.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings