APIs & Integrations

Flut
Membre

Single Send Transactional emails: best practice for content translation

Hello,

 

We are using the Single Send API to send transactional emails, and we translate these emails using the Smart Module set to "Contact list membership" mode.

 

All Contacts which have hs_language == "FR", we add to the list "French users", etc. The Smart Module then decides which version to send based on the contact list membership.

 

To send the email, our systems send a POST request to https://api.hubapi.com/marketing/v3/transactional/single-email/send with a body along the lines of:

 

 

 

 

{
  "emailId": 1337,
  "from":"john@doe",
  "message": {
    "to": "foo@bar"
  },
  "customProperties": {
    "name": "Some name",
    ...
  },
  "contactProperties": {
    "hs_language": "fr"
  }
}

 

 

 

 

The problem we are encountering is as follows.

 

The very first transaction email that we send to our customer, is meant for email verification. At that point in time, the customer is not yet a Contact. This means they are not in any contact list, so the Smart Module cannot determine the hs_language.

 

Any subsequent emails are fine, because by then the email address has been created as a Contact and since we send the hs_language, their language is known.

 

What is best practice for translating this very first email? Some options we've gathered:

 

1. Before sending the email, insert the Contact into HubSpot API. We prefer not to do this because of the extra work it entails.

 

2. Create separate emails for each language, just for this very first mail, and send out a specific emailId based on the customer's language. Seems like an option to us, but would make this first email more difficult to maintain. It also makes the system somewhat confusing because the setup for this first email would be completely different from all our other transactional emails.

 

3. For this very first email, dont rely on Smart Module. Send the language in customProperties, and use HubL templating to create huge conditional content blocks with conditional {% if %} .

 

We're just wondering: we can't be the only ones with this problem. How do other HubSpot users solve this? What is best practice?


Thanks in advance!

2 Réponses
kevincal
Membre

Single Send Transactional emails: best practice for content translation

Good Morning -- Did you find a solution?  We're looking at adding our transactional emails into hubspot as well from SFMC.  With SFMC they provide 1 campaign and each template can have variations.    With HubSpot it seems that each email can have Smart Module blocks that can toggle based on Contact.hs_language, but then we'd have a complex mess of dozens of smart-modules on a single template.

 

Our approach is most likely assigning EmailIDs based on language. ie., in our config:
```
templates:

   - key: forgot-password

     hubspot: 

         en: 123456

         fr: 123457

         sp: 123458

...
```

Does that seem like a reasonable approach to the community?

0 Votes
Jaycee_Lewis
Gestionnaire de communauté
Gestionnaire de communauté

Single Send Transactional emails: best practice for content translation

Hey, @Flut 👋 Thanks for the great question. I couldn't find a great fit in previous community posts that we could use a resource for your use case. I'd like to invite some of our community members to the converstaion — hey @Teun @Mike_Eastwood @Kevin-C do you have any experience with a project like @Flut is describing?

 

Thank you very much for taking a look! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Votes