--> Maileon - Transactions - An Interactive Walkthrough

Introduction

Welcome to the interactive transaction tutorial.
This tutorial is for technical and non technical people who want to get an understanding how transaction mails, like order confirmations or invoices, work. It will guide you through all steps and explains all components that are required to get data from your system into a trigger mailing that is instantly sent by Maileon. This includes questions like "Where do I get an API key?", "What is a transaction type?" or "How do I decide which mail to trigger?".

...

The tutorial is realized as a workflow that requires to execute the steps in a given order, e.g. as an API key is mandatory, you cannot start with the second step without providing a valid API key in the first step.

The tutorial will use the information sign to hide details in order to avoid overloading the regular text with too much information. If more information is available, the following icon will appear and you can click on it:

API Credentials

In order to submit a transaction to Maileon, you first need a valid API-Key. A valid API-Key has the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX, click here for more information about API keys:

If you enter an API key in the field below, you agree, that this key is used for the purpose of demonstrating how to handle transaction types, including creation of transaction types and triggering transactions to emails specified by you in the last step.

Transaction Type

To submit transactional data to Maileon, you need to have a valid "transaction type". A transaction type is the data model describing all attributes of the data you wish to submit, e.g. if you are planning to submit an order confirmation, the transaction type will contain an attribute for the list of items, one for the overall price, maybe some attributes describing the shipping address, etc. This information is required for two purposes:

  1. When you create a trigger mailing that should be sent after receiving your transaction, Maileon needs to know which attributes are available, so the designer of the mail can insert the correct attribute names.
  2. You can set attributes to be mandatory or optional. When submitting transactions via API, Maileon will check if all mandatory attributes are filled properly.
In this step, this script will check, if a suitable transaction type is already registered in your account. If it is found, you will see its ID below, if not, you will be asked to let the script create the type for you.

There are two ways of creating a transaction type:
  1. Using the UI (select 'Lists & Contacts' and then 'Contact Events')
  2. Using the API
. In order to demonstrate the process, this script can create a transaction type using the API if you click the button below.
• For more information about transaction types, click here:
• For more information about the PHP code that can create a transaction type, click here:

Transaction Data

In this step, you will send transactional data in the form of an order confirmation event to Maileon. Remember, the data attributes have only been chosen for this example is not fixed and you can specify the attributes as you need them. An order confirmation does not need to contain the exact attributes shown in this example.


Additional information:

  • Transactional data itself will be collected in Maileon but, by default, it does not trigger a mail. If you are interested in triggering a mail, e.g. a mail listing the ordered items, you will need to create a "trigger mailing", see here for details:
  • For more information about the PHP code that can create a transaction, click here:

 
  • If the contact does not exist, this code will automatically create an empty contact, filled with the email, only. If not existing before, the permission will be set to NONE as this is not a newsletter subscriber.
  • If you need more data being set to the contact object permanently, please use the apropriate methods for creating a contact, first.
  • If you want to send transaction mails, like order confirmations or invoices, also to contacts without permission, make sure to set the "permission neutral" option in the last step (dispatch options) of the mailing setup.
Hint: the transaction event itself will be recorded in any case.
 
 

Complete

You have successfully completed all steps and if you created a trigger mailing, the mail should now be delivered as shown in the next screenshot:

...

If you are interested in more information about the process and how to check the result, see the following explanations:

  • In your Maileon account, you can check if a transaction event is received, for more information, see:
  • The JSON data that has been sent to Maileon can be viewed inside Maileon, see:
  • You can also check if a mail has been sent, see: