Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Error’d: Pickup Sticklers

      September 27, 2025

      From Prompt To Partner: Designing Your Custom AI Assistant

      September 27, 2025

      Microsoft unveils reimagined Marketplace for cloud solutions, AI apps, and more

      September 27, 2025

      Design Dialects: Breaking the Rules, Not the System

      September 27, 2025

      Building personal apps with open source and AI

      September 12, 2025

      What Can We Actually Do With corner-shape?

      September 12, 2025

      Craft, Clarity, and Care: The Story and Work of Mengchu Yao

      September 12, 2025

      Cailabs secures €57M to accelerate growth and industrial scale-up

      September 12, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025
      Recent

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025

      Mastering PHP File Uploads: A Guide to php.ini Settings and Code Examples

      September 28, 2025

      The first browser with JavaScript landed 30 years ago

      September 27, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured
      Recent
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Implementation of Custom Tables in Optimizely Configured Commerce

    Implementation of Custom Tables in Optimizely Configured Commerce

    July 8, 2025

    In many B2B commerce implementations, the default features provided by Optimizely Configured Commerce may fall short, particularly when it comes to managing or storing custom data. This blog will outline how to create and work with custom database tables within the platform, ensuring flexibility without altering core system components.

    What Are Custom Tables?

    Custom tables are user-defined database tables used to hold additional information about products, customers, orders, or other business-specific data. They allow developers to expand the platform’s capabilities without interfering with the existing database schema, which supports better maintainability and easier upgrades.

    Why Create Custom Tables?

    Here are the key reasons to implement custom tables in Optimizely Configured Commerce:

    • Storing metadata or attributes that don’t naturally fit into existing system tables
    • Supporting business processes that require unique data structures
    • Keeping the core schema that clean while enabling platform customization

    Steps to Implement a Custom Table

    Creating a custom table involves adding a new table via a SQL script and configuring it to run automatically using the Optimizely bootstrapper.

    1. Set Up the Project Structure:
      Begin by creating a folder named DatabaseScript at the root of your Extension project.
      Db Structure
    2. Follow Naming Conventions:
      Use the following format for naming your SQL script files: YYYY.MM.DD.SS.DescriptiveName.sql
      • YYYY = year
      • MM = month
      • DD = day
      • SS = sequence number for that day
        This convention ensures scripts run in the correct order and version control is maintained.
    3. Mark Script as Embedded Resource:
      To ensure the bootstrapper can detect and execute your script, set its Build Action to Embedded Resource in the properties panel.
      Script Property

    Example: Creating a Custom Table for Product Data

    Let’s say you want to store extra product details. You could create a table called ProductExtensions using a script named 2025.06.03.01.Table_ProductExtension.sql. To proceed, this file should be added to the DatabaseScript folder and marked as an embedded resource with the following content:
    Script

    Table Structure

    Once you execute the script, the system creates a custom table named Extension.ProductExtension in the database, as shown below:

    Guidelines for Custom Table Design

    • All custom tables, views, and stored procedures must exist under the Extension schema.
    • You can modify and load data into other schemas, but DDL operations are restricted to the Extension schema.
    • Each custom table must include a primary key field named Id of type uniqueidentifier with a default of newsequentialid().
    • Include audit fields like CreatedOn, CreatedBy, ModifiedOn, and ModifiedBy, all non-nullable and set with proper defaults.
    • Add indexes on commonly queried fields like ErpNumber and Id.
    • You can define foreign key relationships to dbo schema tables, since the Extensions user has permission to reference them.

    Script Execution and Bootstrapper Behaviour

    When the application starts, the bootstrapper checks for new database scripts and runs them. It also logs each executed script in the DatabaseScript table. To re-execute a script, however, you must delete both the custom table and its entry in the DatabaseScript table. On the next application start, the system will execute the script again and relog it.

    Conclusion

    Custom tables in Optimizely Configured Commerce offer a powerful way to tailor the platform to your organization’s unique data and functionality needs, all without compromising the integrity of the core system

     

    Reference: Create custom tables with an entity and WebApi

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCISA Adds 3 Flaws to KEV Catalog, Impacting AMI MegaRAC, D-Link, Fortinet
    Next Article Keyboard Testing in Accessibility Testing

    Related Posts

    Development

    Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

    September 28, 2025
    Development

    Mastering PHP File Uploads: A Guide to php.ini Settings and Code Examples

    September 28, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Therapists Too Expensive? Why Thousands of Women Are Spilling Their Deepest Secrets to ChatGPT

    Artificial Intelligence

    How AI Is Transforming Personal Finance & Wealth Management💰

    Web Development

    Spring Security Vulnerability Let Attackers Determine Which Usernames are Valid

    Security

    Hackers Target Over 70 Microsoft Exchange Servers to Steal Credentials via Keyloggers

    Development

    Highlights

    Machine Learning

    DeltaProduct: An AI Method that Balances Expressivity and Efficiency of the Recurrence Computation, Improving State-Tracking in Linear Recurrent Neural Networks

    April 2, 2025

    The Transformer architecture revolutionised natural language processing with its self-attention mechanism, enabling parallel computation and…

    CTEM vs ASM vs Vulnerability Management: What Security Leaders Need to Know in 2025

    July 17, 2025
    Streamlining Context Validation in Laravel

    Streamlining Context Validation in Laravel

    April 21, 2025

    Google Cloud: Driving digital transformation

    May 13, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.