Artifi.Update UserId (integrationValues)

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

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

Both of the user will have a unique id. Guest user will have a temporary id.

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

When the guest user checkout the product, your website will ask the user to register with your e-commerce website. The user will register and you will create a unique id of the user at that time.

Now you will need to replace the old id of the user with newly created id in Artifi. To do this, you will need to call "UpdateUserId" method.

Request Information



integrationValues should be the object and should contain the Artifi data, which will include the following values. This values are not case sensitive. 



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



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



This is the website created in Artifi account by your ecommerce website, with which user is associated

Admin user of Artifi can create one or more websites and assign products to each of the website.

The Id of the website with which user is associated should be specified in this parameter.



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

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

This client key will be used for client(company) authentication and will be called as WebApiClientKey. 



Current status of the user, whether the user is registered or guest.



After this operation i.e., updating user id, this operation will return the response,

if the response will be positive, a JavaScript method, specified in this parameter will get called.

If you want to perform some operation on the success of this method, create a JavaScript method and pass name of the method in this parameter.



Similar to successCallback, you have to provide name of the JavaScript method that is to be called if this operation i.e., updating user id fails.

Response Information

Response body formats

On Success

On success, this method will call back the JavaScript method in 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 website which is specified in "errorCallback" parameter with error information.

Did you find it helpful? Yes No

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