Skip to main content
Mega ERP, by Senior, is where many developers run their finances and their receivables portfolio. Once you connect Mega, you ask in plain language (“what is due this week?”, “how overdue is this contract?”) and Morada OS queries Mega with your login and answers in the chat. Morada OS only reads Mega. No query changes, settles or creates anything in the system.

What you can ask

Accounts payable

What is due in a period, how much is still owed to a supplier, split by branch, supplier, document type or due date. Open or already settled bills. The total and the open balance come first.

Ledger balances

The balance per account, month by month, for one or more branches (up to 10 per query).

Receivables portfolio

The projects, the contracts in each one, a contract’s installments and how overdue they are, renegotiations, refinancings, cancellations and the recorded events (settlements and adjustments).

A customer by CPF or CNPJ

The customer’s contracts, the total owed and the next due date.
Examples to start with:
Want better results? Read How to ask well: a three-minute read that improves every request you make.

Before you connect: what the Mega administrator enables

In Mega, having access on screen is not enough to connect. Your company’s Mega administrator enables each person, one by one, and shares the company code. These are two steps, done once.
1

Tick Usuário de APIs on the person's record

In Mega, the administrator opens Configurações Globais → Segurança → Grupos e usuários (Global settings → Security → Groups and users), picks the person’s user and ticks Usuário de APIs (API user). Without it, Mega refuses the connection, even for someone who uses the system every day.
2

Share the company's Mega Registro

The Mega Registro is your company’s code in Mega, 36 characters long, in the format 3f2504e0-4f89-41d3-9a0c-0305e82c3301. The administrator finds it under Configurações Globais → Registrar Sistema (Register system) and passes it to whoever will connect. The code is the same for everyone in the company.
The right login is the Mega ERP one, the system the team uses every day. The Mega Portal de Clientes (customer portal, where buyers see their bills and contracts) has a different login, and it cannot be used to connect.
Both steps, with Senior’s own screenshots, are in the Mega Cloud API guide.
One login per person, never a shared login. Mega keeps a single active connection per login. If two people connect the same login, one knocks the other out, and the error “the Mega session expired or was closed by another access” comes and goes with no apparent reason. The same applies to a robot or another integration that already uses that login.

What each person sees

Morada OS sees what the person’s login sees in Mega, never more. If the login has no access to a module (accounting, for example), queries on that module are refused and Morada OS says so in the chat. The Mega administrator is the one who widens access, on the user’s record. What your company has contracted also counts: a module your company does not have in Mega does not show up in the answers.

How to connect

1

Open Mega in Connectors

In the Morada OS side menu, click Conectores (Connectors), search for Mega and click Conectar (Connect).Mega card on the connectors page, with the Connect button
2

Fill in the three fields

  • Mega Registro: the 36-character code the administrator shared.
  • Usuário (User): the user you log in to Mega with.
  • Senha (Password): that user’s password.
Click Conectar. Morada OS checks the details with Mega right away.Mega connection form with the Mega Registro, Usuário and Senha fields
3

Ready to ask

Mega moves to Conectados por você (Connected by you). Open a chat and ask.
On the same connector page, the O que Morada OS pode ler (What Morada OS can read) list shows Mega’s 10 queries. All of them start as Sempre permitir (Always allow), because none of them changes Mega. If you prefer to confirm each query in the chat, switch the label to Perguntar antes (Ask first).

Usage cautions

Mega does not split answers into pages: it returns everything at once. When a query gets too large, Morada OS asks for a narrower cut, such as a shorter period, a branch or a project. On very long lists, the answer brings the totals and asks for a filter before listing item by item. Start with the cut and the answer comes faster.
A document whose check digits do not match is refused before it reaches Mega, because Mega answers an invalid document with other people’s contracts. Check the number and ask again.
TREINAMENTO is Mega’s test data, so it is left out of lists and totals. If you need it, ask to include it.
Accounting entries usually arrive after the financial ones. Morada OS tells you how far each branch has entries, so you know whether the balance is closed.
Use customers’ CPF and CNPJ in the chat only to find the contract in Mega. Do not copy them out of Morada OS or into conversations with people who do not need them.

Limitations

  • No link to Mega. Mega does not offer a link that opens a record, so Morada OS gives you the contract or bill number to look up in Mega.
  • Read-only. Morada OS does not settle bills, renegotiate or change records in Mega.
  • Only what is on the list. Morada OS queries accounts payable, ledger balances and the receivables portfolio. Other Mega modules (such as receivables outside the portfolio, inventory or payroll) are not in the connector.
  • Mega slowness. When Mega takes too long to answer, the query stops and Morada OS asks you to try again in a moment. The same happens when Mega limits the number of queries.

Common problems

  1. Check the user and password by logging in to Mega’s own login screen.
  2. Check that the Mega Registro has all 36 characters, hyphens included.
  3. Confirm with the Mega administrator that your user has Usuário de APIs ticked.
Then, in Conectores → Mega, connect again with the current details.
Your Mega login has no access to that module. Ask the Mega administrator to enable the module on your user.
Another person, robot or integration connected with the same login. Each person needs their own Mega login. See the warning in Before you connect.

How to disconnect

In Conectores, open Mega and click Desvincular (Unlink). Morada OS deletes the stored user and password and stops querying Mega right away. To cut access on the Mega side too, the administrator unticks Usuário de APIs on the person’s record.