You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
updateUser
Update customer profile in SAP Commerce Cloud.
This method exchanges data with the updateUser endpoint exposed by the SAP OCC API Users Controller.
This method works only in an authenticated user session (i.e. when the vsf-sap-token cookie is present in the request). It only updates the fields provided in the user param.
Bear in mind the SAP OCC API updateUser endpoint does not allow for updating customer uid (login) and so does not this method.
Signature
export declare function updateUser(
context: SapccIntegrationContext,
props: UpdateUserProps
): Promise<void>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SapccIntegrationContext | |
props | Required | UpdateUserProps | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
Returns
This method does not return anything.
Referenced Types
Examples
Updating a customer profile.
import { UpdateUserProps } from '@vsf-enterprise/sapcc-types';
import { sdk } from '~/sdk';
const props: UpdateUserProps = {
user: {
firstName: 'John',
lastName: 'Doe'
}
}
await sdk.commerce.updateUser(props);