Skip to main content

Legal Entity

A legal entity is a registered company. It is the business that actually employs people, signs their contracts and pays their salaries, and it is the name that appears at the top of a payslip. Every employee, every payroll and every document in PeopleNest belongs to exactly one legal entity.

Where
Organization & Setup › Enterprise Structure › Legal Entity
Who uses it
The implementation consultant, once per company in the group
When
First. Almost nothing else can be set up until a legal entity exists.
Needs first
Country, State and City for the address

What it is for​

A group of companies is not one company. If the factory is registered separately from the trading company, the two have different registration numbers, different bank accounts, different payrolls and separate statutory returns. PeopleNest models that by giving each one a legal entity.

That is the one question to settle before you fill this screen in: how many registered companies is this client, legally. The answer is the number of legal entities, and it is rarely the number of offices or the number of factories. One company with a head office in Lahore and a plant in Faisalabad is one legal entity with two addresses.

The legal entity is what separates data. People, positions, payrolls and pay areas all sit inside one, and a payroll run never crosses from one legal entity into another. Several of the setup screens in this module are also entered per legal entity, among them Organizational Structure and Parameter Profile.

The screen also holds the company's own settings for sending messages out - the SMS gateway, the WhatsApp numbers, the mail server - because those are per company, not per installation. If agreement documents are to be signed from a phone, that is configured here too.

PeopleNest shares this screen with the wider ERP product, so some tabs on it describe purchasing, sales and shop integrations. Those are listed at the end and an HR-only installation leaves them alone.

Every field, in plain words​

FieldWhat it meansWhat to put in itNotes
Legal EntityThe short code for the company.01Required. It appears on nearly every other screen, so keep it to two characters if you can.
NameThe registered name of the company.Ravi Textile Mills LimitedUse the name exactly as it is registered, it goes on reports.
ClientThe group the company belongs to.ABSPick it from the list. A single-company client still needs one.
Time zoneThe company's working time zone.Asia/KarachiPick it from the list.
LanguageThe language the company's screens and documents default to.English
ImageThe logo shown inside the application.Upload a square PNG of the company mark
Report ImageThe logo printed at the top of reports and payslips.Upload a wide PNG with the full registered nameKeep it a readable print resolution, it goes on paper.
Hide BannerHides the banner strip at the top of the home screen.Leave clear
BannerThe banner image for the home screen.Upload the company's bannerOnly used when Hide Banner is clear.

Client - name in other languages​

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
LanguageA language the client uses.UrduRequired on the line.
NameThe company name in that language.The Urdu form of the registered nameOnly needed where documents are printed in that language.

Address​

One line per place the company has. A company with a head office, a factory and a warehouse has three lines.

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
Name of AddressWhat this place is called.Head OfficeRequired.
AddressThe street address.12-A, Gulberg III, Lahore
Country RegionThe wider region the country sits in.South AsiaPick it from the list.
CountryThe country.PakistanPick it from the list.
StateThe province.PunjabThe list narrows to the country you picked.
CityThe city.LahoreThe list narrows to the state you picked.
PrivateThe address is not shown on outgoing documents.Leave clearTick it on a director's residential address.
Primary For CountryThis is the company's main address in that country.Ticked on the Lahore lineOnly one address per country may carry this. The screen refuses a second one.
Primary AddressThe company's single main address.Ticked on the Head Office lineOnly one address in total may carry this. The screen refuses a second one.
TimezoneThe time zone of this particular place.Asia/KarachiUseful where a group has an office abroad.
DistanceThe distance to this place from the main address.140Used where travel from the main site is reimbursed.
KilometerThe unit the distance is expressed in.KM
Effective FromThe date the company started using this address.01/01/2020
Expiration DateThe date it stops.Leave blank while it is in use
LatitudeThe map latitude.31.5204Used by geofenced attendance.
LongitudeThe map longitude.74.3587Used by geofenced attendance.
PersonThe contact person at this place.Nadia Qureshi
MobileTheir mobile number.0300 1234567
PhoneThe landline.042 35771234
EmailThe email for this place.ho@ravitextile.com.pk
Sales RegionBelongs to the ERP sales structure.Leave blank in an HR-only installation
Sales AreaBelongs to the ERP sales structure.Leave blank in an HR-only installation
Sales TerritoryBelongs to the ERP sales structure.Leave blank in an HR-only installation
Tax ZoneThe tax zone the address falls in.PunjabPick it from the list. Used by the ERP tax calculation.

