Currently, the "Attributes" parameter is exposed on the following endpoints.
Endpoint
Customer
CustomerContract
Inventory
Project
Supplier
Setting the attributes for other assets works in the same way as for e.g. customer.
To set Attributes on Customers and Inventory Items you first need to
Create the attributes in the UI.
Assign the attributes to the Customer/Inventory etc. Classes respectively.
Assign the class to the Customer/Inventory Item you want to use them on.
Set the values of the attributes.
1. Creating the attributes:
You can do this in the Attributes screen(ScreenId=CS205000):
2. Assigning the attributes to the class:
Customer
You can either reach the customer classes by
Going to screen ScreenId=AR2010PL
Clicking on the pen next to the class in the customer card:
Here you then add attributes based on the attributes you have created in the attributes screen.
Inventory
You can either find the Item classes by:
Going to the Item class screen(ScreenId=IN201000)
Or clicking in the pen next to the Item class in the Inventory screen:
Same as for customer, you can add attributes here based on the attributes you have created in the Attributes screen.
3/4. Setting the attributes and their values
When this has been done, you can under the Attributes tab add the attributes from the classes the Customer/Inventory belongs to and set their values:
Using the attribute parameter via the API
To use these attributes, below is the syntax to use in your query:
Filtering on several attributes.
{{base}}/inventory?attributes={"AttributeID1":"ValueID1","AttributeID2":"ValueID2"}
Filtering on date time
{{base}}/inventory?attributes={"DATETIME":"2019-04-19"}
Filtering on text. It will not match partial strings. only exact string.
{{base}}/inventory?attributes={"TEXT":"long text to filter upon"}
Filtering on True/False
{{base}}/inventory?attributes={"ACTIVE":"1"}
With special case for Multiple selection combo: {{base}}/inventory?attributes={"AttributeID":"ValueID1,ValueID2"}
When encoding your query, the "equal sign" should not be encoded, below is an example for the customer endpoint and accepted forms of encoding it:
Customer Endpoint:
GET {baseUrl}customer?attributes={"DATETEST":"2019-01-01","TEST":"testvalue"}
Encoded: (both encoding examples below are accepted)
customer?attributes=%7B"DATETEST":"2019-01-01","TEST":"testvalue"%7D
customer?attributes=%7B%22DATETEST%22%3A%222019-01-01%22%2C%22TEST%22%3A%22testvalue%22%7D
Inventory Endpoint
Inventory?attributes={"TEST":"testvalue"}
Encoded: (both encoding examples below are accepted)
inventory?attributes=%7B"TEST":"testvalue"%7D
inventory?attributes=%7B%22TEST%22%3A%22testvalue%22%7D
... View more