Search All Entities (Index module)

The function Does_Entity_Exist_json allow you to search ALL hyper entities: Clients & Suppliers & Projects & Users (Employees).
This search include Contact Persons Tables and scanning ALL 3 storage spaces (Current & Archive & Deleted).
This function gives you access to sensitive data, and that is why 'Direct Access API into Hyper' must be included in 'Website Features' setting.

Function input

{
  "phone":"400-0976",
  "Email":"person@company1.co.il"
}

Field Description
Email A Single mail address for search.
Phone
Phone2
Phone3
Search up-to three phone numbers in one call.
Phone numbers are being compared from the right digit to the left, while filtering any other char.
IdNumber
IdNumber2
Search up-to two ID numbers in one call.
ID_Number_Type
ID_Number_Type2
These fields give you the ability to search a specific type of document:
  1. Value zero OR not using this field = search all doc types; match only by "IdNumber".
  2. National ID
  3. National Passport
  4. Travel ID (certificate)
  5. ICA ID (certificate)
  6. Corporation ID
  7. Fellowship
  8. Foreign Company Registered Locally
  9. Driving License

Function Output

Here is an example of a response, to the request written above:
{
  "ResponseCode":0,
  "FunctionName":"Does_Entity_Exist_Json",
  "Clients":[
    {
      "EntityNumber":500000,
      "FullName":"Sample Company",
      "Email":"yaniv@yaniv.co.il",
      "1stPhone":"052-400-0000",
      "2ndPhone":"",
      "3rdPhone":"09",
      "Country":"Israel",
      "MatchBy":"Phone",
      "Gender":"Private Company",
      "Agency":"H.Q.",
      "HandlingStatus":"Approved (no activity yet)",
      "Role":"None"
    }
  ],
  "Users":[
    {
      "EntityNumber":120000000,
      "FullName":"Alonit Ronen",
      "Email":"",
      "1stPhone":"052-400-0000",
      "2ndPhone":"",
      "3rdPhone":"",
      "Country":"",
      "MatchBy":"Phone",
      "Gender":"Female",
      "Agency":"H.Q.",
      "Role":"Hyper User"
    }
  ],
  "Clients_Contacts":[
    {
      "EntityNumber":500050,
      "FullName":"Contact Person Name<br>Company Name",
      "Email":"person@company1.co.il",
      "1stPhone":"054-123-4567",
      "2ndPhone":"08-123-4567",
      "3rdPhone":"",
      "Country":"",
      "MatchBy":"Email",
      "Gender":"Male",
      "Agency":"H.Q.",
      "HandlingStatus":"Real Active Account",
      "Role":"None"
    },
    {
      "EntityNumber":500532,
      "FullName":"Shimon Kohen<br>Bullet Tech",
      "Email":"person@company1.co.il",
      "1stPhone":"054-123-4567",
      "2ndPhone":"08-123-4567",
      "3rdPhone":"",
      "Country":"",
      "MatchBy":"Email",
      "Gender":"Unknown",
      "Agency":"H.Q.",
      "HandlingStatus":"Approved (no activity yet)",
      "Role":"Borrower & Debtor"
    }
  ],
  "Deleted":{
    "Clients":[
      {
        "EntityNumber":500435,
        "FullName":"Test client 33",
        "Email":"",
        "1stPhone":"052-400-0000",
        "2ndPhone":"",
        "3rdPhone":"",
        "Country":"",
        "MatchBy":"Phone",
        "Gender":"Unknown",
        "Agency":"H.Q.",
        "HandlingStatus":"Approved (no activity yet)",
        "Role":"None"
      }
    ]
  }
}

In case of empty list, "ResponseCode" will be 2 and the message format is the same as any other possible error code:
{
  "ResponseCode":2,
  "ResponseMsgEng":"No Results \/ Data"
}

Response Tree Structure

Every entity type will get an Array object with a fixed name: Clients, Suppliers, Projects, Users.
Three entities from the list above, has a sub table of contact persons, each table will have it's own Array object: Clients_Contacts, Suppliers_Contacts, Projects_Contacts.

Hyper have Three Storage spaces for each table: Normal (current data), Archive and Deleted.
So, all entities stored in the "Normal" will be placed on root.
Archive and Deleted get's their own object level from root and then an object for each entity type as described above.

Fields inside every entity object:

Field Description
EntityNumber Unique account number from hyper.
FullName Account name (combined from fields include Title).
For contact persons, this field will contain the contact full name first, then <br> and the Entity full name !
Email Entity or Contact Email field.
1st Phone
2nd Phone
3rd Phone
Entity or Contact three phone fields.
Country Entity or Contact Country field
Match By Match can be 1 of 3 values: 'ID number', 'Email', 'Phone'. This is also the order of the match loops.
Gender Entity or Contact Gender field can be 1 of 5 values: 'Unknown', 'Male', 'Female', 'Private Company', 'Public Company'.
* Contact person can have value no. 6: 'Branch / Office / Site', this option is part of the contacts tables.
* Users are limited to values: 'Male', 'Female'.
Agency The agency of the (parent) Entity, Contacts does not have this field.
Handling Status The status of the (parent) Entity, Contacts does not have this field.
Field only exist in Clients & Suppliers tables. This are the possible values:
  1. New
  2. Follow up
  3. Supplier: "Did NOT Passed Qualification"
    Client: "Follow up + Meeting / P.Offer"
  4. Supplier: "Not Interested in working with us"
    Client: "Client Not Interested"
  5. Approved (no activity yet)
  6. Real Active Account
  7. InActive / Suspended
Role The role of the (parent) Entity, Contacts does not have this field. Each entity have a different values list !

These are the values from Users table:
  1. Hyper User
  2. Person, Not using Hyper
  3. Calendar Resource
  4. Warehouse User
  5. Point of Sale User
  6. Former User / Employee

These are the values from Suppliers table:
  1. Unclassified
  2. Middleman     (Affiliate / marketer)
  3. For P.O. module     (Purchase Order)
  4. LP / Broker

These are the values from Clients table, "Role for Loan Module" field:
  1. None
  2. Borrower
  3. Debtor
  4. Borrower & Debtor
  5. Investor