Faith Path Stage of Life Campaign ================================= This recipe will allow you to send age appropriate emails to a child's parents on the child's birthday. The script will run each morning at 4:30 (CT) as part of the MorningBatch, finding those indicated in the search criteria and emailing the parents. The content should provide stage of life resources with perhaps a video from the pastor, links to resources, etc. This recipe has 13 different emails as you see listed below. All but 2 are sent on the child's birthday. The top 2 in the list are sent the day after a new people record is created for a child 2 or under and for a new record created for a child age 3 to 18. Follow the steps below to create your own Faith Path Campaign. This one was based on the Home Point recommendations. Step 1 - Emails Create each email message in Special Content > Html Content giving each one a different Name, without any spaces (use CamelCasing). The Title of the content will be the Subject of the email when it is sent. This list matches the Python code and serves as a guide to make it easier for you to create your email content. :ref:`See below for a sample email from one of our TouchPoint churches`. ================================ ======================== Name of Email Content When to Send ================================ ======================== FaithPath-Birth-2yrs recently created records FaithPath-Overview-3-18yrs recently created records FaithPath-Blessing-3yrs on 3rd birthday FaithPath-FamilyTime-4yrs on 4th birthday FaithPath-LeadChildtoChrist-5yrs on 5th birthday FaithPath-Prayer-6yrs on 6th birthday FaithPath-Bible-7yrs on 7th birthday FaithPath-Worship-8yrs on 8th birthday FaithPath-GivingServing-9yrs on 9th birthday FaithPath-Adolescence-11yrs on 11th birthday FaithPath-Purity-13yrs on 13th birthday FaithPath-RiteofPassage-16yrs on 16th birthday FaithPath-Launch-17yrs on 17th birthday ================================ ======================== Step 3 - Create Python Script Select and copy all of the code below. Then go to Special Content > Python Scripts and click the New Python Script File button. Name the file ``FaithPathEmails``. Paste the code you copied from this document into the script and save the changes. Step 4 - MorningBatch Create a new Python script named MorningBatch or edit your existing one. Add the following line: ``model.CallScript ('FaithPathEmails')`` .. note:: If you name your Python Script something other than FaithPathEmails you must use that name in the line of code above. These names must match. Step 4 - Edit Python Script Replace the following: - ``queuedby`` - enter the PID# of the person managing the emails (sending 'on behalf of') - ``fromemail`` - enter (between quotes) the email address of the person sending the email - ``fromname`` - enter (between quotes) the name of the person sending the email Now review the search criteria in the script and make any changes that are necessary and save the script. Search Criteria ~~~~~~~~~~~~~~~ The criteria in the code will first find the child based on the age indicated, then add the condition Parents Of (to send to the parents, not the child), and then will add the conditions at the top of the script. Those conditions exclude Previous Members and anyone with one of the flags set - do not call, visit, or mail. .. _SampleFaithPathEmail: Sample Email with a Video Embedded ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. figure:: https://i.tpsdb.com/2017-05-08_16-04-17.png :target: # Code for Python Script ~~~~~~~~~~~~~~~~~~~~~~ .. literalinclude:: Files/FaithPath.py :linenos: | | +--------------------+------------------+ | **Latest Update** | **11/13/2020** | +--------------------+------------------+ Modify image link with secure protocol.