> For the complete documentation index, see [llms.txt](https://docs.transactionlink.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.transactionlink.io/docs/v1/integration-quick-guide/link-flow.md).

# Link Flow

Link is a preconfigured and hosted widget with workflow that enables your customers to effortlessly complete a onboarding process within a matter of minutes by utilizing the provided link.

## Flow Overview

{% @mermaid/diagram content="sequenceDiagram
participant Customer
participant Web App
participant Auth
participant Cases
participant Case Links
Customer ->> Web App: Start Onboarding
activate Web App
Web App ->> Auth: POST /auth/authorize<br/>Request: {key, secret}<br/>Host: api.transactionlink.io
activate Auth
Auth -->> Web App: 200 OK {accessToken, refreshToken}
deactivate Auth
Web App ->> Cases: POST /cases<br/>Authorization: Bearer {accessToken} <br/>Payload: {firstName, lastName, companyNumber, ...}<br/>Host: api.transactionlink.io
activate Cases
Cases -->> Web App: 201 Case Created {caseId}
deactivate Cases
Web App ->> Case Links: POST /link<br/>Authorization: Bearer {accessToken} <br/>Payload: {caseId, workflowDefinitionId}<br/>Host: api.transactionlink.io
activate Case Links
Case Links -->> Web App: 201 Link Created {link}
deactivate Case Links
Web App -->> Customer: Open Link
deactivate Web App" %}

***

## Steps

### Create Case

The initial step is to create a case, which represents an individual who will go through the workflow.

During case creation, you can provide additional data such as first name, last name, number, or company name. These details can be utilized when executing tasks in the workflow. This step must be carried out on your backend server.&#x20;

{% hint style="info" %}
Please ensure that you create a Case for every new end user, as it acts as their representation within the system. For returning users, you can utilize the previously created Case to streamline the process.
{% endhint %}

{% openapi src="/files/1Rs8dYYlBIj4v4fTgVo6" path="/cases" method="post" %}
[new\_openapi.yaml](https://content.gitbook.com/content/1Xg0vxunGGwv17NKWL80/blobs/5NXyNGNpiiwZCTc1mij0/new_openapi.yaml)
{% endopenapi %}

### Generate Link

A Link is generated to initiate the onboarding workflow for the individual represented by a case. To generate the link, both a Case and a Workflow Definition are necessary. This process must be carried out on your backend server. This step must be carried out on your backend server.&#x20;

{% openapi src="/files/1Rs8dYYlBIj4v4fTgVo6" path="/link" method="post" %}
[new\_openapi.yaml](https://content.gitbook.com/content/1Xg0vxunGGwv17NKWL80/blobs/5NXyNGNpiiwZCTc1mij0/new_openapi.yaml)
{% endopenapi %}
