Update UserId



This operation is used to change/update user id with the new user id. This operation requires an old user id, new user id, and is guest (To determine whether the user is guest or registered). This operation updates the user id of existing user id.

The user of an e-commerce website can be registered or a guest user. If the user is not registered with Ecommerce website, it will be treated as a guest user.

Both of the users will have a unique id. The guest user will have a temporary id.

If the guest user customizes the product and adds it to the cart, Artifi will maintain its record as a guest user.

When the guest user checkouts the product, the Ecommerce website will ask the user to register with the website. The user will register and Ecommerce will create a unique id of the user and at that time.

The old id of the user will be replaced with the newly created id in Artifi. To replace it, Ecommerce will need to call the "UpdateUserId" method.

Request Information



WebsiteId (INT)

This is the website associated with customized products.

The admin user of Artifi can create one or more websites and assign products to each of them. The ID of the website with which specified customized products are associated should be specified in this parameter.

WebApiClientKey (STRING)

When any company registers with Artifi, Artifi will generate a special and unique key for that company, which will be called the client key.

This client key can be found in the registered company's profile tab in the Artifi Account.

The client key will be used for client (company) authentication and will be referred to as WebApiClientKey.

newUserId (STRING)

This will be the id of the user after registering with your e-commerce website.

oldUserId (STRING)

This will be the old id of the user when the user was a guest. The product data will be saved across this user id in Artifi.

isGuest (BOOLEAN)

This is the unregistered user who has access to Artifi for customization.

Response Information

Response body formats

On Success

On success, this method will call back the JavaScript method in the website which is specified in "successCallback" parameter with following information.


    "Response": "Success",

    "Message": "User id updated successfully.",

    "Data": null,

    "ErrorCode": null


On Error

On error, this method will call back the JavaScript method in the website which is specified in "errorCallback" parameter with error information.


    "Response": "Error",

    "Message": "Invalid oldUserId.",

    "Data": null,

    "ErrorCode": "232"


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.