Purpose - what each address is used for​

Each address line carries its own small list of purposes.

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
PurposeWhat this address is used for.Registered OfficePick it from the list. Add a line per purpose, one address can serve several.

Contacts​

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
PersonThe name on the contact.Nadia QureshiRequired.
Contact NatureWhat kind of contact detail this is.MobileRequired on the line, the screen refuses a line with no nature. Pick it from the list.
ContactThe number or address itself.0300 1234567Required.
ExtensionThe extension on a landline.214
PrimaryThis is the main contact of its kind.TickedOnly one line per contact nature may be primary. The screen refuses a second one.

Authentication Control - which screens ask for a password again​

Use this where a company wants a second check before something is saved, typically on payroll.

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
ScreenThe screen that will ask.PayrollPick it from the list of entry screens.
Transaction NameThe readable name of that screen.Fills itself from the screen you pick
Authentication ScopeHow often it asks.RecordValues: Screen - once per time the screen is opened. Record - every time a record is saved.
Authentication ByWhose password is required.Logged-in UserValues: Logged-in User - the person working signs with their own password. Fixed User - a named account's password is needed, which is then entered below.
User NameThe account whose password is required.payroll.officerOnly used with Fixed User.
NameThe full name of that account.Fills itself from the account you pick

Messaging​

SMS Gateway​

FieldWhat it meansWhat to put in itNotes
Allowed SMS IntegrationTurns SMS on for this company. Signing links and verification codes then go out by SMS.Ticked
SMS ProviderWhich gateway to send through.TwilioPick it from the list. Anything other than Twilio uses the generic adapter and needs the API URL below.
SMS API URLThe gateway address.The URL your provider gave youRequired for every provider except Twilio.
SMS API KeyThe account key from the provider.The key from your providerHidden on screen once saved.
SMS API SecretThe account secret or password from the provider.The secret from your providerHidden on screen once saved.
SMS Sender ID (Mask)The sender name recipients see instead of a number.RAVITEXMust be registered with PTA before it will display.
OTP Message TemplateThe wording of the verification code message.Your Ravi Textile code is {{otp}}. It is valid for {{minutes}} minutes.The placeholders available are the code, the company, the party and the number of minutes.
Signing Link Message TemplateThe wording of the signing link message.Dear {{name}}, please sign your document at {{link}}. The link is valid {{hours}} hours.The placeholders available are the link, the company, the party, the name and the number of hours.

WhatsApp​

FieldWhat it meansWhat to put in itNotes
Allowed Whatsapp IntegrationTurns WhatsApp on for this company.Ticked
WABAIDThe business account identifier from Meta.The value from your Meta account
Phone Number IDThe identifier of the sending number from Meta.The value from your Meta account
Whatsapp Phone NumberThe number messages are sent from.+92 42 111 000 111
Whatsapp Access TokenThe access token from Meta.The token from your Meta account
Whatsapp Template NameThe approved template used for general messages.ravitex_noticeMeta will not deliver free text to somebody who has not written to you first, so a template is required.

SMTP Configuration​

FieldWhat it meansWhat to put in itNotes
Email AddressThe address the system sends from.hr@ravitextile.com.pk
Email PasswordThat mailbox's password.The mailbox passwordHidden on screen once saved.
ServerThe mail server.smtp.office365.com
PortThe mail server port.587

Agreement signing and OTP​

These control the signing of agreement documents from a phone.

