Skip Navigation

[Resolved] Newsletter subscription workflow

This thread is resolved. Here is a description of the problem and solution.

Problem:

Setup a newsletter subscription system with Toolset plugins.

Solution:

You can consider workaround with some little custom codes, for example:

https://toolset.com/forums/topic/newsletter-subscription-workflow/#post-1688615

Relevant Documentation:

https://toolset.com/course-lesson/send-notifications-when-someone-submits-the-form/

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by jenniferK-7 4 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1687807

I would like to have a newsletter subscription form - name, email, submit.
Submitting the form triggers email confirmation with verification link and write the name, email to custom newsletter post type.
Visitor clicks email verification link and goes to a new page that upon loading will change a checkbox field in the newsletter post for this person from 0 to 1 to confirm that this email address has been verified, trigger a second email to the visitor confirming their subscription, and present them with a second form that will let them provide more information such as birthdate, preferences, etc. Should they choose to provide more information, this data should be added to the same newsletter post that was created earlier with this person's name and email.
Finally, upon submitting this last form, verify their preferences have been updated via the web page and trigger a third email confirming their preferences.
In any email they receive, they should be able to click a link that will allow them to unsubscribe. This changes another checkbox in that person's newsletter post from 0 - 1 to indicate that the subscription was cancelled.
All of this without logging in.
If they later choose to create an account, then they should be able to access and update their newsletter subscription preferences.
If this newsletter post is created, I also need for it to remain private. I won't link to it from anywhere, but I don't understand if it can/needs to be published to accomplish all of this and if it is published, if search engines will find it somehow.

Can Toolset do something like this? I'm not a programmer so I can't really do custom anything. I got as far as creating the first form and sending the notification email but then I couldn't figure out the verification link. Thinking farther ahead, I also have no idea how I would be able to identify the visitor and the post that needs updating because I don't want them to have to log in. Even if they log in, I'm not sure how to identify the user and match the user up to a page. I will need to know how to identify the logged in user and match them up to specific pages regardless of whether or not this newsletter workflow is doable.

Thanks in advance for your help!

#1688615

Hello,

Within Toolset, there isn't exact feature as you requested, it needs custom codes to achieve what you requested above.

But you can consider workaround with some little custom codes, for example:
1) Setup two custom post types:
- member
- newsletter
https://toolset.com/course-lesson/creating-a-custom-post-type/
Setup one custom taxonomy "prefer-newsletter", register it to both above post types.
https://toolset.com/course-lesson/creating-a-custom-taxonomy/

1) Visitor go to your website, show him a user form for creating users, display three fields:
name, email, submit
After user submit the form, new user created, and he can get an email notifications in his email box with login credentials:
https://toolset.com/course-lesson/creating-forms-for-registering-users/

2) User use above credentials log in your website, display him a post form for creating new "member" post, and select his preference terms in taxonomy "prefer-newsletter"
https://toolset.com/course-lesson/front-end-forms-for-adding-content/

3) Create a post form for creating new "newsletter" post, setup email notifications in this post form:
https://toolset.com/course-lesson/send-notifications-when-someone-submits-the-form/

4) When you submit above new "newsletter" post form, use filter hook cred_notification_recipients to trigger a PHP function
https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_recipients
In this PHP function, get "prefer-newsletter" terms of current "newsletter" post:
https://developer.wordpress.org/reference/functions/get_object_taxonomies/

Use above terms to get related "member" posts:
https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/

Get each "member" post author emails:
https://developer.wordpress.org/reference/functions/get_the_author_meta/

Then apply the email address into "cred_notification_recipients" result

For your reference.

#1696907

Hi, Luo.

Many thanks for the thorough reply! Much appreciated.

Best,
Jen

#1696909

Thanks again!