Skip to content
P4 Software P4 Software / cifraHQ

Add these docs to Claude

Ask Claude questions about these docs. Claude reads the published pages and links you back to them. Copy this address:

https://p4-software.opendocs.page/mcp

In claude.ai or Claude Desktop: open Settings, then Connectors, choose Add custom connector and paste the address.

In Claude Code, run:

claude mcp add --transport http docs https://p4-software.opendocs.page/mcp

Duplicate Customers and Merging

Duplicate Customers and Merging Customers

Roles required: any user sees the possible matches when creating a customer and can open them. Creating a customer with a RUC that is already in use, confirming a repeated Tax ID, merging Customers and the Possible duplicates page are for administrators only. Regulatory references: none.

Overview

When the same company exists as two Customers, each one has its own balance, Invoices and payments, and nobody sees the full picture. CifraHQ helps in three ways:

  1. It shows you the Customers that may be the same company while you create a new one, as you type the name or an optional RUC, so you can open the existing customer instead.
  2. It stops a Tax ID from being used a second time unless an administrator confirms that it really is a separate account.
  3. It lets an administrator merge two Customers into one, and gives administrators a Possible duplicates page to clean up duplicates that already exist.

Navigation

  • Customer list: Master Data > Sales > Customers.
  • Possible duplicates page: on the customer list, open the Action menu and choose Possible duplicates (administrators only).
  • Merge: open a customer, then Actions > Merge another customer into this one (administrators only).

Key Concepts

  • Tax ID - the customer's government tax identifier, the RUC in Panama. Two Tax IDs count as the same when they match after ignoring capital letters, spaces, dashes and other punctuation. A blank Tax ID, or the word NULL, never matches anything. End consumer and foreign business Customers have their Tax ID cleared by CifraHQ, so they never match either.
  • Customer that stays - the customer you keep. It keeps its own code, name, terms and settings.
  • Customer that is folded in (the duplicate) - the customer that is merged away. Its records move to the customer that stays and it disappears from your lists.
  • Merged customer - a customer that was folded into another one. It stays on file, read-only.

Possible matches when you create a customer

Possible matches appear in the New window on the customer list and in the New Customer window on the Quotes list. Both windows work the same way.

  1. Type the Company Name. If you know it, also type the RUC. The RUC is optional; leave it blank if you do not have it.
  2. After a short pause (the name needs at least 3 letters), a panel titled This customer may already exist appears under the boxes. Each row shows the customer's code, name and Tax ID, with an Open button.
  3. If it is the same company, click Open. The New window closes and the existing customer opens in the same tab. What you typed in the New window is not saved.
  4. If it is really a different company, click Create anyway.

What the panel shows:

  • At most 5 Customers, the closest first. When there are more, a line says how many more are not shown; type more of the name or the RUC to narrow the list.
  • A customer with the same RUC comes first and is marked Same RUC. A RUC is compared ignoring capital letters, spaces, dashes and other punctuation.
  • Names are compared ignoring capital letters, accents, punctuation and company endings such as S.A., Inc, Corp, R.L. or Ltd. A customer is listed when it has the same name, when one name starts with the other, when it contains every important word you typed (Kraken finds Cerveceria Kraken), or when a long word has one typing slip (Cannon finds Canon).
  • Common words such as Panama, Comercial or Servicios are not enough on their own, so an ordinary new company name should show nothing.
  • Two Customers with different RUCs are never listed as a name match.
  • If the name you typed belonged to a customer that was merged into another one, the row shows the customer it was merged into, with a line Merged from and the old code and name. Open goes to that customer.

The button:

  • With nothing in the panel, the button reads Create and creates the customer.
  • With matches in the panel, the button reads Create anyway. It is not highlighted, and pressing Enter does not press it, so a second customer is never created by accident.
  • If you press the button before the panel has had time to appear, nothing is created yet. If matches turn up, the panel shows them and you press Create anyway on purpose. If none turn up, the customer is created on that same press.
  • If CifraHQ cannot look for matches (for example the connection drops), the customer is created as usual. The panel is advice and never stops your work.

The RUC rule when you create a customer

The RUC you type is saved on the new customer. A RUC that another customer already has follows the same rule as on the customer page:

  • A regular user cannot create the customer. CifraHQ names the existing customer and says to ask an administrator if a second account is really needed. The window stays open with what you typed.
  • An administrator who clicks Create anyway while the Same RUC row is on screen confirms that this is a separate account for the same company, and the customer is created.
  • A similar name alone never blocks anyone. Only a RUC that is already in use does.
  • A RUC that belongs only to a customer that was merged into another one is still shown, so you can open the customer that remains, but it does not stop you from creating the customer.

