Links between Customer Module and Other Modules
This document showcases the module links defined between the Customer Module and other Commerce Modules.
Summary#
The Customer Module has the following links to other modules:
First Data Model | Second Data Model | Type | Description |
|---|---|---|---|
Stored - many-to-many | |||
Cart in Cart Module | Read-only - has one | ||
Read-only - has one |
Payment Module#
Medusa defines a link between the Customer and AccountHolder data models, allowing payment providers to save payment methods for a customer, if the payment provider supports it.
v2.5.0.Retrieve with Query#
To retrieve the account holder associated with a customer with Query, pass in :
Manage with Link#
To manage the account holders of a customer, use Link:
Cannot create multiple links between 'customer' and 'payment' error. To transfer an account holder to a different customer, remove the existing link first, then create the new one.Cart Module#
Medusa defines a read-only link between the Cart Module's Cart data model and the Customer data model. Because the link is read-only from the Cart's side, you can only retrieve the customer of a cart, and not the other way around.
Retrieve with Query#
To retrieve the customer of a cart with Query, pass customer.* in fields:
Order Module#
Medusa defines a read-only link between the Order Module's Order data model and the Customer data model. Because the link is read-only from the Order's side, you can only retrieve the customer of an order, and not the other way around.
Retrieve with Query#
To retrieve the customer of an order with Query, pass in :