# Custom object types: keys, storage scope and quotas

*B2C Commerce Developer Study Guide · Data Management Using Business Manager Usage · Last updated November 3, 2026 · https://www.certifyforce.com/study-guide/b2c-commerce-developer/data-management-using-business-manager-usage/custom-object-types-keys-storage-scope-and-quotas*

When custom data belongs on a system object and when it needs a custom object type, how to define the type (key attribute, Data Replication, Storage Scope, attribute groups) on staging, how CustomObjectMgr creates and queries instances, and how quotas and purge jobs keep object volume in check.

- Certification: Salesforce B2C Commerce Developer
- Exam section: Data Management Using Business Manager Usage
- Study guide: https://www.certifyforce.com/study-guide/b2c-commerce-developer

**Official exam objective:**

> Given a business need to store custom data, determine if a custom object is needed and create and configure as required.

## What the exam expects

- Decide whether a storage need belongs in a custom attribute on a system object or in a new custom object type.
- Define a custom object type on its General tab (ID, Key Attribute, Data Replication, Storage Scope), add attribute definitions and an attribute group that lets merchandisers create objects.
- Choose organization or site storage scope, and create types on staging so replication carries them to production.
- Create, look up and query instances with `CustomObjectMgr` inside a transaction, using the `custom.` prefix and closing iterators.
- React to custom object quota warnings with purge jobs and quota alerts rather than code workarounds.

Key terms: **custom object type** (a definition, created for the organization, of a business object B2C Commerce does not supply); **custom object** (one instance of a type); **key attribute** (the attribute that holds each instance's unique key); **storage scope** (whether instances are organization-wide or per site); **Data Replication** (whether instances replicate between instances, fixed at creation); **object quota** (a platform limit on how many persistent objects of a kind exist).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Best practice | System objects instead of custom objects whenever possible | [B2C Commerce Business Objects](https://trailhead.salesforce.com/content/learn/modules/cc-digital-for-developers/digital-business-objects) |
| Type availability | A type is always available to the whole organization | [Use Custom Object Definitions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html) |
| Data Replication | Can't be changed after the type is created | [Use Custom Object Definitions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html) |
| Where to define | Staging, then replicate with Object Definitions selected | [Use Custom Object Definitions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html) |
| Editor prerequisite | Key attribute included in an attribute group | [Use Custom Object Definitions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html) |
| Automatic attributes | `UUID`, `creationDate`, `lastModified`, not removable | [Create Custom Business Objects](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/creatingbusinessobjects.html) |
| Attribute limit | 50 custom attribute definitions per custom object type | [Use Custom Object Definitions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html) |
| Missing key lookup | `getCustomObject` returns `null` | [Class CustomObjectMgr](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.CustomObjectMgr.html) |
| First placeholder | `{0}` | [Class CustomObjectMgr](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.CustomObjectMgr.html) |
| Persistent changes | Only inside a begun transaction | [Class Transaction](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.system.Transaction.html) |
| Warning threshold | 60% of the quota limit | [Governance and Quotas](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-governance-and-quotas.html) |
| Volume control | Purge jobs for custom objects | [Site Performance](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-site-performance.html) |

## Check yourself

- When must a type's key attribute exist, given it can be named on the General tab first?
- Why should creationDate and lastModified stay out of a custom object type's attribute group?
- Why might the Quota Status page still show an old object count right after a cleanup?
- At what share of an object quota's limit should you take corrective action?

## Sources

- [Use Custom Object Definitions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-business-objects.html)
- [Create Custom Business Objects](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/creatingbusinessobjects.html)
- [Class CustomObjectMgr](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.CustomObjectMgr.html)
- [Class Transaction](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.system.Transaction.html)
- [Governance and Quotas](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-governance-and-quotas.html)
- [Site Performance](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-site-performance.html)
- [B2C Commerce Business Objects](https://trailhead.salesforce.com/content/learn/modules/cc-digital-for-developers/digital-business-objects)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 9 linked practice questions, and unlimited timed mock exams are included with the B2C Commerce Developer pack (USD $19): https://www.certifyforce.com/practice-exams
