User Migration

User Migration

For the following flows, the following defined Actors have been used

Server - Expressly API Server.

Advertiser - The advertisers website (or app) Expressly is being configured with.

Customer - The customer interacting with the store using their browser.




User campaign migration

Preconditions

A campaign has been created and is active.

Flow

1. Customer navigates to provided link with unique uuid attached (Show Popup).

2.  requests popup for unique uuid (Get Campaign Migration Popup).

3. Server returns popup html rendered for the given campaign, and customer.

4. Advertiser renders html atop a given store page - for example, the homepage.

5. Customer accepts terms & conditions, and privacy policy by pressing "OK". This starts the data migration.

6. Customer navigates to (Migrate User).

7. Advertiser requests customer information from server

8. Server returns information associated with customer.

9. Advertiser adds customer to their store; adds product, and coupon (if provided, and supported) to cart.

10. Advertiser logs user in.

11. Advertiser redirects customer to server migration success url  (Migration Success).

12. Server redirects customer to the campaign success landing page.

Alternate Flow 1 -  User exists

9.1. Advertiser adds product, and coupon to the cart - if provided, and supported.

10.1. Advertiser shows customer message that they already exist, asking if they would like to be redirected to the login page.

11.1. Customer accepts confirm message, and is redirected to the advertiser login page.

Alternate Flow 2 - Error fetching or creating customer

9.2. Advertiser redirects customer to server migration cancelled url  (Migration Cancelled).

10.2. Server redirects customer to the campaign declined landing page.




Check purchases

Flow

1. Server makes a request to advertiser endpoint (Invoices for Customer Purchases).

2. Advertiser compares emails, and period to gather purchase information for provided email addresses.

3. Advertiser returns compiled data to server.




Check customer migration

Flow

1. Server makes a request to store endpoint (Customers on Store).

2. Advertiser compares emails to determine whether an emails has been migrated to the advertiser.

3. Advertiser returns compiled data to the server.

API Integration

API Integration

The following defined Actors have been used

Server - Expressly API Server.

Advertiser - The advertisers website (or app) Expressly is being configured with.

Customer - The customer interacting with the advertiser using their browser


Migration API

Customer Consent Lightbox Dialog

Before a customer's data can be migrated to your store, the customer must consent. You must include the JavaScript file below in the footer of your site which is used to detect if the trigger parameter is in the url and display a customised dialog asking for their consent. Otherwise it remains dormant.

The JavaScript may be placed only on the landing pages for your campaigns or you may place it globally across your site.

If the customer consents to have their data migrated to your store then they will eventually be redirected to the "Migrate User" endpoint on your servers at /expressly/api/{uuid}/migrate. At which point you may proceed with fetching the customer data and registering them on your store and populating their basket.

<script type='text/javascript' src='https://assets01.buyexpressly.com/lightbox/trigger-v2.min.js'></script>




Migrate user

This endpoint is called by the customer's browser, once and only if they have consented to passing their information to your store. When this endpoint is triggered you should take the following actions:

  • Fetch the customer data from the Expressly server using the "Get Campaign Migration Data" endpoint
  • Add / register the customer to you store (you will have to create a random temporary password for them)
  • Send a welcome e-mail, ideally with the password or password reset link
  • If supplied add the product to their cart
  • If supplied apply the coupon / voucher code to their cart
  • Sign the customer in
  • Redirect to the customer's browser to https://prod.expresslyapp.com/api/redirect/migration/{uuid}/success

If the user's already has an account then you should redirect the customer's browser to https://prod.expresslyapp.com/api/redirect/migration/{uuid}/exists?loginUrl={url-encoded-absolute-url-of-login-page}

If for whatever reason the migration attempt fails you should redirect the customer's browser to https://prod.expresslyapp.com/api/redirect/migration/{uuid}/failed

Show Details




Get campaign migration data

This endpoint is to be used by your server to fetch the customer's data from within a "Migrate User" call.

Show Details


Auditing API

Token check

Simple response message to check that the API key / token has been configured correctly including information about the installation. The endpoint as with all the authenticated endpoints should return a 401 if the token part of the Authorization header does not match the stored token.

Show Details




Invoices for customer purchases/COMPLETED ACTIONS

Given a list of date ranges and emails checks to see if the associated campaign users have had any transactions during the specified period. Used for auditing and tracking purposes.

Show Details




Customers on advertiser

Given a list of emails, checks to see if a user already exists on the advertiser or has completed the migration process successfully. Used for auditing and tracking purposes.

Show Details