Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

trigger transaction email from Subscription WebApp

Avatar

Level 4

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

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

0 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 4

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?

Avatar

Level 4
I was able to use the leverage the JSAPi and call the rtEvent to send a transaction email from the webAPP. I am also facing an issue querying the Schema from the webapp but that is different story. as far as email triggering and passing promo code I manage that via JS Api.