CRM

 

class Enquiry(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    enquiry_no = db.Column(db.String(20))
    client = db.Column(db.String(100))
    end_user = db.Column(db.String(100))
    project_name = db.Column(db.String(200))
    # ... other columns ...

    def __init__(self, enquiry_no, client, end_user, project_name, ...):
        self.enquiry_no = enquiry_no
        self.client = client
        self.end_user = end_user
        self.project_name = project_name
        # ... initialize other columns ...

 

 

Sno    
Enquiry No ENQ/TMAE/10000/2024 Red color to increment
Client    
End User    
Project Name    
Project Stage BID to BID,BID to BUY,QUOTE DD
Supply of    
Region UAE,Iraq,Saudi,Oman,Bahrin DD
Sector Name O&G,Infrastructure,Power,Others,Steel,Utility,Water,Water & Electricity.Water Wsste water  
Business Unit    
Status Dropped,Quoted,  
Closing Date for Quote    
Quote Number    
Enquiry Received date    
Quotation Submitted Date    
Rework on a quote already submitted    
Revision Number    
Engineer Quoting    
Approving Manager    
Account Manager(if any)    
Estimated Value in USD    
Estimated Value in AED    
Estimated value for revision 0    
Estimated value for revision 1    
Estimated value for revision 2    
Estimated value for revision 3    
Estimated value for revision 4    
Status of Quote /Reason for Revision    
% of Winning Probablity    

 

Tables:

  1. Customers

    • customer_id (INT PRIMARY KEY): Unique identifier for the customer
    • company_name (VARCHAR(255)): Name of the customer company
    • contact_name (VARCHAR(255)): Name of the contact person at the customer company
    • email (VARCHAR(255)): Email address of the contact person
    • phone_number (VARCHAR(20)): Phone number of the contact person
    • address (TEXT): Billing and/or shipping address of the customer
  2. Contacts (Optional - Can be linked to Customers table for multiple contacts)

    • contact_id (INT PRIMARY KEY): Unique identifier for the contact
    • customer_id (INT FOREIGN KEY REFERENCES Customers(customer_id)): Foreign key referencing the customer
    • first_name (VARCHAR(255)): First name of the contact person
    • last_name (VARCHAR(255)): Last name of the contact person
    • email (VARCHAR(255)): Email address of the contact person
    • phone_number (VARCHAR(20)): Phone number of the contact person
    • title (VARCHAR(255)): Title/designation of the contact person
  3. Products/Services

    • product_id (INT PRIMARY KEY): Unique identifier for the product or service
    • name (VARCHAR(255)): Name of the product or service
    • description (TEXT): Description of the product or service
    • unit_price (DECIMAL(10,2)): Price per unit of the product or service
    • category (VARCHAR(255)): Category of the product or service (e.g., Software, Hardware, Consulting)
  4. Quotes

    • quote_id (INT PRIMARY KEY): Unique identifier for the quote
    • customer_id (INT FOREIGN KEY REFERENCES Customers(customer_id)): Foreign key referencing the customer
    • created_date (DATETIME): Date and time the quote was created
    • expiry_date (DATETIME): Date and time the quote expires
    • total_price (DECIMAL(10,2)): Total price of the quote (sum of all line items)
    • status (VARCHAR(255)): Status of the quote (e.g., Draft, Sent, Accepted, Rejected)
  5. Quote_Items

    • quote_item_id (INT PRIMARY KEY): Unique identifier for the quote item
    • quote_id (INT FOREIGN KEY REFERENCES Quotes(quote_id)): Foreign key referencing the quote
    • product_id (INT FOREIGN KEY REFERENCES Products/Services(product_id)): Foreign key referencing the product or service
    • quantity (INT): Quantity of the product or service included in the quote
    • unit_price (DECIMAL(10,2)): Price per unit for the item in this specific quote (can be different from product price)
    • total_price (DECIMAL(10,2)): Total price for this item (quantity * unit_price)
  6. Bids (Optional - Can be an extension of Quotes table with additional fields)

    • bid_id (INT PRIMARY KEY): Unique identifier for the bid (can inherit from Quotes table if Bids are a specific type of Quote)
    • quote_id (INT FOREIGN KEY REFERENCES Quotes(quote_id)): Foreign key referencing the original quote (can be null if Bids are a separate entity)
    • competitor (VARCHAR(255)): Name of the competitor (if any)
    • bid_price (DECIMAL(10,2)): Total price offered in the bid
    • win_status (BOOLEAN): Flag indicating if the bid was won (optional)

Relationships:

  • A Customer can have many Quotes. (One-to-Many)
  • A Quote belongs to one Customer. (Many-to-One)
  • A Quote can have many Quote Items. (One-to-Many)
  • A Quote Item belongs to one Quote. (Many-to-One)
  • A Product/Service can be included in many Quotes. (Many-to-Many) (Implemented through Quote Items table)
  • A Contact can be linked to a Customer (Optional - One-to-Many)
  • A Quote can be converted to a Bid (Optional - One-to-One)

Comments

Popular posts from this blog

AI Agents for Enterprise Leaders -Next Era of Organizational Transformation

Airport twin basic requirements

AI രസതന്ത്രജ്ഞൻ: തൂവൽ പോലെ ഭാരം കുറഞ്ഞ സ്റ്റീലിന്റെ സ്വപ്നം യാഥാർത്ഥ്യമായ കഥ