This article will help you implement our Brizy AI builder into your flow.
API Explorer: https://[your-white-label-ai-builder-domain]/api/doc#/default (to access the correct link please replace [your-white-label-ai-builder-domain] with the domain you gave us in the on-boarding process for your AI White Label setup).
Important: Please note that [your-white-label-ai-builder-domain] for the API explorer is different from your [your-white-label-dashboard-domain].
Here is how it works:
- We'll need your website / platform Login URL. Our colleagues will ask you about it in the White Label onboarding process. For example: https://example.com/signin
- When a user clicks the login button in AI Builder, we will redirect them to your Login URL with the PROJECT ID as a query parameter https://example.com/signin?project_uid=xyz
- You can read the PROJECT ID and authorize via SSO (before authorization this PROJECT ID is an anonymous client and not attached to anything)
--------
Follow these steps to implement our AI builder on your side:
Step 1. Choose an integration option below (Option 1 or Option 2) to generate an AI project. This will return a PROJECT ID.
Step 2. Authorize the PROJECT ID inside Brizy Cloud
Option 1. Access the entire AI builder solution remotely from Brizy
This option is the easiest to integrate and requires the least amount of effort on your part. Your clients will access our AI builder solution remotely on a white label landing page (branded with your logo and your custom domain). This will return the PROJECT ID that needs to be authorized in Brizy Cloud.
Option 2. Build the AI form on your side and send the info to our AI
This solution requires you to build the AI form on your end. It gives you the flexibility to implement the steps the way you want and design/style the form the way you want. Once you get the info required you send it to our AI endpoint for the AI generation. This will return the PROJECT ID that needs to be authorized in Brizy Cloud.
Generate a company name by prompt
This "prompt" will be used by the AI to generate industry suggestions in the Industry step.
Create a project
Use the `prompt` and `company` name from the previous request.
The response is an anonymous PROJECT ID that you can use as a template.
Open your anonymous project
https://[your-white-label-ai-builder-domain]/project/view/{Project.id}
You can read the PROJECT ID and authorize via SSO (before authorization this PROJECT ID is an anonymous client and not attached to anything)
You also have the option to use the custom_query_params
query parameter. Its value should be a base64-encoded string containing the data you want to include. You can provide this query parameter to any of the AI pages. On redirect to the login page
, we will include the same custom_query_params
query parameter
Authorize your PROJECT ID in Brizy Cloud
<?php
use App\Multipass;
require ('Multipass.php');
const PUBLIC_PARTNER_ID = YOUR_CLIENT_ID;
const SECRET_KEY = YOUR_SECRET;
// Your customer email from the session
function getCustomerEmail()
{
return 'client@example.cloud';
}
function getToken()
{
date_default_timezone_set("UTC");
return (new Multipass(SECRET_KEY))->encode([
'created_at' => (new \DateTime())->format(\DateTime::ISO8601),
'email' => getCustomerEmail(),
project_uid: {Project.id}
builder_type: 'ai'
workspace_id: {Workspace.id}
]);
}
$redirect_url = 'https://YOUR_WL_DASHBOARD_DOMAIN/multipass/' . PUBLIC_PARTNER_ID . '?token=' . getToken();
header("Location: $redirect_url");
exit;
From this point you'll be using the regular SSO integration flow detailed in this article: https://support.brizy.io/hc/en-us/articles/12697323192338-Single-SignOn-SSO