Sometimes you may want to sell a subscription to a customer who already exists in the system, for example as a recipient of a free subscription or as a recipient of a newsletter. In these cases, you may want to shorten the ordering process by allowing the customer to log in to the form right away, so the ordering process looks like this:
Log in to the form with an existing account.
Complete the purchase of a new subscription.
There are three different solutions you can use to achieve this.
Embedding the order form with login as the start
To avoid the standard process where you first see an empty form, then are asked to log in, and then fill out the form and order, you can start with a page where you are asked to log in right away.$
This is done by sending a flag when the form is embedded:
Iteras.orderingiframe({ profile: "sportsmanden", orderingid: "nytaarstilbud", startwithlogin: true })
This is the simplest solution. It can be used when you just want to send a general email with an ordering link to a group without personal customization. The customer must then enter their email address and password before they are allowed to order the subscription.
Prefilling the email
To make it extra easy for the customer, you can prefill the login box with the customer's email address.
You can configure the form to allow email prefill using a GET parameter and choose a parameter name such as “email”. Once this is done, you can send the email address along with the form, for example:
https://sportsmanden.dk/abonnement/nytaarstilbud/[email protected]
This action will prefill the email field. You can then pass an extra flag when embedding the form to make it automatically redirect to login:
Iteras.orderingiframe({ profile: "sportsmanden", orderingid: "nytaarstilbud", autologinredirect: true })
To use this solution, you must be able to generate personal links to the order form and insert them in the communication with the customer.
Automatic login of the user
This is the most complicated of the three options, but also the smoothest user experience. To use this solution, you need to be well-versed in our API and able to send personalized communications to the customer.
It is possible to embed the order form where the user is automatically logged in. This is done using a preauth token that is sent when the form is embedded:
Iteras.orderingiframe({ profile: "sportsmanden", orderingid: "nytaarstilbud", preauth: "zxcvbn...qwerty" })
For this to happen, you must obtain a preauth token for each customer you send an email to, and it must be available at the time of sending. These tokens expire for security reasons, but you can determine how long they are valid. To have a token available at the time of sending, you must fetch the preauth token via the API and insert it into the communication you send to the customer.