Improve performance with large numbers of addresses for profiles or accounts
When a Commerce environment includes a large number of profile or account addresses, performance can suffer on the storefront and in the administration interface when searching for and working with addresses.
This section applies to Storefront Classic only.
This section describes API features that you can use to improve performance when working with a large number of profile or account addresses.
Filter endpoint results with query parameters
Several query parameters for Admin, Store, and Agent API endpoints let you search for specific addresses. In a Commerce environment includes a large number of profile or account addresses, these query parameters help you filter addresses that are returned in endpoint responses.
The Agent API listAddresses
, and searchProfiles
endpoints and the Store API getAddresses
and listProfileAddresses
endpoints, and the Admin API listAddresses
endpoint all support these query parameters.
For details about the query parameters, supported by these endpoints, see the REST API for Oracle Commerce documentation. For details about how to use query parameters in a request, see REST API query parameters.
Exclude addresses from endpoint responses
If you want to exclude secondary addresses and shipping addresses from endpoint responses that would normally return them, use the updateCloudConfiguration
endpoint in the Admin API to set the excludeAddressList
property to true
. By default, excludeAddressList
is set to false
.
The following Admin API endpoints are affected by setting the excludeAddressList
property to true
: createOrganization
, updateOrganization
, listOrganizations
, getOrganization
, listProfiles
, getProfile
, updateProfile
, getOrganizationRequest
, and updateOrganizationRequest
.
The following Store API and Agent API endpoints are affected by setting the excludeAddressList
property to true
: getOrganization
, updateOrganization
, listOrganizations
, getProfile
, updateProfile
, getMember
, listMembers
, updateMember
, createMember
, getAddresses
, deleteAddress
, getPage
, getCloudConfiguration
, and getOrganizationRequest
(Agent API only).
Because address details are not included in a number of endpoint responses when you set excludeAddressList
to true
, widgets that retrieve addresses from the responses of endpoints listed above may not behave as expected and may require customization.
For example, the Agent Console account-addresses.js
widget's fetchAddressesSuccess()
method expects secondaryAddresses
to be present. When secondaryAddresses
are suppressed from the endpoint response, the widget throws an error.
- For account-based commerce shoppers,
checkout-address-book.js
should be modified to fetch the addresses based on the secondary addresses. Update the widget to retrieve addresses using the/ccagent/v1/profiles/{id}/addresses
endpoint. - For individual shoppers, addresses should be loaded using the
/ccagent/v1/addresses
endpoint. - Make sure that
updatedShippingAddressBook
is not accessed without validating whether address data exists in thecart-shipping-details.js
widget.