FieldWhat it meansWhat to put in itNotes
OTP ChannelHow a signer is verified.SMSValues: SMS, WhatsApp, Email. The channel you pick decides which gateway above must be configured, and which contact detail a signer must have - a mobile number for SMS and WhatsApp, an email address for Email.
Document Signing Base URLThe web address signers reach from their phone.https://sign.ravitextile.com.pkIt must work from outside the office. A local address will produce a link that does not open.
OTP Validity (Minutes)How long a verification code stays usable.10
OTP Max AttemptsHow many wrong codes are allowed before the code is burned and a new one must be requested.3
OTP Resend Cooldown (Seconds)The wait between one code request and the next, per signer.60
OTP Max Per HourHow many codes one mobile number may be sent in an hour.5
Signature Window After OTP (Minutes)How long after entering the code a signer may still sign. Past this they verify again.15
Signing Link Validity (Days)How many days a signing link stays usable.7
Receipt Link Validity (Days)How many days a signer can still open their link to download the signed copy.30Usually longer than the signing window, so nobody needs a login to fetch their copy.
WhatsApp OTP TemplateThe name of the approved WhatsApp authentication template used to send a code.ravitex_otpRequired when OTP Channel is WhatsApp.
WhatsApp Link TemplateThe name of the approved WhatsApp template used to send a signing link.ravitex_sign_linkRequired when OTP Channel is WhatsApp. It takes the signer name and then the link.

Files Storage​

FieldWhat it meansWhat to put in itNotes
Company Storage Limit (MB)How much file storage the whole company may use.51200
Default User Quota (MB)How much one user may use when nothing more specific is set.200

Then a line per user who needs a different allowance:

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
NameThe user.Asad MahmoodPick them from the list. Each user may appear once. A repeat is refused, naming them.
User NameTheir login name.Fills itself from the user you pick
Quota (MB)Their allowance.2000

AI Agents​

FieldWhat it meansWhat to put in itNotes
Enable AITurns the assistant features on for this company.Leave clear unless the client has bought keys
Claude API KeyThe key for Anthropic's service.The key from the providerHidden on screen once saved.
Claude Default ModelWhich model to use by default.The model name from the provider
GPT (OpenAI) API KeyThe key for OpenAI's service.The key from the providerHidden on screen once saved.
GPT Default ModelWhich model to use by default.The model name from the provider
Gemini API KeyThe key for Google's service.The key from the providerHidden on screen once saved.
Gemini Default ModelWhich model to use by default.The model name from the provider

The AI tools this company may use, one line each:

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
AI ToolThe short code for the tool.FAST
AI Tool NameWhat it is called.Fast summariser
ProviderWhich service it runs on.ClaudePick it from the list.
ModelThe model name.The model name from the providerA tool line needs a code, a provider and a model. A line missing any of the three is refused. Each tool may appear once.

And which tool each feature uses:

FieldWhat it meansWhat to put in itNotes
Line #The line number.Fills itself
AI FeatureThe feature being configured.Pick it from the listEach feature may appear once.
AI ToolWhich of the tools above it uses.FASTPick it from the list of tools you entered.
AI Tool NameThe tool's name.Fills itself
Context / Instructions SentExtra standing instructions sent with every request from that feature.Answer in plain English. Amounts in PKR.

Tabs that belong to the ERP product​

An HR-only installation leaves all of these alone. They are listed so you know what you are looking at.

Tab or groupWhat it is for
Controlling - Purchase StructureSwitches that make a purchasing structure, organization, team or purchaser compulsory on purchase documents.
Controlling - Sales Structure and Sales TeamThe same switches for the sales structure, organization, group, team, sales taker, sales responsible and distribution channel.
Controlling - GeneralWhether the company name is required on transaction screens, whether real estate is required on a journal, and whether the advertisement strip is hidden on reports.
Integrations - ShopifyStore address, access token, webhook secret, and the two buttons that pull products and orders across.
Integrations - SyrveConnection details and the accounting defaults a Syrve-created document is posted with.
Integrations - Digital Invoice and FBRThe digitalization switch, token, sale type, scenario identifier, sandbox switch, status and the date the integration starts from.
Integrations - Integration BeepConnection details for the Beep project integration.
BarcodeWhether barcodes are generated for this company, the default nomenclature new assignments inherit, and the prefix stamped on codes the company issues.

How to configure it​

  1. Settle how many registered companies the client is. Create one Legal Entity per registered company, not one per site.
  2. Make sure Country, State and City hold the places you need. Pakistan and its provinces are already there.
  3. Open Legal Entity. Enter the code 01, the registered name, the Client, Time zone Asia/Karachi and the Language.
  4. Upload the Image and the Report Image. The report one is what goes on the payslip, so use a legible, wide version with the full registered name.
  5. On the Address tab add the head office. Fill Name of Address, Address, Country, State and City, and tick both Primary Address and Primary For Country on it.
  6. Add a line per other site - the factory, the warehouse. Only the head office carries the primary ticks.
  7. On each address line add its Purpose lines, for example Registered Office on the head office.
  8. On the Contacts tab add the switchboard and the HR mailbox, each with its Contact Nature, and tick Primary on one line per nature.
  9. If the company sends anything out by email, fill the SMTP Configuration group. Nothing leaves the system without it.
  10. If the company uses signed agreement documents, fill the Agreement signing and OTP group and the gateway for the channel you picked. A signing base address that does not work from outside the office is the usual reason a link never opens.
  11. Set the Files Storage limits, and add a per-user quota line only for the handful of people who need more than the default.
  12. Save. Then set the screen behaviour for this company on Organizational Structure, which is entered per legal entity.

Scenarios​

The client is one company with a factory and a head office​

One legal entity, two address lines. Everybody is employed by the same company, so one payroll can cover both sites. The factory and the office are separated by Business Unit or by calendar, not by legal entity.

The client is a group of three registered companies​

Three legal entities. Each one gets its own people, its own payroll and its own pay areas, and a payroll run never crosses between them. Anything shared - the Calendar, the Time Templates, the country and city lists - is built once and used by all three.

Each company has its own letterhead on the payslip​

Upload a different Report Image on each legal entity. The payslip takes the image from the legal entity the employee belongs to.

Payroll must be confirmed with a password every time​

Add an Authentication Control line for the Payroll screen with Authentication Scope Record and Authentication By Logged-in User. The officer then re-enters their own password on each save. If the company wants a specific person's password rather than the operator's, use Fixed User and name that account.

Appointment letters are to be signed on a phone​

Fill the Agreement signing and OTP group. Pick the channel the client's staff actually have - SMS works for everybody in Pakistan, WhatsApp needs approved templates from Meta, Email needs an email address on every signer. Then configure the matching gateway, and make sure the Document Signing Base URL is reachable from a phone on a mobile network.

What it is connected to​

If something looks wrong​

  • "It will not save, it says only one address can be marked primary" - two address lines both have Primary Address ticked. Only the main one keeps it.
  • "It will not save, it says only one address can be primary for country" - two lines in the same country both have Primary For Country ticked.
  • "It will not save, it says a contact nature cannot be empty" - a contact line has a number but no nature. Pick one.
  • "It will not save, it says a user is listed more than once" - the same person has two quota lines on the Files Storage tab, or the same tool or feature appears twice on the AI tab.
  • "It will not save, it says country cannot be empty" - an address line has a city or state but no country.
  • "No email is going out" - the SMTP Configuration group is blank, or the mailbox password has changed.
  • "The signing link opens nothing" - the Document Signing Base URL is not reachable from outside the office network.
  • "An AI feature does nothing" - either Enable AI is clear, the tool line has no provider or model, or no feature line points the feature at a tool.
  • "A new employee cannot be created" - the legal entity exists but Organizational Structure has not been entered for it yet.