extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Email {{FirstName}} or {{Full Name}} parameters for customer

Open DCSnip3r opened this issue 4 years ago • 7 comments

[READ] Step 1: Are you in the right place?

Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to Firebase support directly.

[REQUIRED] Step 2: Extension name

Firestore-send-email

What feature would you like to see?

Able to specify customer name (first name, last name) in templates/emails.

How would you use it?

I'd like to be able to say "Dear {{FirstName}}," or "Dear {{FullName}}" and have this information directly pulled from the customer record if it is available.

DCSnip3r avatar Jul 13 '21 16:07 DCSnip3r

Handlebars are already supported for these kinds of use cases.

ankit-programmer avatar Jul 18 '21 09:07 ankit-programmer

Perhaps I should have been more clear. I'm aware I can use {{variables}} in templates.

However, I typically send using the toUids or bccUids properties of the trigger-email extension. This way I don't have to code up a document read for the UIDs I want to send to.

I imagine this extension is performing customer doc reads to retrieve the email field of the user. It could spare me an extraneous read, as well as having to code the read myself, if the extension could ALSO grab things like first_name and last_name in its existing doc read.

DCSnip3r avatar Jul 19 '21 14:07 DCSnip3r

Thanks for the suggestion @DCSnip3r. @dackers86 can you look if this suggestion is technically possible?

i14h avatar Jul 20 '21 16:07 i14h

Since we have to read the email out of the USERS_COLLECTION anyway, it seems pretty reasonable to be able to access other fields in that document via something like {{user.field_name}}. I like the suggestion!

I'm not sure if anyone on the Firebase team will have time in the near future to implement it, but I think we'd definitely review a PR if someone wanted to add it.

mbleigh avatar Jul 20 '21 18:07 mbleigh

I would like to implement it.

ankit-programmer avatar Jul 21 '21 09:07 ankit-programmer

Hi @dackers86 Can you please take a look at https://github.com/firebase/extensions/pull/704 and let me know if any modification is required.

ankit-programmer avatar Jul 21 '21 15:07 ankit-programmer

After further discussion, we are placing this back under consideration to see if this type of request gains more traction.

It is quite a technical change which can be handled by developers and could benefit with more developer interest before continuing.

dackers86 avatar Nov 23 '22 08:11 dackers86