When the Tax ID is already used

The check runs when the customer is saved, which on the customer page happens a moment after you type or change the Tax ID, and only when the Tax ID is different from the one already saved. Saving other fields on a customer that already shares a Tax ID does not ask again.

If you are not an administrator, nothing is saved. The window This tax ID is already in use names the existing customer, with a link to open it, and tells you to ask an administrator if a second account is really needed. Click Close; the previous Tax ID is put back.

If you are an administrator, nothing is saved yet either. The window Is this a separate account? names the existing customer and asks whether this really is a separate account for the same company.

  • Click Yes, save this tax ID to save it. The two Customers are marked as reviewed, so they do not appear on the Possible duplicates page.
  • Click Cancel (or close the window) and the previous Tax ID is put back.

The same rule applies to the Excel import: a row whose Tax ID already belongs to another customer is not loaded. It is listed in the import's issues with the message Tax ID already used by ... . An administrator creates those few Customers by hand on the customer page. A row whose Tax ID has not changed is not checked, so importing your existing Customers again does not reject them. A row for a customer that was merged into another one is also refused.

Merge two Customers (administrators)

A merge cannot be undone. Look at the preview carefully before you confirm.

  1. Open the customer you want to keep.
  2. Click Actions > Merge another customer into this one. The window Merge another customer into ... opens.
  3. In Customer to fold in, search for the duplicate and pick it. CifraHQ shows a preview and changes nothing yet:
    • the two Customers side by side, Stays and Folded in, with their code, name and Tax ID;
    • What moves to ..., with how many records of each kind will move;
    • Combined balance and Combined credit, the sums of both Customers;
    • Worth knowing before you merge, a list of things that do not stop the merge but you should read;
    • if the merge cannot go ahead, a red This merge cannot go ahead message that says why. The next step stays disabled.
  4. Click Review and confirm. The window now says which customer stays, which one is folded in, and that it cannot be undone.
  5. Click Merge Customers to merge, or Back to go back to the preview.

You can also start the same window from the Possible duplicates page, with both Customers already chosen.

What moves, and what stays

Everything below is done in one step. If anything fails, nothing changes.

Item What happens
Quotes (and quote versions), Sales Orders, deliveries, Invoices, payments, credit notes, credit and debit memos, Returns, Return Receipts, prepayments, Rentals, retentions received and recurring schedules Move to the customer that stays, including drafts and open documents.
Addresses Move over. An address that is exactly the same as one the customer that stays already has is folded into it.
Notes and attachments Move to the customer that stays.
Tax Codes and user assignments Move; the ones the customer that stays already has are not repeated.
Balance and credit Added together on the customer that stays. The folded customer is left at zero.
Price, bonus and Commission Rules Move, except a rule that would change a price or bonus the customer that stays already gets. Those stay on the merged customer, stop applying, and are listed in the preview so you can review them.
Intercompany link Moves to the customer that stays when only the folded customer has one.
Intercompany options Move only when the intercompany link moves. Otherwise they stay on the merged customer, stop applying, and the preview warns you.
Code, name, terms, salesperson, credit limit, currency and other settings The customer that stays keeps its own.
Blank details A Tax ID (with its check digit), legal name, email, phone or contact person that is blank on the customer that stays is filled in from the folded customer.

Documents already sent to the DGI stay as they were issued. They now simply show under the customer that stays, and nothing is sent again.

After the merge:

  • A note on the customer that stays records who merged which customer, and when.
  • The customer statement of the customer that stays shows the documents of both.
  • The warning The combined balance is above the credit limit appears in the preview if the sum goes over the credit limit of the customer that stays. Nothing is changed automatically; raise the limit if new orders should not go on credit hold.
  • The merged customer no longer appears in customer pickers, in search boxes or in the default customer list, and it cannot be used on new documents. If someone picks it, CifraHQ names the customer to choose instead.
  • A document that was already open on screen for the merged customer cannot be posted any more. Open it again from the customer that stays. If it is still on the merged customer, see Move anything left behind.
  • A saved SQL query report with the merged customer's code or ID typed into it still points at the merged customer. Edit the query to use the customer that stays.
  • There is no Undo button. CifraHQ keeps a record of every row that moved, so ask support if a merge ever has to be reversed.

Why a merge can be refused

