Commit Graph

6038 Commits

Author SHA1 Message Date
Shahed Nasser
24ff9d3382 chore: fixes to HTTP and request types for promotions (#13820) 2025-10-28 10:03:41 +01:00
Shahed Nasser
5b0c6e6a94 chore: fixes to HTTP and request types for API Keys (#13819) 2025-10-28 10:02:28 +01:00
Pedro Guzman
cf1001f11d use truncate in db teardown (#13875)
* use truncate in db teardown

* fix empty table list condition
2025-10-27 13:39:48 -04:00
Nicolas Gorga
9f154c308e fix(dashboard): tax region override too large payload (#13860)
* Limit the number of ids passed to the different queries to render the tooltip details to 10, for products, product types and shipping options

* Add changeset

* Extract common additional field computation into variable
2025-10-27 10:48:34 -04:00
Siddartha Nepal
ef798160ea fix(dashboard): Resolve issue with product attributes input (#13863)
Co-authored-by: Siddartha Nepal <siddarthanepal5@gmail.com>
Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
2025-10-27 09:42:18 -04:00
Kevin Leung
2eca81ec0f feat(dashboard): add input field for tracking_url and label_url in shipment form (#13787)
* fix: fix label init logic

* feat(dashboard): add input field for tracking_url and label_url in shipment form

* fix: cleanup leftovers

* chore: update schema

* fix: filter out empty rows

* chore: remove unrelated change

* fix: allow any filled field
2025-10-27 08:26:49 -04:00
Pedro Guzman
cc2614ded7 add Medusa Cloud Email provider (#13781)
* add Medusa Cloud Email provider

* move cloud config to project level

* add tests

* Create breezy-flowers-fly.md

* rename medusa_cloud_config to cloud

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-27 12:39:32 +01:00
Shahed Nasser
ec44432876 chore: fixes to http and request types for products (#13833)
## Summary

**What** — What changes are introduced in this PR?

This PR is part of a series of PRs to fix HTTP and request type arguments.

This is the last PR in the series. It includes a changeset for the changes made.

**Why** — Why are these changes relevant or necessary?  

These types impact the outputted OAS which we show on the API reference. By fixing up the types, we ensure accurate request parameters in the API reference.

**How** — How have these changes been implemented?

Made changes to HTTP types and request type arguments

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

-

---

## Examples

-
---

## Checklist

Please ensure the following before requesting a review:

- [ ] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [ ] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable

---

## Additional Context

-
2025-10-27 08:52:27 +00:00
Frane Polić
4757281677 feat(core-flows,product,types): scoped variant images (#13623)
* wip(product): variant images

* fix: return type

* wip: repo and list approach

* fix: redo repo method, make test pass

* fix: change getVariantImages impl

* feat: update test

* feat: API and core flows layer

* wip: integration spec

* fix: deterministic test

* chore: refactor and simplify, cleanup, remove repo method

* wip: batch add all images to all vairants

* fix: remove, expand testing

* refactor: pass variants instead of refetch

* chore: expand integration test

* feat: test multi assign route

* fix: remove `/admin/products/:id/variants/images` route

* feat: batch images to variant endpoint

* fix: length assertion

* feat: variant thumbnail

* fix: send variant thumbnail by default

* fix: product export test assertion

* fix: test

* feat: variant thumbnail on line item

* fix: add missing list and count method, update types

* feat: optimise variant images lookups

* feat: thumbnail management in core flows

* fix: typos, type, build

* feat: cascade delete to pivot table, rm unused unused fields

* feat(dashboard): variant images management UI (#13670)

* wip(dashboard): setup variant media form

* wip: cleanup table and images, wip check handler

* feat: proper sidebar functionallity

* fefat: add js-sdk and hooks

* feat: allow only one selection

* wip: lazy load variants in the table

* feat: new variants management for images on product details

* chore: refactor

* wip: variant details page work

* fix: cleanup media section, fix issues and types

* feat: correct scoped images, cleanup in edit modal

* feat: js sdk and hooks, filter out product images on variant details, labels, add API call and wrap UI

* chore: cleanup

* refacto: rename route

* feat: thumbnail functionallity

* fix: refresh checked after revalidation load

* fix: rm unused, refactor type

* Create thirty-clocks-refuse.md

* feat: new add remove variant media layout

* feat: new image add UX

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* fix: table name in migration

* chore: update changesets

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-26 15:15:40 +01:00
github-actions[bot]
6e73f8b376 chore: Version Packages (#13800)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-25 21:52:10 +02:00
Oli Juhl
f055bfd723 fix(pricing): Update store + list price preferences (#13852)
* fix(pricing): Update store + list price preferencs

* Create afraid-kids-return.md
2025-10-25 21:45:26 +02:00
Shahed Nasser
61565d243a chore: improve TSDocs for tax provider module (#13846) 2025-10-24 09:44:59 +03:00
Leonardo Benini
226984cf0f feat(admin-*,dashboard): add dashboard i18n extensions (#13763)
* virtual i18n module

* changeset

* fallback ns

fallback to the default "translation" ns if the key isnt found. Allows to use a single "useTranslation("customNs")" hook for both custom and medusa-provided keys

* simplify merges

* optional for backward compat

* fix HMR

* fix generated deepMerge

* test
2025-10-23 15:16:43 -04:00
Shahed Nasser
90966633bb chore: update description of emitEventStep (#13838) 2025-10-23 16:03:00 +03:00
Anders Semb Hermansen
22d23b148e fix(js-sdk): add missing query param to deleteLineItem jsdoc (#13835) 2025-10-23 09:02:05 -04:00
Adrien de Peretti
d51ae2768b chore(workflow-engine-*): cleanup and improvements (#13789)
**What**
Cleanup recent work on workflows
2025-10-23 10:50:24 +00:00
Frane Polić
90162ebeac fix(medusa): images recreate on product update (#13813) 2025-10-23 09:32:34 +02:00
William Bouchard
fe4e7481a9 feat(order,dashboard): version order credit lines (#13766)
* feat(): version order credit lines

* undo last change

* adjust where

* remove date on ui

* Create five-donuts-obey.md

* add test

* nit comment

* woops
2025-10-22 10:26:05 +02:00
Sebastian Rindom
bad0858348 fix: prevent jobId collisions on workflow step retries (#13786)
## Summary

**What** — What changes are introduced in this PR?

This PR fixes a bug where async workflow steps with retry intervals would get stuck after the first retry attempt due to Bull queue jobId collisions preventing retry jobs from executing.

**Why** — Why are these changes relevant or necessary?  

Workflows using async steps with retry configurations (e.g., `retryInterval: 1`, `maxRetries: 5`) would fail once, schedule a retry, but the retry job would never execute, causing workflows to hang indefinitely.

**How** — How have these changes been implemented?

**Root Cause:** Bull queue was rejecting retry jobs because they had identical jobIds to the async execution jobs that already completed. Both used the format: `retry:workflow:transaction:step_id:attempts`.

**Solution:** Modified `getJobId()` in `workflow-orchestrator-storage.ts` to append a `:retry` suffix when `interval > 0`, creating unique jobIds:
- Async execution (interval=0): `retry:...:step_id:1`
- Retry scheduling (interval>0): `retry:...:step_id:1:retry`

Updated methods: `getJobId()`, `scheduleRetry()`, `removeJob()`, and `clearRetry()` to pass and handle the interval parameter.

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

Added integration test `retry-interval.spec.ts` that verifies:
1. Step with `retryInterval: 1` and `maxRetries: 3` executes 3 times
2. Retry intervals are approximately 1 second between attempts
3. Workflow completes successfully after retries
4. Uses proper async workflow completion pattern with `subscribe()` and `onFinish` event

---

## Examples

```ts
// Example workflow step that would previously get stuck
export const testRetryStep = createStep(
  {
    name: "test-retry-step",
    async: true,
    retryInterval: 1, // 1 second retry interval
    maxRetries: 3,
  },
  async (input: any) => {
    // Simulate failure on first 2 attempts
    if (attempts < 3) {
      throw new Error("Temporary failure - will retry")
    }
    return { success: true }
  }
)

// Before fix: Step would fail once, schedule retry, but retry job never fired (jobId collision)
// After fix: Step properly retries up to 3 times with 1-second intervals
```

---

## Checklist

Please ensure the following before requesting a review:

- [ ] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [ ] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable

---

## Additional Context
-

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-10-21 18:27:21 +00:00
Pepijn
5df903f5fb Added shipping method data to tax module context (#13747) 2025-10-21 13:36:29 -04:00
Nathan John
17fb3e2e10 feat(payment-stripe): merge custom metadata along with session_id on payment initiation (#13801)
* Merge custom metadata along with session_id on payment initiation

* update changeset
2025-10-21 13:35:13 -04:00
Adrien de Peretti
2d1d51a2af fix(test-utils): Duplicated subscribers re insertion (#13798)
* fix

* Create pink-boats-type.md
2025-10-21 16:00:48 +02:00
debashish
a34fcfab35 fix(): Remove redundant indexes to resolve schema warnings (#13736)
Fixes #13735

### What

This Pull Request introduces new database migrations to remove multiple redundant indexes across several core modules, including product, cart, order, customer, and inventory.

### Why

As detailed in issue #13735, a fresh Medusa installation produces numerous "Duplicate Index" warnings. These legacy indexes add unnecessary write overhead and provide no performance benefit. This PR cleans up the schema to resolve these warnings and improve database health.

### How

I have added one new, reversible migration file for each of the five affected modules:
- `@medusajs/product`
- `@medusajs/cart`
- `@medusajs/order`
- `@medusajs/customer`
- `@medusajs/inventory`

Each migration's `up()` method safely drops the older, redundant index, and its `down()` method re-creates it, ensuring the change is fully reversible and non-destructive.


### Testing

I have tested these migrations by following the local development workflow outlined in the `CONTRIBUTING.md` guide.

1.  **Setup:**
    *   Cloned my forked Medusa repository locally .
    *   Created a separate, fresh test project using `npx create-medusa-app@latest my-medusa-store`.
    *   The test project's PostgreSQL database, which already contained the schema with the duplicate indexes.

2.  **Linking Local Source Code:**
    *   In the test project's `package.json`, I modified all `@medusajs/*` dependencies and resolutions to point to the local packages in my forked repository (e.g., `"@medusajs/product": "file:../medusa/packages/modules/product"`).
    *   From the test project's directory, I ran `yarn install` to link the local, modified Medusa source code into its `node_modules`.

3.  **Build & Migration:**
    *   Inside my forked Medusa repository, I ran `yarn build` to compile the new TypeScript migration files.
    *   From the root of the **test project**, I then executed the migration command: `npx medusa migration run`.

4.  **Verification:**
    *   The command successfully identified and ran only the new migration files I had created.
    *   I also confirmed via direct SQL queries that the old, redundant indexes were correctly dropped from all affected tables (`product_collection`, `customer_group`, etc.).
2025-10-21 13:50:10 +00:00
Shahed Nasser
d9249be6e6 chore: fixes to refund reasons tsdocs (#13796) 2025-10-21 15:05:30 +03:00
github-actions[bot]
e47f0d0271 chore: Version Packages (#13545)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-21 09:24:59 +02:00
Shahed Nasser
150aa50397 feat(tax,types): Add method to retrieve a Tax Module Provider's service (#13784)
## Summary

**What** — What changes are introduced in this PR?

Add a method in the Tax Module's servie to retrieve a provider by its ID.

**Why** — Why are these changes relevant or necessary?  

The Tax Module Provider could be used for use cases other than calculating tax lines. For example, Avalara supports importing products to manage product-specific taxes. However, it's not possible right now to listen to the `product.created` event and create the product in Avalara with its provider. Instead, you'll have to create a separate module that also connects to Avalara and resolve it in the subsriber.

This also matches the pattern in the Analytics Module, which allows retrieving the underlying provider.

**How** — How have these changes been implemented?

Add a `getProvider` method to the Tax Module's service and its interface.

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

Added integration test for the method.

---

## Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.  
This helps with documentation and ensures maintainers can quickly understand and verify the change.

```ts
const avalaraProvider = taxModuleService.getProvider("tp_avalara_avalara")
```

---

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [x] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.
2025-10-20 16:18:48 +00:00
Adrien de Peretti
516f5a3896 fix: workflow async concurrency (#13769)
* executeAsync

* || 1

* wip

* stepId

* stepId

* wip

* wip

* continue versioning management changes

* fix and improve concurrency

* update in memory engine

* remove duplicated test

* fix script

* Create weak-drinks-confess.md

* fixes

* fix

* fix

* continuation

* centralize merge checkepoint

* centralize merge checkpoint

* fix locking

* rm only

* Continue improvements and fixes

* fixes

* fixes

* hasAwaiting will be recomputed

* fix orchestrator engine

* bump version on async parallel steps only

* mark as delivered fix

* changeset

* check partitions

* avoid saving when having parent step

* cart test

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-20 15:29:19 +02:00
Frane Polić
2d45ba7be1 fix(draft-order): email reset when changing customer (#13771) 2025-10-19 10:40:20 +02:00
Stevche Radevski
ee1c77a01f feat: Add support for multiple active keys at a time (#13754) 2025-10-16 10:07:08 +02:00
William Bouchard
8642d41aac fix(dashboard): add error message in toaster on product delete (#13756)
* fix(dashboard): add error message in toaster on product delete

* Create fuzzy-icons-hope.md

* add description instead
2025-10-15 14:13:28 -04:00
William Bouchard
4e3090ab26 chore(core-flows): send error on csv parsing error (#13749)
* chore(core-flows): send error on csv parsing error

* Create two-dragons-visit.md
2025-10-14 15:24:13 -04:00
docloulou
459fbcdf99 feat(medusa,dashboard): Add support for configurable additional columns in entity views (#13566)
This pull request enhances the entity column generation logic in the admin views by adding support for including fields from additional GraphQL types, specifically for the `orders` entity. The changes allow more flexible and comprehensive column definitions by pulling in fields from related types (like `OrderDetail`) and updating the filtering and type resolution logic accordingly.

**This adding payment_status & fulfillment_status from OrderDetail in view configuration feature**

**Entity column generation enhancements:**

* Added the `ADDITIONAL_ENTITY_TYPES` mapping to specify extra GraphQL types whose fields should be included for certain entities (currently, `OrderDetail` for `orders`). ([packages/medusa/src/api/admin/views/[entity]/columns/helpers.tsR260-R263](diffhunk://#diff-ce197feb4e4d1273d9ee19126e284b65fdb4367f0871774a75add5c8cd749d02R260-R263))
* Updated the column generation process to collect fields from both the main entity type and any additional types, while properly filtering out arrays and excluded fields. ([packages/medusa/src/api/admin/views/[entity]/columns/helpers.tsR340-R345](diffhunk://#diff-ce197feb4e4d1273d9ee19126e284b65fdb4367f0871774a75add5c8cd749d02R340-R345), [packages/medusa/src/api/admin/views/[entity]/columns/helpers.tsR373-R414](diffhunk://#diff-ce197feb4e4d1273d9ee19126e284b65fdb4367f0871774a75add5c8cd749d02R373-R414))
* Changed field lookup logic to use a unified `entityFields` object and a new `additionalFieldDefinitions` map for extra fields, ensuring correct type info resolution for all columns. ([packages/medusa/src/api/admin/views/[entity]/columns/helpers.tsL344-R354](diffhunk://#diff-ce197feb4e4d1273d9ee19126e284b65fdb4367f0871774a75add5c8cd749d02L344-R354), [packages/medusa/src/api/admin/views/[entity]/columns/helpers.tsL411-R463](diffhunk://#diff-ce197feb4e4d1273d9ee19126e284b65fdb4367f0871774a75add5c8cd749d02L411-R463))
2025-10-14 12:13:03 +00:00
William Bouchard
a61d1825ea fix(utils,core-flows): fix import erasing tags, categories and others (#13724)
* fix(utils,core-flows): fix import erasins tags, categories and others

* Create pink-pumpkins-sin.md

* fix changeset

* fix tests
2025-10-14 08:08:20 -04:00
Oli Juhl
b5ecdfcd12 feat: Add allocation method type ONCE (#13700)
### What
Add a new `once` allocation strategy to promotions that limits application to a maximum number of items across the entire cart, rather than per line item.

### Why
Merchants want to create promotions that apply to a limited number of items across the entire cart. For example:
- "Get $10 off, applied to one item only"
- "20% off up to 2 items in your cart"

Current allocation strategies:
- `each`: Applies to each line item independently (respects `max_quantity` per item)
- `across`: Distributes proportionally across all items

Neither supports limiting total applications across the entire cart.

### How

Add `once` to the `ApplicationMethodAllocation` enum.

Behavior:
- Applies promotion to maximum `max_quantity` items across entire cart
- Always prioritizes lowest-priced eligible items first
- Distributes sequentially across items until quota exhausted
- Requires `max_quantity` field to be set

### Example Usage

**Scenario 1: Fixed discount**
```javascript
{
  type: "fixed",
  allocation: "once",
  value: 10,        // $10 off
  max_quantity: 2   // Apply to 2 items max across cart
}

Cart:
- Item A: 3 units @ $100/unit
- Item B: 5 units @ $50/unit (lowest price)

Result: $20 discount on Item B (2 units × $10)
```

**Scenario 2: Distribution across items**
```javascript
{
  type: "fixed",
  allocation: "once",
  value: 5,
  max_quantity: 4
}

Cart:
- Item A: 2 units @ $50/unit
- Item B: 3 units @ $60/unit

Result:
- Item A: $10 discount (2 units × $5)
- Item B: $10 discount (2 units × $5, remaining quota)
```

**Scenario 3: Percentage discount - single item**
```javascript
{
  type: "percentage",
  allocation: "once",
  value: 20,         // 20% off
  max_quantity: 3    // Apply to 3 items max
}

Cart:
- Item A: 5 units @ $100/unit
- Item B: 4 units @ $50/unit (lowest price)

Result: $30 discount on Item B (3 units × $50 × 20% = $30)
```

**Scenario 4: Percentage discount - distributed across items**
```javascript
{
  type: "percentage",
  allocation: "once",
  value: 15,         // 15% off
  max_quantity: 5
}

Cart:
- Item A: 2 units @ $40/unit (lowest price)
- Item B: 4 units @ $80/unit

Result:
- Item A: $12 discount (2 units × $40 × 15% = $12)
- Item B: $36 discount (3 units × $80 × 15% = $36, remaining quota)
Total: $48 discount
```

**Scenario 5: Percentage with max_quantity = 1**
```javascript
{
  type: "percentage",
  allocation: "once",
  value: 25,         // 25% off
  max_quantity: 1    // Only one item
}

Cart:
- Item A: 3 units @ $60/unit
- Item B: 2 units @ $30/unit (lowest price)

Result: $7.50 discount on Item B (1 unit × $30 × 25%)
```
2025-10-14 11:01:00 +00:00
Oli Juhl
1d2b4566fd chore: Ensure refund doesn't exceed captured amount (#13744)
* wip

* chore: prepare for PR

* move to end

* Change order of operations in refundPaymentWorkflow

Updated the order of operations in the refundPaymentWorkflow.

* chore: Add validation
2025-10-13 22:09:46 +02:00
Frane Polić
723dc082f0 fix(dashboard): campaign budget labels improvements (#13740)
* fix(dashboard): budget labels and remove promo code

* fix: sidebar label

* fix: update translation
2025-10-13 18:49:12 +02:00
Shahed Nasser
379d763e50 chore: general TSDoc updates (#13742) 2025-10-13 14:27:19 +03:00
Shahed Nasser
958b003a11 chore: add since tags for latest release (#13739) 2025-10-13 11:24:51 +03:00
Shahed Nasser
fc2ded4b10 fix(core-flows): fix warning for when usage in updateOrderTaxLinesWorkflow (#13738)
When starting the Medusa application i see the following in the console:

```
update-order-tax-lines: "when" name should be defined. A random one will be assigned to it, which is not recommended for production.
 ({ input }) => {
        return input.item_ids?.length > 0;
    }
update-order-tax-lines: "when" name should be defined. A random one will be assigned to it, which is not recommended for production.
 ({ input }) => {
        return input.shipping_method_ids?.length > 0;
    }
```

This PR fixes the issue by passing a step name as a first parameter to the `when` usages in `updateOrderTaxLinesWorkflow`
2025-10-13 08:22:22 +00:00
Shahed Nasser
a48ee395ed chore: added TSDocs to refund reason HTTP type (#13717) 2025-10-13 11:17:36 +03:00
Nicolas Gorga
137b237c84 feat(medusa): export feature flag configs (#13714)
* Export feature-flags

* Add changeset

---------

Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
2025-10-10 11:14:28 -04:00
Patel Aryan Saurabhkumar
a1c56d29d0 fix(dashboard): replace native select Element in CountrySelect & ProvinceSelect with Select(Medusa UI). (#13521)
* fix: replace CountrySelect fallback with Medusa Select

* Country Select Component Fix to use Medusa UI Select Component

* added Change set

* using the props supported by the Select

* value should be lowercased if passed from the pareant component

* fix province Select with medusa UI select and added change set

* bug fix the province with providing

---------

Co-authored-by: Aryan Patel <21cs038@charusat.edu.in>
Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
2025-10-10 10:22:51 -04:00
Adrien de Peretti
c54c5ed6de chore(): improve cart operations + Mikro orm 6.4.16 (#13712)
* chore(): Mikro orm 6.4.16

* Create small-ghosts-draw.md

* update config

* update config

* fix delete

* update config

* update workflows

* order improvements

* test pricing quuery

* test pricing quuery

* configurable connection options

* configurable connection options

* configurable connection options

* Update packages/modules/pricing/src/models/price.ts

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-10 08:58:19 +02:00
Nicolas Gorga
76bf364440 fix(js-sdk): pass headers to auth.refresh() (#13690)
Fixes #13689
2025-10-09 16:58:17 +00:00
Frane Polić
c6896ffa6a fix(dashboard): campaign UI improvements (#13723)
* fix(dashboard): campaign UI improvements

* fix: camel case translation key
2025-10-09 16:15:26 +02:00
Frane Polić
7dc3b0c5ff feat(core-flows,dashboard,js-sdk,promotion,medusa,types,utils): limit promotion usage per customer (#13451)
**What**
- implement promotion usage limits per customer/email
- fix registering spend usage over the limit
- fix type errors in promotion module tests

**How**
- introduce a new type of campaign budget that can be defined by an attribute such as customer id or email
- add `CampaignBudgetUsage` entity to keep track of the number of uses per attribute value
- update `registerUsage` and `computeActions` in the promotion module to work with the new type
- update `core-flows` to pass context needed for usage calculation to the promotion module

**Breaking**
- registering promotion usage now throws (and cart complete fails) if the budget limit is exceeded or if the cart completion would result in a breached limit

---

CLOSES CORE-1172
CLOSES CORE-1173
CLOSES CORE-1174
CLOSES CORE-1175


Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2025-10-09 12:35:54 +00:00
William Bouchard
924564bee5 fix(core-flows): customer id filter not working in getOrderDetails (#13695)
As discussed, fixed the get order detail and also changed the remotequery to graph a bunch of workflows
2025-10-09 12:13:12 +00:00
William Bouchard
82f3b0413a fix(dashboard): export with filters not working (#13711)
* fix(dashboard): export with filters not working

* page size

* own cr

* Create tiny-beans-poke.md
2025-10-09 08:00:06 -04:00
Shahed Nasser
85f543e01d chore: fixes to Caching Module's TSDocs (#13709) 2025-10-09 13:09:51 +03:00
Adrien de Peretti
0cbd9f0bc3 chore(): Improve caching rollout (#13702)
* chore(): Improve caching rollout

* Create bright-cobras-complain.md

* chore(): Improve caching rollout

* downgrade orm to 6.4.3

* chore(): Improve caching rollout

* chore(): Improve caching rollout

* chore(): Improve caching rollout

* chore(): Improve caching rollout

* chore(): Improve caching rollout

* fix

* update changeset

* update modules definition

* update engine tests

* update engine tests

* improve integration

* improve integration

* gracefully disconnect

* update test

* another attempt

* another attempt

* fix workflow storage

* fix remote joiner

* fix remote joiner

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-08 17:44:00 +02:00