Skip to main content
What are layered modules?

Layered modules let you manage your core Salesforce setup consistently across multiple orgs.

Claudia McPhail avatar
Written by Claudia McPhail
Updated over a week ago

Layered modules let you manage your core Salesforce setup consistently across all your orgs, while also allowing for specific customizations for different regions or departments.

Key Components

  • Core Module: Contains metadata that is common across all orgs. This might include standard objects, core business processes, and global settings.

  • Org-Specific Modules: Contain metadata that is unique to a particular org. This could include custom objects, page layouts, and integrations specific to a region or business unit.

Gearset combines these modules during deployment, ensuring each org receives the correct combination of global and local settings.

This modular approach helps to maintain alignment across Salesforce orgs while accommodating necessary localized differences. It simplifies deployments, reduces manual effort, and streamlines maintenance.

Use cases

  • Global Company with Regional Offices: A multinational corporation might have a core module with standard sales processes and a separate module for each regional office with specific fields and workflows to support local regulations and business practices.

  • Franchise Model: A business with multiple franchises could use a core module for common branding, products, and processes, with org-specific modules for each franchise location to manage local marketing and customer engagement.

Key benefits include:

  • Customization Without Conflicts: Teams can deploy changes without worrying about overwriting unique customizations in different orgs.

  • Efficient Multi-Org Management: Simplifies the management of complex multi-org deployments.

  • Scalability: Facilitates scaling DevOps processes across multiple production orgs.

  • Stronger Governance: Ensures that core components are validated across all orgs before deployment.

By using Gearset’s Layered Modules, teams can efficiently manage complex multi-org deployments, ensuring consistency and enabling customization.

What are Modular Static Environments?

Modular static environments in Gearset allow teams to manage and deploy Salesforce metadata in a structured way across multiple orgs. This approach involves separating metadata into different modules: a core module for shared elements and org-specific modules for unique customizations. This streamlines multi-org management and ensures consistency where needed, with flexibility for customization.

How It Works

Gearset combines these modules during deployment, ensuring that each org receives the appropriate combination of shared and unique metadata. This allows for consistency in core elements while providing flexibility for org-specific needs.

Let's explore how layered modules apply to specific Salesforce metadata types, with examples to illustrate their use:

1. Custom Objects and Fields

  • Core Module:

    • Example: A custom object called "Customer" with standard fields like "Name," "Email," and "Phone." These are essential for all orgs.

  • Org-Specific Module:

    • Example: A field called "Regional_Discount_Rate__c" on the "Customer" object in a "Europe" module. This field is only relevant to European operations.

2. Page Layouts

  • Core Module:

    • Example: A base page layout for the "Opportunity" object with core fields like "Amount," "Close Date," and "Stage."

  • Org-Specific Module:

    • Example: A modified "Opportunity" page layout in a "Sales_EMEA" module that includes a "Territory" field and a related list for "Sales_Agreements__r."

3. Lightning Web Components

  • Core Module:

    • Example: A "CustomerSearch" LWC that allows users to search for customers using basic criteria. This component is used across all orgs.

  • Org-Specific Module:

    • Example: A "Customer360" LWC in a "Service_APAC" module that displays additional case-related information and integrates with a local messaging service.

4. Permission Sets

  • Core Module:

    • Example: A "Sales_User" permission set that grants access to standard objects and fields needed by all sales users.

  • Org-Specific Module:

    • Example: A "Sales_EU" permission set that extends the "Sales_User" permission set with access to GDPR-specific fields and objects.

5. Workflows and Process Builders

  • Core Module:

    • Example: A workflow rule that updates the "Last_Activity_Date__c" field on an account whenever a task is completed.

  • Org-Specific Module:

    • Example: A Process Builder flow in a "Finance_NA" module that automatically creates a payment record when an opportunity is won, integrating with a North American payment gateway.

How are modular static environments used in a multi-org Pipeline?

  • Pipeline Configuration: In a multi-org pipeline, you can configure the pipeline to deploy the core module to all orgs, and then deploy each org-specific module to its corresponding org. This ensures that all orgs receive the core updates, while also maintaining their unique configurations.

  • Streamlined Deployment: During the pipeline execution, Gearset combines the core module with the relevant org-specific module before deploying to each org. This automated process simplifies deployments and reduces the risk of errors or conflicts.

  • Consistent Delivery: By using layered modules in a multi-org pipeline, teams can ensure consistent delivery of core functionality across all orgs, while allowing for the flexibility to deploy org-specific customizations as needed.

In essence, layered modules provide the structure and organization needed to efficiently manage complex multi-org deployments within a pipeline, making the process more reliable, scalable, and easier to maintain.

Did this answer your question?