Send your users to the OB journey

This section covers the different ways to access Transaction Data and the different use cases associated

Introduction

There are two ways of accessing Transaction Data :

  • One-time access
  • Permanent access

Algoan's concept of users is linked to customIdentifier : an Algoan customer object is uniquely defined by a customIdentifier, in the scope of a project.

One-time access users can only access Transaction Data once. If they exit the journey, they cannot come back again or an error will be thrown :

Image 1 - One-time user description

Image 1 - One-time user description

Permanent access users can access Transaction Data journey multiple times :

Image 2 - Permanent user description

Image 2 - Permanent user description

Option 1 : One-time access

To redirect a user to the Transaction Data journey, you need at least a clientId and a redirect address.

The link format is as follows:

https://connect.algoan.com/v2/init?client_id=clientId&redirect_uri=myRedirectUri

When accessing Transaction Data this way, a customer and its associated customIdentifier are automatically generated.

If you don't want the customIdentifier to be automatically generated, you can specify it as a query parameter of the previous URL:

https://connect.algoan.com/v2/init?client_id=clientId&redirect_uri=myRedirectUri&custom_identifier=customIdentifier

When transitioning to a production environment, it is imperative to include the query parameter custom_identifier. This identifier serves the purpose of associating customers with their corresponding analyses based on your internal references. This identifier is the unique way of effectively mapping users to their analyses.

Option 2 : Permanent access

In both scenarios above, the customer is automatically generated when clicking the link.

An alternative approach is to create the customer and an associated session manually. This involves a two-step process:

  1. Customer creation: Initiate the customer creation by calling the POST /register route. You will need to provide the custom_identifier here.
  2. Session creation: Follow up with session creation using the POST /sessions route.

You only need to create the customer once. If you have saved the customerId in your database, you can directly generate a new session for the user without needing to reengage with the customer creation process.

Here is the form of the Aggregation Link : https://connect.algoan.com/v2/init?client_id=your_client_id&redirect_uri=your_redirect_uri&session_id=your_session_id&code=your_temporary_code

Here is the sequence diagram explaining the authentification of a user in Permanent User mode :

Image 3 - Sequence diagram of the authentication of user

Image 3 - Sequence diagram of the authentication of user

Client Id

In the link there a client_id parameter. To find the value of this parameter, go to "Aggregation" tab then "Credentials". You can directly copy it from there.

Image 4 - Client ID inside Algoan's Console

Image 4 - Client ID inside Algoan's Console

Redirection URI

Trying to send your users to an Aggregation link with a redirect_uri that has not been whitelisted by yourself in the Console will result in an error

The first time you go the Aggregation tab on the Console, you will have to define a redirect URI (see image 4 below).

To add an authorized redirect URI, go to “Aggregation” tab and click on “add redirect URI”.

Image 5 - Aggregation tab when no redirect URI has been defined

Image 5 - Aggregation tab when no redirect URI has been defined

You can add a wildcard in your redirect_uri. For instance you can define the following redirect URI https://mywebsite.com/* . Now when you build the link, all the following redirect_uri will work :

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated