-
Notifications
You must be signed in to change notification settings - Fork 13
Triggered Emails
You're currently viewing XMPL V3
Attention: XMPL V5 beta is now available!
You can have the XMPie system send emails as a response to events that occur on your XMPL webpage. For example, when a person submits a registration form you can trigger an email that will be sent to your site administrator; or you can send a thank you email when someone submits a refer-a-friend form, to thank them for recommending the site to their friend.
To trigger an email to be sent as a result of success in submitting a form, you would use a xmp-success-trigger
attribute on your XMPL form element (be it xmp-refer
,xmp-update
or xmp-register
form). The same attribute can be placed on your ng-controller
element, to send an email on success of loading a page. Use the xmp-clicked-trigger
attribute on any clickable HTML element, to send an email when the element is clicked.
The following sections explain the attribute values and setup.
To set up the sending of emails, you must create email touchpoints in your Circle projects. The email touchpoints define email templates that will be sent when triggered. You will use their IDs in the webpage to trigger the sending of personalized emails based on them.
Use either of the following email attributes, depending on when you wish to trigger an email to be sent:
- Add
xmp-clicked-trigger
to an element that when clicked, an email will be sent. The attribute should be set to the email touchpoint that will be triggered. For example:
<button xmp-clicked-trigger="E2">I Like! </button>
- Add
xmp-success-trigger
to either a form element that has thexmp-update
,xmp-refer
orxmp-register
attribute, to trigger an email when the form submit is successfully finished, or to an element withng-controller
of eitherXMPAnonymousPage
orXMPPersonalizedPage
, to trigger one or more emails to be sent when the page is successfully loaded. For example:
<form xmp-update>
Email: <input type="text" xmp-write-ador="xmp.r.Email"><br/>
<input class="btn-primary" type="submit"
value="Update" xmp-tracking-action="form submitted"
xmp-success-trigger="E1,E2">
</form>
The value of the attribute should be either one of the following:
- A single ID of a touchpoint, for example "E1". This will cause the email identified by this touchpoint ID to be sent.
- A comma separated list of touchpoint IDs, for example "E1,E2". This will cause the all emails with the IDs to be sent.
- The ID or IDs can be not of touchpoints, but rather of email configurations, which are defined by xmp-email elements. We will discuss this later.
You're currently viewing XMPL V3. Alternatively, go to XMPL V5 beta.
New!! Take a look at XMPL V5 Beta