Artifi.Get Customized Product By User Id (integrationValues)

Artifi.GetCustomizedProductByUserId(integrationValues)


If your e-commerce website needs all the product details customized by particular user, pass user id to this method, This method will return all customized product details.


Gets details of all product which is saved or added to cart by particular user. This method requires user id and website id.


For example, If any user saved/added to cart 10 products, This operation will give details of that 10 products.


Operation call back the JavaScript method specified in "successCallback" parameter with data of complete product information with order details of product created by specified user.


Request Information

Parameters

NameDescription
integrationValues

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

 

userId

This will be the Id of your e-commerce website's user. The user can be registered or guest user.

If the user is registered, pass the user id in this parameter and if the user is not registered with your ecommerce website,

create a temporary id for the user and pass that temporary id in this parameter.

The non registered user will be called as guest user. This will be the unique user id.

The method will return the product customized by the user whose id specified in this parameter.

 

websiteId

This is the website with which customized product 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 specified customized product is associated should be specified in this parameter.

 

webApiclientKey

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. 

 

orderStatus [Optional]: 

This is the string of the order status to be updated in Artifi.

This value need to be provided from Artifi.Constant constants only having 'orderStatus_' as suffix of the key. 

 

successCallback

This method returns the complete information of the customized product by user id is specified in "userId" parameter and pass this information to the JavaScript method.

You have to create the success handler i.e., JavaScript method to collect this customized product information, pass that JavaScript method name to this parameter.

Specified JavaScript method will get called when method returns success as response.

 

errorCallback

You have to create the error handler (a JavaScript method) for this "GetCustomizedProductByUserId" method.

If any error occurs during the process of getting customized product, this error handler will get called.

You have to specify that error handler JavaScript method name in this parameter. Specified JavaScript method will get called when method returns error as response.



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":null,
    "Data":
    {
    "UserId":115,
    "WebSiteId":107,
    "ProductVariantId":null,
    "ProductId":456,
    "Title":"",
    "Description":"",
    "OrderStatus":"InProgress",
    "OrderNotes":null,
    "CustomDesignModelList":
    [
    {
    "CustomizedProductId":657,
    "DesignTemplate":"
    {
    \"objects\":[],\"background\":\"\"}",
    "SVGUniqueName":null,
    "ThumbnailImageUniqueName":"8348facf-b8b1-4fdf-9c9a-dccff0f75f07.png",
    "ImageUniqueName":"8348facf-b8b1-4fdf-9c9a-dccff0f75f07.png",
    "ThumbnailImagePath":null,
    "ImagePath":null,
    "ViewId":1415,
    "DesignJsonVersion":"1.0.1",
    "List":null,
    "Id":1417,
    "LoginUserId":null
    }
    ],
    "CustomAttributeModelList":null,
    "CustomizedProductModelList":null,
    "IsGuest":null,
    "FrontAppUserId":null,
    "DivisionId":4,
    "CompanyId":4,
    "EditExistingDesign":null,
    "UserReferrer":"",
    "UserIP":"::1",
    "UserAgent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0",
    "InitializationMode":"IFrame",
    "ClipartIdList":null,
    "UserPhotoIdList":null,
    "ColorIdList":null,
    "FontIdList":null,
    "Id":657,
    "LoginUserId":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.