Email-formatting
This is how you best format email addresses
Usually you can find email addresses as attribute of a lot of entities, e.g. "user", "owner", or "contact" in various third party systems. This depends on the system, but the output often looks something like this:
However, sometimes the email might be a free-form text field in the third party system, so some customers add a comment or even just use non-valid emails. Here are two examples:
"email": "oliver.doe@gmail.com (brother)"
"email": "oliver.doe@go"
In theses cases we have to make sure that the email is either fixable or recognized as a non-valid email. One can use the following Jinja code to do so:
This returns the email in a correct format, or if it's not possible, an empty String "". For our examples that would mean:
"email": "oliver.doe@gmail.com"
"email": ""
Last updated