More code options for personalisation

My client wants to use 'Dear NAME' and 'Hi' on the same campaign, depending if they have a subscriber's name or not.

Because of this I have to send two separate emails -- there is no way to use the fall back option:

[firstname,fallback=colleague],

An idea to solve this would be to have some more logic options available.

[if_firstname]Dear [firstname,fallback=colleague],[else /]Hi,[/if_firstname]

Makes sense?

roshodgekiss roshodgekiss, 5 years ago

Hi architxt, welcome to the forums! I'm happy to add your vote for conditional logic in our template tags - sure agree it would be useful in situations like this. Many thanks for your feedback and keep the ideas coming! :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
penny0l0, 5 years ago

I'd vote for this too!

roshodgekiss roshodgekiss, 5 years ago

Thank you, penny0l0 - I've recorded your vote internally. Have a good one! :D


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
Textello, 4 years ago

We'd also very much favor such a feature for two reasons: 1) in other languages (eg. German) "Dear" has two different variations, depending on the gender: "Liebe" and "Lieber". Up until now we're forced to use a dirty solution by writing "Liebe/r". 2) If we could show or hide entire blocks of content depending on certain custom fields we can tailor our newsletter better to the recipient. For example, if s/he is already a paying subscriber, we don't have to explain our pricing stucture to them.

roshodgekiss roshodgekiss, 4 years ago

Thanks Textello for explaining this scenario - I can understand why this would be an issue in the German language. We'll definitely give it some thought, but in the interim, perhaps you can consider a [gender-personalization] custom field, or similar?

I'll also add your vote for conditional fields - agree that they would be useful in this scenario. Thank you!


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
gpro gpro, 4 years ago

@ roshedgekiss

Sorry to reanimate such an old thread, but as I have the same problem as above people, I would like to know what you mean by "perhaps you can consider a [gender-personalization] custom field, or similar?"

I cannot find anything in the help nor in the forum.

I would need two fallback-levels:

Regular: Dear Mr. X (if subscriber has entered a lastname AND is male), but if not…
1st fallback: Dear Mrs. Y (if subscriber has entered a lastname AND is female), but if not…
2nd fallback: Dear customer,

I already have a Custom Field for the gender: male / female, but how do I create some code that transforms that info into a gender customized addressing?

Any ideas how to achieve that? Thank you!


- - -
Mathias (gpro)
roshodgekiss roshodgekiss, 4 years ago

Hey there gpro, no trouble at all - I'm glad that there's still interest in improving our custom fields and personalization :)

At present, the only way to do this would be to have a 'Title' custom field, with values like 'Mr', 'Mrs', 'Dr' etc. These values will have to be populated by new subscribers, or manually by yourself. Then you could use this title field like so:

Dear [title,fallback=] [lastname,fallback=customer],

It isn't possible to map values conditionally to existing custom field values like gender, I'm sorry to say. I'll happily add your vote for a mechanism like this and keep you posted if it's something we add in the future. Many thanks, gpro!


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
gpro gpro, 4 years ago

Thank you for your reply! That's just what I do already!

Talking about custom fields: is there a way to make some fields mandatory?


- - -
Mathias (gpro)
A_Spannbauer, 4 years ago

Hi
I have the some issue with german language newsletters - for example the classic:


Sehr geehrte Frau
Sehr geehrter Herr

It would be nice, if there is a better solution than making a "sehr geehrte/sehr geehrter" to every entry in the list. And if i do so, how should i make the sign-up form?

roshodgekiss roshodgekiss, 4 years ago

@gpro - Sorry the suggestion there was not that useful - but it looks like you were fairly on the right track in terms of what can be done at present. :) In regards to making custom fields mandatory, this can't be enforced by the app, I'm sorry to say. Your best bet is to add client-side validation to your forms, ie. have a script that checks if all form fields are not empty, prior to submission. Here's a good guide to getting started with JS validation.

@A_Spannbauer - Thank you so much for your suggestion, I'll add your vote internally for conditional content based on custom fields, as that would be the best way to approach this. In the interim, I recommend creating a custom field for 'greeting' (or the German equivalent) and having your subscribe forms submit a geehrte/geehrter value along with the usual name and email address. As in my earlier response, this may require a little playing around with JavaScript.

Thanks, folks! We can certainly do a lot more to make this process more friendly for all, so I'll be sure to keep you posted as we do more with custom fields on our end.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
gpro gpro, 4 years ago

Here's a tip (that I use myself for my German newsletters) for A_Spannbauer:

Instead of the complicated (and at moment not solvable) problem of the "Sehr geehrter Herr  / Sehr geehrte Frau", consider using "Guten Tag" [Anrede] [Lastname]. This way, you do not have the gender specific addressing / greeting anymore.

And another handy tip:

Make the lastname field mandatory (via JavaScript).

Put this in the head area of your HTML page with the subscription form:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8/jquery.validate.min.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
   $("#subForm").validate();
   });
</script>



and put furthermore this
class="required"
behind every mandatory field, e.g.:


    <label for="Nachname" >Nachname:</label>
    <br /><input type="text" name="cm-f-pkjhr" id="Nachname" class="required" /><br /><br />

The only turndown is: you get an English error message saying "This field is required."
Unfortunately, I don't know how to change that into German...
:-(


- - -
Mathias (gpro)
roshodgekiss roshodgekiss, 4 years ago

Hey there gpro, thank you so much for your tips! In regards to the 'This field is required' message, check out the 'setMessage' method in validate.js - you can set a custom, German-language message here.

I've been wanting to blog about validation for a while now, so thank you for the extra motivation! Stay tuned to our blog for more :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098