Source: https://www.brixit.io/docs/bayut

# Bayut and dubizzle

Use the **Bayut** integration in Brixit to connect your agency's Profolio account. This shared
connection manages publication to Bayut and dubizzle. Listing access and inbound lead
delivery are separate setup steps.

## Before you start

You need access to **Integrations → Portals** in the correct Brixit workspace, access to your
agency's Profolio account, and a Profolio API token. Confirm the agency or branch you intend
to connect. For testing, use a provider-approved sandbox account.

| Value | Where it comes from | Where to save it in Brixit |
| --- | --- | --- |
| Profolio API token | Your Profolio dashboard | Bayut → Configure credentials |
| Webhook URL | Brixit's inbound lead webhooks panel | Give this URL to Bayut support |
| Push API signing secret | Bayut, after registering your endpoint | Bayut → inbound lead webhooks → Webhook signing secret |

The API token and signing secret serve different purposes. Do not put the API token in the
signing-secret field or generate your own replacement secret for Bayut.

## 1. Connect your Profolio account

1. Sign in to [Profolio](https://www.bayut.com/profolio/signin) and retrieve your API token
   from the dashboard. If API access is unavailable, contact your Bayut account representative.
2. Open **Integrations → Portals** in Brixit.
3. On **Bayut**, select the token setup button or **Configure credentials** if already connected.
4. Enter the token in **API Token** and select **Configure**.
5. Confirm the integration switch is on and **Import listings** is available.

Bayut's [Quickstart Guide](https://developers.bayut.com/quickstart-guide-1680340m0) describes
dashboard token retrieval. Saving the token does not register your inbound webhook.

## 2. Import existing listings

1. On the Bayut integration card, select **Import listings**.
2. Select **Include draft (unpublished) listings** if you want drafts as well.
3. Confirm and wait for the import result. Review imported, failed and skipped counts.
4. Open **Listings** and inspect a newly imported record. Check its reference, price, size,
   photos, location, publication state and assignee. Complete any missing fields before use.
5. Repeat the import if needed. Listings already imported from that account are skipped.

An import is not a refresh of every existing listing. A skipped record has not necessarily
been updated from Profolio. Review individual failures before relying on the imported data.

## 3. Publish to Bayut, dubizzle or both

Open a listing's portal controls and use the **Bayut / dubizzle** card. Complete the required
publication fields, including the Profolio agent and location when prompted.

| Desired result | Destination selection |
| --- | --- |
| Bayut only | Select Bayut |
| dubizzle only | Select dubizzle |
| Both | Select Bayut and dubizzle |
| Remove from Bayut, keep dubizzle | Edit the publication, leave only dubizzle selected, then update |
| Remove from dubizzle, keep Bayut | Edit the publication, leave only Bayut selected, then update |
| Remove from both | Turn off the listing's Bayut / dubizzle publication switch and confirm |

Use **Publish** for the first publication and **Update** when editing its settings. A published
listing must retain at least one destination; use the switch to remove it from all destinations.
After each change, verify the destinations in Profolio. Publication errors can affect one
destination while the other remains active.

If your workspace does not yet show a **Portals** destination selector, ask Brixit support to
confirm availability before attempting a change to only one destination. A single publication
switch cannot express the selection on older versions.

Profolio records a separate state for each destination. Check those states and any validation
messages before assuming a listing is publicly visible. Correct rejected listing fields using
the reason returned by the portal.

## 4. Register inbound leads with Bayut

1. On the Bayut integration card, expand **Bayut / Profolio — inbound lead webhooks**.
2. Copy **Webhook URL (POST)** from your company's Brixit workspace. Each company uses
   its own CRM address. For example, if your CRM is at `https://crm.yourcompany.com`,
   the endpoint would be:

   `https://crm.yourcompany.com/api/v1/app/integrations/webhooks/bayut`

   This is an example only. Use the exact URL shown in your workspace when registering
   with Bayut.

3. Send that endpoint URL to **support@bayut.com** and ask them to register Push API delivery
   for your agency and environment. Confirm which lead channels and portal sources they will
   enable. Do not assume dubizzle delivery is enabled by a Bayut listing connection.
4. Bayut supplies a signing secret after registering the endpoint.
5. Paste that exact value into **Webhook signing secret** in Brixit and select **Save signing
   secret**. Confirm the panel shows that a secret is saved.
6. Ask Bayut to deliver a test lead after the secret has been saved.

Bayut documents this registration process in its
[WhatsApp Push API guide](https://developers.bayut.com/whatsapp-lead-1966083m0).
The URL alone does not complete registration, and a successful listing import does not prove
that leads are enabled.

You can use this request when contacting Bayut:

> Please register Push API lead delivery for our agency [agency name and ID] in [sandbox or
> production]. Our POST endpoint is [paste the URL copied from Brixit]. Please provide the
> endpoint's signing secret through your approved secure channel, confirm the enabled lead
> channels and Bayut/dubizzle sources, and arrange a test delivery once we confirm setup.

Do not include your Profolio API token in that request.

## 5. Set lead assignment rules

Expand **Lead assignment (inbound)** on the same integration card.

- **Brixit listing assignee** uses the assignee of the linked Brixit listing when available.
- **Keep with portal agent** attempts to match the agent on the incoming lead to a CRM user.
- Choose a **Fallback user** for enquiries where Brixit cannot resolve an owner, then select
  **Save assignment rules**. Use an active user in the connected workspace.

These rules belong to this portal integration. Check them separately from the general lead
assignment settings. An imported listing may be unassigned until you assign it in Brixit.

## 6. Verify a real lead from end to end

1. Arrange a test with Bayut using a contact you control and a known listing reference.
2. Find the resulting contact and inquiry in Brixit. Check the customer's name and phone,
   the linked listing, source, message and assignee. An agent's details must not become the
   customer's identity.
3. Ask for a replay of the same lead. Confirm it does not create another inquiry or contact
   for the same external lead ID, or another identical portal timeline note.
4. Test two different customers contacting the same agent. They should remain separate contacts.
5. Test an enquiry without a listing and check fallback assignment.
6. Test the channels Bayut has enabled for your account. Brixit handles the documented
   [call](https://developers.bayut.com/call-lead-1966031m0), WhatsApp and
   [WhatsApp Story](https://developers.bayut.com/whatsapp-story-lead-1966208m0) push formats.

Email, seller and other pull-API lead flows require a separately enabled polling setup.
Polling is disabled by default in Brixit's Bayut configuration; it is not automatically turned
on when you save the token. Ask Brixit support to confirm coverage and history requirements
before relying on it for those channels. Push registration should not be treated as a
historical lead backfill.

## Troubleshooting

| Symptom | What to check |
| --- | --- |
| Imports work, but no leads arrive | Bayut registered the endpoint, enabled the requested sources and sent a test; the signing secret is saved. |
| Bayut reports HTTP 401 | The integration is active and Brixit holds the exact secret issued for that endpoint. Ask Bayut to verify the signature against the original request body. |
| Bayut reports HTTP 422 | Ask support to inspect the payload structure and external lead ID. Share a redacted example and delivery time, without credentials. |
| A delivery succeeds but creates no contact | Check whether it was a verification event, a duplicate, or a lead without customer identity. |
| A lead has the wrong owner | Check the listing assignee, portal-agent matching and fallback user in this integration. |
| Listing published to only one destination | Check the selected destinations and Profolio's individual state and error for each. |
| The token is rejected | Verify the connected agency and current API access; replace the token through Configure credentials. |

For a technical delivery check, Bayut sends **X-Bayut-Signature** as the hexadecimal result
of `md5(secret + raw request body)`. Brixit verifies the original body before accepting the
lead. Use the Bayut-issued secret; users do not need to calculate or paste a signature.
