Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


What is a Magic Link?

A Magic Link or secure login link is a unique link a customer will receive via email that will allow them to log in without entering a password.

The link and email can be generated one of two ways:

  • An API call to the magic link service

  • Clicking a button on the WordPress site, which generates a secure login link.

You can also link it to other actions such as a password reset. Once the user clicks on the Magic Link in their email and is logged in, the user can be displayed a prompt to reset their password.


How is it used?

Below are a few use cases in which your business might utilize a Magic Link.

Use Case - Website Activity

Description

Allow customers secure access to paid content

If a customer reaches the login page and can’t remember their login information, they can be presented with the option to be sent a secure login link aka a Magic Link. This link is sent to the customers email address on file. When the customer clicks on the link, they will have access to all of their purchased content for a certain period of time.

Allow customers to reset their password

Similar to the use case above, If a customer reaches the login page and can’t remember their login infomation, they can be presented with the option to reset their password. By selecting this option, the customer will be emailed a secure login link aka Magic Link. When the customer clicks on the link, they will be automatically logged in, but they will also be prompted to reset their password.

Use Case - Transactional Activity

Description

Secure access to paid content/articles via email alerts

If a customer receives email alerts for a publications they have paid for, that email alert could contain a link to a specific article. By clicking on that link, the customer will automatically be logged in and redirected to that article.

Allow new customers temporary access to new orders

When a customer places a new order (whether a subscription, product, or AMB item) they will receive a confirmation email with a temporary access link. This access is temporary because the purchase has not yet reached Advantage/finished processing.

Allow existing customers access to new orders

Existing customers can use a link sent via a confirmation email to get access to newly purchased content that has not yet been processed in system. Once the purchase is fully processed, the customer will have access to this content using their standard login credentials.


Website Activity

Website activity covers two main scenarios. Your website might offer two options when a customer forgets their password: Reset Password and Send Secure Login Link.

If a customer reaches the login page and can’t remember their login information, they can be presented with the option to reset their password. By selecting this option, the customer will be emailed a secure login link aka Magic Link. When the customer clicks on the link, they will be automatically logged in, but they will also be prompted to reset their password.

Similar to the above scenario, if a customer selects the option to be sent a secure login link aka a Magic Link, they will be emailed a secure link. When the customer clicks on the link, they will have access to all of their purchased content.




  1. Enable the forgot password functionality and customize the language and variables in WordPress

  2. Create a template in Blueshift

  3. Create an Event Triggered campaign in Blueshift


What does this do?

Enabling the forgot password functionality will allow you to customize the language and variables needed to send emails from Blueshift and display notifications on your website. Once enabling and saving, an event will be pushed Blueshift which will be referenced in event triggered campaigns.

  1. Navigate to Middleware 2 in the left menu and click on the Settings tab

  2. Locate the option Enable Secure Login/Magic Link For Password Reset and select On to enable. This will make the secure login link appear on your website

  3. Scroll down and locate the Emails section.

  4. Turn HTML Emails On and select Blueshift next to Send Email Through

  5. Navigate to the Language Variables tab under Middleware 2. Customize the language for each of the variables.

These variables are used for both, forgot password and secure login requests from your website, so be sure to update all that will be used.

6. Next, create a template in Blueshift.


  1. In Blueshift, create the email template by navigating to Creatives>Email

  2. Click on + Template and select HTML Editor

  3. Code and customize your template however you wish. For the body, however, you will need to enter the following.

{{html_body}}

This will use the event that has been pushed to Blueshift to insert the correct language variable and secure login link into your email based on the request coming from your website.

4. Next, create the campaign.


  1. In Blueshift, navigate to campaigns

  2. Click + Campaign and select Event Triggered

  3. In the When Event Occurs field, select the event forgot_password

  4. Attach the template created in the previous step

  5. Once the campaign is scheduled and running, you’re good to go!


Transactional Activity

These scenarios will use endpoints and external fetches in Blueshift to allow you to send a variety of magic link functions.



  1. Enable the secure link (Magic Link) functionality on your website

  2. Set Up External Fetch for Secure Link Login

  3. Set up the Blueshift template


