Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Abandoned Cart Reminders with Twilio SendGrid #15

Open
sommes54 opened this issue Jan 5, 2022 · 7 comments
Open

Send Abandoned Cart Reminders with Twilio SendGrid #15

sommes54 opened this issue Jan 5, 2022 · 7 comments

Comments

@sommes54
Copy link

sommes54 commented Jan 5, 2022

Hi @philnash / Twilio labs team,

I am trying to use the Send Abandoned Cart. Manually I am able to send an email by adding a document below to the cart_emails collection but it is NOT working when changes are made to a document in the cart collection as expected although the metadata was successfully added and the conditions met.

Manual Trigger.
admin.firestore().collection('cart_emails').add({ to: '[email protected]', dynamicTemplateData: { name: "Example" } });
cart-collection

@sommes54 sommes54 closed this as completed Jan 8, 2022
@philnash
Copy link
Contributor

philnash commented Jan 9, 2022

Hey @sommes54, sorry for the slow reply, I'm still on summer holiday.

I just wanted to confirm why you closed this? Did the extension eventually work for you? If so, is there something I can document to make it easier in the future? If not, I'd still love to work with you to get it to work so I can understand what has gone wrong.

Thanks!

@sommes54
Copy link
Author

sommes54 commented Jan 9, 2022

I did close it because I thought no one was monitoring it anymore. I have re-opened.

All the documentation talks about monitoring the cart collection but they don't specify if they monitor for specifically the items fields being added or just any change to the collection

@sommes54 sommes54 reopened this Jan 9, 2022
@philnash
Copy link
Contributor

The extension doesn't look for an items field, just any fields that change other than the metadata field.

Are you saying that you add an item to the cart collection and it is never added to the cart_emails collection to be sent the reminder? Have you added the required indexes?

I note your screenshot also shows an empty customerId field. You either need a userId field or to give the cart object the ID of the user it belongs to.

Let me know if any of that helps!

@elhe26
Copy link

elhe26 commented Jan 19, 2022

@philnash is there a way to use admin.auth().tenantManager() to have tenancy support?

@philnash
Copy link
Contributor

@elhe26 Good question, I've not worked with tenancy support in Firebase so I'm not sure. Could you perhaps open a new issue for discussion and describe what you'd need?

@sommes54
Copy link
Author

sommes54 commented Feb 9, 2022

a userId field or to give the cart object the ID of the user it belongs to

Thanks for the reply. Not working yet - I keep getting "user does not have an email address" despite email linked to the user profile on firebase authentication
Screen Shot 2022-02-09 at 4 07 07 AM

@philnash
Copy link
Contributor

philnash commented Feb 9, 2022

Hey @sommes54, thanks for getting back to me on this.

The section of code that deals with grabbing the user and checking whether they have an email is here. It is looking for the email property on the user object returned from auth().getUser(userId).

When you say you user profile has an email linked, do you mean specifically in that email property of the user?

If it would be more helpful to share things privately, please feel free to email me at [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants