The action creates a new customer address with the given address information.
If you would like to get a raw Response object use the other createAddressForCustomerInCustomerList function.
An object containing the options for this method.
A promise of type Customers.CustomerAddress.
The action creates a new customer address with the given address information.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddress otherwise.
Action to create a new customer. The customer is created using the specified customer number, credentials, and customer information. This action verifies the following:
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
If you would like to get a raw Response object use the other createCustomerInCustomerList function.
An object containing the options for this method.
A promise of type Customers.Customer | Customers.Customer.
Action to create a new customer. The customer is created using the specified customer number, credentials, and customer information. This action verifies the following:
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.Customer | Customers.Customer otherwise.
Action to create a new customer. The customer is created using the specified credentials and customer information. This action verifies the following:
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
If you would like to get a raw Response object use the other createCustomerList function.
An object containing the options for this method.
A promise of type Customers.Customer.
Action to create a new customer. The customer is created using the specified credentials and customer information. This action verifies the following:
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.Customer otherwise.
Deletes the customer, including all related information like the customer addresses.
If you would like to get a raw Response object use the other deleteCustomerFromCustomerList function.
An object containing the options for this method.
A promise of type void.
Deletes the customer, including all related information like the customer addresses.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Action that returns a single customer address from a customer list.
If you would like to get a raw Response object use the other getAddressForCustomerFromCustomerList function.
An object containing the options for this method.
A promise of type Customers.CustomerAddress.
Action that returns a single customer address from a customer list.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddress otherwise.
Action that returns a pageable list of all customer addresses. The default page size is 10 customer addresses.
If you would like to get a raw Response object use the other getAddressesForCustomerFromCustomerList function.
An object containing the options for this method.
A promise of type Customers.CustomerAddressResult.
Action that returns a pageable list of all customer addresses. The default page size is 10 customer addresses.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddressResult otherwise.
Action to get customer information.
If you would like to get a raw Response object use the other getCustomerFromCustomerList function.
An object containing the options for this method.
A promise of type Customers.Customer.
Action to get customer information.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.Customer otherwise.
Action which deletes a customer address.
If you would like to get a raw Response object use the other removeAddressForCustomerInCustomerList function.
An object containing the options for this method.
A promise of type void.
Action which deletes a customer address.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Search for customer groups in a given Site Id. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:
Attribute | Type |
---|---|
id | String |
description | String |
type | String |
Note: This endpoint is available with the B2C Commerce release 24.2.
If you would like to get a raw Response object use the other searchCustomerGroup function.
An object containing the options for this method.
A promise of type Customers.CustomerGroupSearchResult.
Search for customer groups in a given Site Id. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:
Attribute | Type |
---|---|
id | String |
description | String |
type | String |
Note: This endpoint is available with the B2C Commerce release 24.2.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.CustomerGroupSearchResult otherwise.
Action to search for customers in a customer list. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:
Attribute | Type |
---|---|
customerNo | String |
firstName | String |
secondName | String |
lastName | String |
suffix | String |
salutation | String |
title | String |
fax | String |
phoneHome | String |
phoneBusiness | String |
phoneMobile | String |
String | |
gender | Integer |
companyName | String |
credentials.login | String |
credentials.enabled | Boolean |
If you would like to get a raw Response object use the other searchCustomerInCustomerList function.
An object containing the options for this method.
A promise of type Customers.CustomerSearchResult.
Action to search for customers in a customer list. The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:
Attribute | Type |
---|---|
customerNo | String |
firstName | String |
secondName | String |
lastName | String |
suffix | String |
salutation | String |
title | String |
fax | String |
phoneHome | String |
phoneBusiness | String |
phoneMobile | String |
String | |
gender | Integer |
companyName | String |
credentials.login | String |
credentials.enabled | Boolean |
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.CustomerSearchResult otherwise.
Action which updates an address of a customer with the given address information.
If you would like to get a raw Response object use the other updateAddressForCustomerInCustomerList function.
An object containing the options for this method.
A promise of type Customers.CustomerAddress.
Action which updates an address of a customer with the given address information.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.CustomerAddress otherwise.
Updates the customer with the specified information. The customer number is allowed to be updated but results in a CustomerNumberAlreadyInUseException if there is another customer with the same customer number existing.
If you would like to get a raw Response object use the other updateCustomerInCustomerList function.
An object containing the options for this method.
A promise of type Customers.Customer.
Updates the customer with the specified information. The customer number is allowed to be updated but results in a CustomerNumberAlreadyInUseException if there is another customer with the same customer number existing.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customers.Customer otherwise.
Generated using TypeDoc
Customers
Manage customer information within a customer list.
For instructions on how to retrieve access token for admin APIs: https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html
Example with admin auth
API Version: 0.0.29import { Customer, ClientConfig } from "commerce-sdk"; // or const { Customer, ClientConfig } = require("commerce-sdk"); const clientConfig: ClientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; token = { access_token: 'INSERT_ACCESS_TOKEN_HERE' }; clientConfig.headers['authorization'] = `Bearer ${token.access_token}`; const customersClient = new Customer.Customers(clientConfig);
Last Updated: