trigger transaction email from Subscription WebApp | Community
Skip to main content
Level 4
January 8, 2021
Solved

trigger transaction email from Subscription WebApp

  • January 8, 2021
  • 1 reply
  • 1942 views

HI

we are using campaign classic v7 and need to send promo code within the confirmation email that is tied up to the subscription service.What is the best way to do that? If I include a Personalized block would it execute the code to pull into that template when the user sign up for subscription? Or I have to use the code Step into the subscription flow and trigger the Transaction email from the Java script code?

thanks In advance

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

Subscription email feature could work, but doesn't have access to targetData so may be harder to personalize.

Scripting-wise you can use nms.delivery.SubmitNotification(), which allows arbitrary personalization:

"""

It is possible to explicity[sic] define the target (in reality the content of the file used as the target):

<delivery>
  <targets fromExternalSource='true'>
    <externalSource>MsgId|ClientId|Title|Name|FirstName|Mobile|Email|Market_segment|Product_propensity1|Product_propensity2|Product_propensity3|Product_propensity4|Support_Number|Amount|Threshold1|
                    000001234|M.|Martin|Peter|0650201020|pmartin@neolane.com|1|A1|A2|A3|A4|E12|120000|100000
    </externalSource>
  </targets>
</delivery>

 

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
January 11, 2021

Hi,

 

Subscription email feature could work, but doesn't have access to targetData so may be harder to personalize.

Scripting-wise you can use nms.delivery.SubmitNotification(), which allows arbitrary personalization:

"""

It is possible to explicity[sic] define the target (in reality the content of the file used as the target):

<delivery>
  <targets fromExternalSource='true'>
    <externalSource>MsgId|ClientId|Title|Name|FirstName|Mobile|Email|Market_segment|Product_propensity1|Product_propensity2|Product_propensity3|Product_propensity4|Support_Number|Amount|Threshold1|
                    000001234|M.|Martin|Peter|0650201020|pmartin@neolane.com|1|A1|A2|A3|A4|E12|120000|100000
    </externalSource>
  </targets>
</delivery>

 

Thanks,

-Jon

Level 4
January 11, 2021

Thanks @jonathon_wodnicki for the reply. I am getting the Promo codes from the database ( we have a logic how we assigning a promo code to a recipient). So in this scenario I just want to insert the promo code into the delivery template when the user sign up so I am trying to see how I can pass that to the delivery. Do you have any sample on how I can use the target data for that? or based on the sample that you provided which I see on JSAPI documentation do I need to jut run a query to pull the promo code and pass that value to the External Target data?