Message Why, and what to do
Customer [..] cannot be merged into itself. You picked the same customer twice. Pick a different one.
Customer [..] was already merged into another customer. One of the two was merged before. Keep the customer it was merged into instead.
Customer [..] is the point of sale default customer. The customer chosen in the point of sale settings cannot be folded away. Change that setting first, then merge.
... a real company cannot be folded into the point of sale default customer. The customer that stays is the point of sale default and the other one is a real company with a Tax ID or an intercompany link. Change the point of sale default customer setting first.
Customers [..] and [..] have different tax IDs, so they are different companies. Two different Tax IDs mean two different companies. If one of them is wrong, correct it, then merge. The same rule applies to different foreign tax IDs.
Customers [..] and [..] each stand for a sister company in Intercompany Trading. Both have an intercompany link. Remove the link from one of them, then merge.
Customers [..] and [..] both have their own intercompany options. Only one customer can keep intercompany options. Ask support to remove the ones you do not need, then merge.
New records were saved for customer [..] while the merge was running. Someone saved something for the folded customer at that moment. Nothing was changed; run the merge again.
Your sign-in is not a user of this company. The merge records who ran it, so it needs your own account. Sign in with it and merge again.

If the point of sale default customer is the customer that stays, it takes no Tax ID or other identity from the merge, because it stands for every walk-in buyer. The preview warns that the Price Rules and addresses of the folded customer will apply to walk-in sales.

The Possible duplicates page (administrators)

Open it from the customer list: Action > Possible duplicates. It lists the Customers that probably are one company, so you can clean up duplicates that already exist.

  • Sharing a tax ID comes first, grouped by Tax ID. Similar names only comes after, one block for each pair.
  • Two Customers with different Tax IDs are never listed, however alike their names are.
  • Every pair shows both Customers side by side: code, name, legal name (when different), Tax ID, balance, number of documents and last activity.
  • CifraHQ suggests the customer to keep: the one with the most recent document, then the one with more documents, then the lower code. The card of the other customer says Folded in. Click Keep this one instead on it to swap them.
  • Click Merge X into Y to open the merge window with both Customers already chosen and the preview shown. Merging is as described above.
  • Click Keep both when they really are two Customers (for example a company and its leasing arm). The pair leaves the list and is not suggested again.
  • Customers already merged and pairs you marked with Keep both are not listed.

If the list cannot be loaded, the page says so and offers Try again. It never shows an empty list when the load failed.

Find a merged customer

  • On the customer list, switch on Show merged Customers. Merged Customers then appear with a Merged badge; click the badge to open the customer it was merged into.
  • Open a merged customer to see a banner Merged into ... with a link to the customer that took over. The page is read-only: nothing on it can be changed.

Move anything left behind (administrators)

A merge moves everything in one step, but something saved at that same moment, for example by a background job, can still end up on the merged customer. A document left there cannot be posted, and nobody can change its customer. CifraHQ can also add a default tax code to every customer, merged ones included. This button finishes the merge you already confirmed, so it asks for no confirmation.

  1. Open the merged customer (on the customer list, switch on Show merged Customers).
  2. On the banner, click Move anything left behind.
  3. A message says how many records moved to the customer that took over, or Nothing was left behind.

Good to know:

  • Balances do not change. A record left behind can never have been posted.
  • The rules and intercompany options that stayed on the merged customer on purpose stay there. A rule that would change what the customer that took over already gets stays too.
  • A tax code or user assignment that customer already has is removed instead of being repeated.
  • If the merged customer still shows a balance or a credit, nothing moves and the message names the amounts. Something has gone wrong, so ask support to look at it.
  • The button appears only for administrators, and only when there is a customer to move the records to.

Troubleshooting

Symptom Likely cause Resolution
The Possible duplicates item is missing You are not an administrator. Ask an administrator.
The Merge another customer into this one action is missing You are not an administrator, or the customer is already merged. Open the customer that stays.
Review and confirm is disabled No customer picked yet, or the preview shows a refusal. Pick the duplicate, or read the red message.
A customer I expected is not in the duplicates list Its Tax ID differs from the other one, the pair was marked Keep both, or one of them is already merged. Nothing to do.
The Excel import rejected a customer row Its Tax ID belongs to another customer. Create it by hand as an administrator, or correct the Tax ID.
The New customer window will not create the customer and says Tax ID already used by ... The RUC you typed belongs to another customer. Click Open on the Same RUC row, or ask an administrator if a second account is really needed.
The panel does not show a customer I expected The name has fewer than 3 letters, the RUCs are different, or only a common word such as Panama is shared. Type more of the name, or type the RUC.
The button says Create anyway instead of Create The panel is showing possible matches. Check them first. Click Create anyway only if it is a different company.
A document cannot be posted because its customer was merged The document was left on the merged customer. An administrator opens the merged customer and clicks Move anything left behind.

Related Features

Customers - Intercompany Trading - Price Rules - Bonus Rules - Commission Rules

Was this page helpful?