What does this do?

Enabling the secure login/forgot password functionality will allow you to customize the language and variables needed to send emails from Blueshift and display notifications on your website.

  1. Navigate to Middleware 2 in the left menu and click on the Settings tab

  2. Locate the Emails section.

  3. Turn HTML Emails On and select Blueshift next to Send Email Through

  4. Navigate to the Language Variables tab under Middleware 2. Customize the language for each of the variables.

These variables are used for both, forgot password and secure login requests from your website, so be sure to update all that will be used.

6. Next, set up an External Fetch in Blueshift.


What does this do?

The external fetch for the secure login link is going to use Middleware to return the customer number and limit access to active purchases the customer has made. This allows the customer to have access to the correct content once clicking on the secure login link.

  1. In Blueshift, expand the Creatives menu and select External Fetches

  2. Create a new external fetch and complete the following fields:

Alias

Enter the name of the external fetch

HTTP Method

POST

URL (Endpoint)

Use Case

Click on the links below for Swagger documentations and more info on endpoints.

Endpoint

You must be using using version 1.27 of the WordPress plugin in order for these endpoints to work properly.

 

Grant access by email address

 https://magiclink.14west.io/magiclink/access/email

Grant access by customer number

https://magiclink.14west.io/magiclink/access//access/customernumber

Grant temporary access by email

https://magiclink.14west.io/magiclink/access/temp/email

Grant temporary access by customer number

https://magiclink.14west.io/magiclink/access/temp/customernumber

Create password reset link

https://magiclink.14west.io/magiclink/access/reset/password/email

Create user password

https://magiclink.14west.io/magiclink/access/create/password/email

You might already be using the endpoint below. This is a generic endpoint that covers all functionality. It is ok to keep using this endpoint if you are already, but we suggest using one of the endpoints above going forward.

https://magic-link-magic-link-prd.apps.prd-3.aws.ocp.14west.io/middleware/data/magiclinkbycustomernumber

Body

Use the Request Body from the Swagger docs above to create the body of the external fetch.

Be sure to update the appropriate values.

Example:

{
  "id": "example@yourcustomer.com",
  "returnUrl": "https://www.yourwebsite.com",
  "validForHours": 72,
  "a": "two_day_old_content"
}


  1. In Blueshift, create a new HTML template

  2. Navigate to the Data tab and expand External Fetch and enter the one that was created in the last step. This will be listed under the alias name.

3. Next, you will need to add the external fetch to the content of your email via a link.

4. Navigate to the content tab. Add and edit one of the following links:

 Secure Login Link
<a href="https://mywordpressite.com/?sk={{external_fetch.aliasname.Payload.link}} ">Link display text</a>

The following will need to be updated/replaced in the link:

https://mywordpresssite.com

This needs to be replace with the website URL to the site which the customer will gain access.

aliasname

Replaced with the external fetch.

Example

<a href="https://supercoolfinancial.com/?sk={{external_fetch.magiclinkbycustomernumber.Payload.link}} ">Click Here to Login</a>

 Secure Login Link with Redirect
<a href="https://mywordpressite.com/?sk={{external_fetch.aliasname.Payload.link}}&skoverride=https://mywordpressite.com/specific_arcticle">Access This Content</a>

The following will need to be updated/replaced in the link:

https://mywordpresssite.com

This needs to be replace with the website URL to the site which the customer will gain access.

aliasname

Replaced with the external fetch.

https://mywordpressite.com/specific_arcticle

Replace with the link that will be used as the redirect.

Example

<a href="https://supercoolfinancial.com/?sk={{external_fetch.magiclinkbycustomernumber.Payload.link}}&skoverride=https://supercoolfinancial.com/may2021_arcticle">Click here to access your May 2021 article.</a>


Still need help?

We know this can be frustrating. To get further help please open a Support ticket.

Click here to open a ticket


 This related FAQ question should be directly related to this article content?

 This related FAQ question should be directly related to this article content?



Get started!

Get started!


Cannot find the article you’re looking for?

Suggest a new article here!

  • No labels