On a customer, it’s possible to add free fields (properties) associated with your business.
The description of the free fields must first be defined with the SELL&SIGN support (Key Definition) to incorporate it in your customer schema.
With your unique customer number, you can retrieve or assign values to free fields.
- Retrieve customer-specific properties.
- Create or change the value of a free field Customer.
Retrieve a customer’s properties
This url provides a list of all the properties of a client specified by their unique number.
https://[host]/calinda/hub/selling/model/customerproperty/list?action=getCustomerPropertyListFor&[parameters]
Required Parameters:
- number: customer number (see Customer creation)
Example:
https://cloud.sellandsign.com/calinda/hub/selling/model/customerproperty/list?action=getCustomerPropertyListFor&number=Mi4xNDg4MTkxMjM2NjAwLjk1Nzg0
Return:
{
"id": 225881,
"key": "address",
"value": "Quai Rive Neuve",
"customerNumber": "Mi4xNDg4MTkxMjM2NjAwLjk1Nzg0",
..
},
{
"id": 225882,
"key": "zip_code",
"value": "13560",
"customerNumber": "Mi4xNDg4MTkxMjM2NjAwLjk1Nzg0",
..
},
{
"id": 225883,
"key": "city",
"value": "SENAS",
"customerNumber": "Mi4xNDg4MTkxMjM2NjAwLjk1Nzg0"
..
}
id: corresponds to the unique reference of the property (key)
key: key of the specific field
value: its value
customerNumber: customer reference
Create or modify a specific property of a Customer
The same method is used to create or update the fields of a specific property. If the property identifier is specified, then the property will be updated. If this identifier is equal to -1, then the property is created and attached to the specified customer.
http://[host]/calinda/hub/selling/model/customerproperty/update?action=getOrCreateCustomerProperty&[parameters]
Required parameters:
- customer_number: customer number (see customer creation)
- key: code of the specific property
- value: value of the key
- id: for a creation, specify -1 / for an update, specify the property identifier (a long integer)
Example:
Modify the value of the property, ‘city’?
https://cloud.sellandsign.com/calinda/hub/selling/model/customerproperty/update?action=getOrCreateCustomerProperty&customer_number=Mi4xNDkxOTIxMDAwNDI1LjY0ODM3&key=city&value=LA%20BAS&id=225887
Return:
{
"id": 225887,
"key": "city",
"value": "LA BAS",
"customerNumber": "Mi4xNDkxOTIxMDAwNDI1LjY0ODM3",
"syncTimer": 1495784112126,
"lastModificationPlace": "SERVER"
}