BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Email Marketer Community Forum > Customization and Integration

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2011, 10:54 AM
prithwiraj + prithwiraj is offline
Interspire Customer
 
Join Date: Jun 2011
Posts: 7
Unhappy How to Make Trigger Work

Hi,

We are using Inter spire Email Marketer Version 6.0.2. We are currently trying to use trigger to automatically send mails one different event (Like on download of a specific product).

We have configured the trigger and firing it on the basis of a custom field called download date. We have created the trigger, and are inserting the users using the XML api from our site. But the trigger mails are not going out. Our cron is set up (auto responders are working so the cron is working all right), Triggers are added to the cron and xml api is successfully inserting records with correct data (including the download date that is required to fire the trigger).


Can anybody guide us how to get the triggers working ?
Also will the trigger fire when there is an Update to a existing record?

Thanks

Prithwiraj
Reply With Quote
  #2  
Old 06-24-2011, 06:20 PM
Teneo + Teneo is offline
Interspire Customer
 
Join Date: Feb 2009
Location: Brugges
Posts: 630
Default

Make sure in the CRON setup your "Triggers Sending" is active and set to for example 5 minutes or so.

Triggers work on date based fields or events in an email campaign.
What have you created as a trigger exactly, based on what fields and data .
__________________

PROMO : Signup today for our SMTP Relay services and receive a free license of our MPS Addon !

Bram Van Daele

TENEO SMTP relay services
http://esp.teneo.be

(Contact me directly)
Reply With Quote
  #3  
Old 06-28-2011, 12:04 PM
prithwiraj + prithwiraj is offline
Interspire Customer
 
Join Date: Jun 2011
Posts: 7
Default

Hi Teneo,

How do I check if my "Triggers Sending" is active?
Though I can see in the Cron settings Trigger sending is set to 20 minutes interval.

I have created the trigger mail based on Download Date which is the system date inserted when user downloads some thing in our site and it gets inserted in the interspire db with the xml api. The records are getting inserted but the mails are not firing. My crons are working correctly as autoresponders are working perfectly fine.


Where I am going wrong?
Reply With Quote
  #4  
Old 06-29-2011, 05:57 AM
prithwiraj + prithwiraj is offline
Interspire Customer
 
Join Date: Jun 2011
Posts: 7
Default

Can anybody help me out ?

Thanks
Prithwiraj
Reply With Quote
  #5  
Old 07-03-2011, 04:23 PM
djones + djones is offline
Interspire Customer
 
Join Date: Jan 2010
Posts: 9
Default

Personally I found the triggers work fine if I make sure it is set for a day in the future. If set for today's date I had problems. Give that a try and let me know if that works for you.
Reply With Quote
  #6  
Old 07-04-2011, 05:51 AM
prithwiraj + prithwiraj is offline
Interspire Customer
 
Join Date: Jun 2011
Posts: 7
Default

@ djones

I need to trigger the mails when the customers have downloaded the copy, Is there no way to do this ? How come interspire doesn't solve the bug ?


Thanks
Prithwiraj
Reply With Quote
  #7  
Old 07-09-2011, 04:43 PM
djones + djones is offline
Interspire Customer
 
Join Date: Jan 2010
Posts: 9
Default Use Autoresponders

Is there any reason why you are using a trigger rather than an autoresponder? You can send as many autoresponders as you like using them either immediately or set to "Cron" Firing times.
Reply With Quote
  #8  
Old 09-13-2011, 02:45 AM
theitangell + theitangell is offline
Interspire Customer
 
Join Date: Nov 2010
Posts: 91
Default Trigger Bug

I had the same issue and after looking through the code there is actually a coding issue causing this problem.

When the date is imported via API it accepts dates like this 9/9/2001 but the code is only able to handle dates with zero fill like 09/09/2001 as it trims from the left 6 characters to match the day and month. So you can either make sure you send a correctly formatted date to interspire or edit the code as I did below to avoid anything that slips through.

File : admin\functions\api\jobs_triggeremails.php

Line : 1661
AND date_add(str_to_date(CONCAT(LEFT(d.data, 6), '{$year}'), '%d/%m/%Y'), INTERVAL t.triggerhours HOUR) >= '{$startOfDayString}'

CHANGE TO

Line : 1661
AND date_add(str_to_date(CONCAT(DATE_FORMAT(STR_TO_DATE(d.data, '%d/%m/%Y'), '%d/%m/'), '{$year}'), '%d/%m/%Y'), INTERVAL t.triggerhours HOUR) >= '{$startOfDayString}'

AND THEN

LINE : 1662
AND date_add(str_to_date(CONCAT(LEFT(d.data, 6), '{$year}'), '%d/%m/%Y'), INTERVAL t.triggerhours HOUR) <= '{$endOfDayString}')

CHANGE TO

LINE : 1662
AND date_add(str_to_date(CONCAT(DATE_FORMAT(STR_TO_DATE(d.data, '%d/%m/%Y'), '%d/%m/'), '{$year}'), '%d/%m/%Y'), INTERVAL t.triggerhours HOUR) <= '{$endOfDayString}')

AND FINALLY

LINE: 1626
date_add(str_to_date(CONCAT(LEFT(d.data, 6), '{$year}'), '%d/%m/%Y'), INTERVAL t.triggerhours HOUR)

CHANGE TO

LINE: 1626
date_add(str_to_date(CONCAT(DATE_FORMAT(STR_TO_DATE(d.data, '%d/%m/%Y'), '%d/%m/'), '{$year}'), '%d/%m/%Y'), INTERVAL t.triggerhours HOUR)

Also if you want to make sure this works after changing the above lines you either need to wait till your server hits midnight or you can reset it to run on your next trigger cron job by running this query as it lets the system know the process hasn't been run today.

UPDATE `email_settings_cron_schedule` SET `lastrun` = '10' WHERE `jobtype` = 'triggeremails_p'

I decided the edit this code as I have already imported thousands of contacts and didn't want to do it all over again. The better solution if you have a fresh install is to probably edit the import function to correctly format the date.
Reply With Quote
Reply

Tags
trigger, triggers

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump