Triggering send action based mailing
Moderator: moderator
Triggering send action based mailing
Hi,
I am trying to trigger a Send action based mailing ,to send my mailing when ever an event occurs in our system.
I have tried to call up a form to invoke the action but it was no use , I used:
http://{server}/form.do?agnCI=1&agnFN=ActionBasedForm&agnUID=##AGNUID##
Is there a way to invoke the action without a form?
or can someone just someone have any idea what could be the issue with the form?
I am trying to trigger a Send action based mailing ,to send my mailing when ever an event occurs in our system.
I have tried to call up a form to invoke the action but it was no use , I used:
http://{server}/form.do?agnCI=1&agnFN=ActionBasedForm&agnUID=##AGNUID##
Is there a way to invoke the action without a form?
or can someone just someone have any idea what could be the issue with the form?
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: Triggering send action based mailing
What is the content of your form ActionBasedForm?
OpenEMM Maintainer
Re: Triggering send action based mailing
It is supposed to trigger an action to send an action based mailing .
I have tried to call the form both with agnUID and without an agnUID.
The Form just contains the action of sending the mail and a simple success and error messages.
Is there any other content needed to make the form work properly?
I have tried to call the form both with agnUID and without an agnUID.
The Form just contains the action of sending the mail and a simple success and error messages.
Is there any other content needed to make the form work properly?
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: Triggering send action based mailing
Where exactly did you place the link to trigger the form ActionBasedForm? On your website? In an EMM mailing? Anywhere else?
OpenEMM Maintainer
Re: Triggering send action based mailing
No where yet, to test it I am just inserting it in the browser to trigger the form.
I have also tried to use it in a mail but it also showed an error
I have also tried to use it in a mail but it also showed an error
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: Triggering send action based mailing
But how should the browser be able to replace ##AGNUID## with the correct ID string? This can not work.
You may call a website from an EMM form with "?agnUID=$!agnUID" attached to the URL to foward the AGNUID to the website or you can include the UID in an EMM form with "<input type="hidden" name="agnUID" value="$agnUID">". So, EMM somehow must be able to include the correct UID.
You may call a website from an EMM form with "?agnUID=$!agnUID" attached to the URL to foward the AGNUID to the website or you can include the UID in an EMM form with "<input type="hidden" name="agnUID" value="$agnUID">". So, EMM somehow must be able to include the correct UID.
OpenEMM Maintainer
Re: Triggering send action based mailing
Is it possible to trigger the form using a URL somehow?
Maybe even generating UID you can supply it with to send the mailing to the right e-mail?
Basically I am trying to trigger a mail to be sent whenever an event on our website occurs,
if you have any other idea how to do this it would be helpful.
Maybe even generating UID you can supply it with to send the mailing to the right e-mail?
Basically I am trying to trigger a mail to be sent whenever an event on our website occurs,
if you have any other idea how to do this it would be helpful.
Re: Triggering send action based mailing
I just figured this out using PHP to create a UID (thanks to this thread, I stumbled upon what I needed to do to do the same thing: perform an action based on something happening on my website).
The link I used was:
http://[myopenemmserveraddress]/form.do?agnCI=$companyID&agnFN=$formname&agnUID=$UID
$companyID was 1 for me (what are the agnCI values you usually have in your links?)
$formname is "welcome" for me, which is the name of a form I created that has my action as the first action, and I'm having it redirect to my own URLs for success and error (though I haven't figured out how to pass any actual values from OpenEMM to these php files...any ideas?)
$UID I created based on the agn.py script that comes with OpenEMM (it converts the values to base 36 and formats it). My translated code is below. I think you could fake the URLID, as I'm using the wrong URLID and it still seems to work (I haven't checked whether the URLID has to exist yet, mine is an existing URL but it is to an unsubscribe, not a subscribe, which is what my action does).
the UID has the format:
[CompanyID].[MailingID].[CustomerID].[URLID].[signature]
where all of the values are in base 36 (rather than base 2, 8, 10, or 16).
signature I believe is acting like a check sum.
my password and prefix are both blank so I leave them as null, and it gives me the same UID as what OpenEMM would generate for a given customer, mailing, and URL.
The link I used was:
http://[myopenemmserveraddress]/form.do?agnCI=$companyID&agnFN=$formname&agnUID=$UID
$companyID was 1 for me (what are the agnCI values you usually have in your links?)
$formname is "welcome" for me, which is the name of a form I created that has my action as the first action, and I'm having it redirect to my own URLs for success and error (though I haven't figured out how to pass any actual values from OpenEMM to these php files...any ideas?)
$UID I created based on the agn.py script that comes with OpenEMM (it converts the values to base 36 and formats it). My translated code is below. I think you could fake the URLID, as I'm using the wrong URLID and it still seems to work (I haven't checked whether the URLID has to exist yet, mine is an existing URL but it is to an unsubscribe, not a subscribe, which is what my action does).
the UID has the format:
[CompanyID].[MailingID].[CustomerID].[URLID].[signature]
where all of the values are in base 36 (rather than base 2, 8, 10, or 16).
signature I believe is acting like a check sum.
my password and prefix are both blank so I leave them as null, and it gives me the same UID as what OpenEMM would generate for a given customer, mailing, and URL.
Code: Select all
// PHP code for making a UID
function makeSignature( $str )
{
$hashval = str_split( sha1( $str, true ) );
$sig = "";
for( $x = 0; $x < count( $hashval ); $x += 2 ){
$sig .= base_convert( ( ord( $hashval[$x] ) >> 2 ) % 36, 10, 36 );
}
return $sig;
}
function createUID( $companyID, $mailingID, $customerID, $URLID, $password = null, $prefix = null )
{
$baseUID = is_null( $prefix ) ? "" : $prefix . ".";
$baseUID .= base_convert( $companyID, 10, 36 ) . "." .
base_convert( $mailingID, 10, 36 ) . "." .
base_convert( $customerID, 10, 36 ) . "." .
base_convert( $URLID, 10, 36 );
return $baseUID . "." . makeSignature( $baseUID . "." . $password );
}