User Defined Fields (UDFs) are customized fields that extend the standard fields in a CRM instance. They allow users to tailor their CRM to specific needs.
Supported UDF Types
You can create the following UDF types using the Octopus API:
-
AlphaNumeric
- Use
MaxLength
attribute to specify the maximum allowed character length\
- Use
-
Numeric
- Use
DecimalPlaces
attribute to define precision\
- Use
-
YesNo\
-
Date\
-
Table
- Use
MultiSelect
attribute to determine whether multiple values can be selected from that table Udf at once.\
- Use
UDF Management
UDFs are managed through the Schema object. Creating a UDF involves creating a schema for a customized field. Each UDF is associated with an object type, specified by the AppliesTo
field.
Object Types Supporting UDFs
Currently, UDFs can be applied to the following object types:
-
AbEntry (sub-types can be applied individually)
-
Company\
-
Contact\
-
Individual\
-
-
Lead\
-
Opportunity\
-
Case\
-
Campaign\
Organizing UDFs
For objects that support UDFs, fields can be organized into folders. For guidance on folder organization, refer to the "Folders" object documentation.
HowTo's
Udf Schema Definition for Table Items
Udf Table Items - Read
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
// Use the object which the Udf belongs/applies to
// and also the actual Udf type (using Udf/$TYPE(<id>))
// or name (using Udf/$NAME(<name>) to read the items
"AbEntry": {
"FieldOptions": {
"Udf/$NAME(My Table Udf)": [
{
"Key": 1,
"Name": 1
}
]
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Udf Table Items - Add
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
// Use the object which the Udf belongs/applies to
// and also the actual Udf type (using Udf/$TYPE(<id>))
// or name (using Udf/$NAME(<name>) to make changes to items.
// note: key: null is added here just for convenience, so we
// can retrieve the code that is automatically generated for
// the new item(s) being added
"AbEntry": {
"FieldOptions": {
"Udf/$NAME(My Table Udf)": [
{
"Key": null,
"Name": "newitem1"
},
{
"Key": null,
"Name": "newitem2"
},
{
"Key": null,
"Name": "newitem3"
}
]
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Udf Table Items - Change
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
// Use the object which the Udf belongs/applies to
// and also the actual Udf type (using Udf/$TYPE(<id>))
// or name (using Udf/$NAME(<name>) to make changes to items.
"AbEntry": {
"FieldOptions": {
"Udf/$NAME(My Table Udf)": [
{
"Key": "1",
"Name": "updateditem1"
},
{
"Key": "2",
"Name": "updateditem2"
},
{
"Key": "3",
"Name": "updateditem3"
}
]
},
"Options": {
"Modify": true // modify existing items, must specify key
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Udf Table Items - Replace
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
// Use the object which the Udf belongs/applies to
// and also the actual Udf type (using Udf/$TYPE(<id>))
// or name (using Udf/$NAME(<name>) to make changes to items.
// note: key: null is added here just for convenience, so we
// can retrieve the code that is automatically generated for
// the new item(s) being added
// note: any existing Udf table item will be deleted when
// replaced, this will also cause the deletion of ALL values
// associated with the replaced items
"AbEntry": {
"FieldOptions": {
"Udf/$NAME(My Table Udf)": [
{
"Key": null,
"Name": "replaceditem1"
},
{
"Key": null,
"Name": "replaceditem2"
},
{
"Key": null,
"Name": "replaceditem3"
}
]
},
"Options": {
"Replace": true // delete all existing items and replace with the new ones defined here
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Udf Table Items - Remove
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
// Use the object which the Udf belongs/applies to
// and also the actual Udf type (using Udf/$TYPE(<id>))
// or name (using Udf/$NAME(<name>) to remove items.
// note: removing Udf table items also removes ALL values
// associated with it
"AbEntry": {
"FieldOptions": {
"Udf/$NAME(My Table Udf)": [
{ "Key": "1" },
{ "Key": "2" },
{ "Key": "3" }
]
},
"Options": {
"Remove": true // remove existing items, must specify key
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Create Udf Schema Definition by Type
Create Udf - AlphaNumeric
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": null,
"Type": "StringField",
"Name": "My AlphaNumeric Udf",
"AppliesTo": [
"Company", "Individual", "Contact"
],
"Inactive": false,
"Attributes": {
"MaxLength": 254
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Create Udf - Date
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": null,
"Type": "DateTimeField",
"Name": "My Date Udf",
"AppliesTo": [
"Company", "Individual", "Contact"
],
"Inactive": false
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Create Udf - Numeric
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": null,
"Type": "NumericField",
"Name": "My Numeric Udf",
"AppliesTo": [
"Company", "Individual", "Contact"
],
"Inactive": false,
"Attributes": {
"DecimalPlaces": 3
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Create Udf - YesNo
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": null,
"Type": "EnumField<StringItem>",
"Name": "My YesNo Udf",
"AppliesTo": [
"Company", "Individual", "Contact"
],
"Inactive": false,
"Attributes": {
"MultiSelect": false,
"YesNo": true
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Create Udf - Table (without items)
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": null,
"Type": "EnumField<StringItem>",
"Name": "My Table Udf",
"AppliesTo": [
"Company", "Individual", "Contact"
],
"Inactive": false,
"Attributes": {
"MultiSelect": true
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Work with Udf Folders
Udf Folder CRUD
Read Udf Folder
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"Folder": {
"Scope": {
"Fields": {
"Key": 1,
"Name": 1,
"Path": 1,
"ParentFolderKey": 1,
"Inactive": 1
}
},
"Criteria": {
"SearchQuery": {
"AppliesTo": {
"$IN": [
"Company", "Individual", "Contact"
]
}
}
}
},
"Compatibility": {
"FolderObject": "1.0"
},
"Configuration": {
"Drivers": {
"IFolderSearcher": "Maximizer.Model.Access.Sql.FolderSearcher"
}
}
}
Create Udf Folder
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Folder": {
"Data": {
"Key": null,
"AppliesTo": [
"Company", "Individual", "Contact"
],
"Name": "My Udf Folder",
"ParentKey": "VWRmU2V0dXAJMA==" // root folder
}
},
"Compatibility": {
"FolderObject": "1.0"
},
"Configuration": {
"Drivers": {
"IFolderAccess": "Maximizer.Model.Access.Sql.FolderAccess"
}
}
}
Update Udf Folder
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
"Folder": {
"Data": {
"Key": "VWRmU2V0dXAJNTg=",
"Name": "My Udf Folder Updated",
"ParentKey": "Um9vdEZvbGRlcgkw" // specify another parent folder to "move" folders
}
},
"Compatibility": {
"FolderObject": "1.0"
},
"Configuration": {
"Drivers": {
"IFolderAccess": "Maximizer.Model.Access.Sql.FolderAccess"
}
}
}
Delete Udf Folder
// POST https://api.maximizer.com/octopus/Delete
// Authorization: Bearer <token>
{
"Folder": {
"Data": {
"Key": "VWRmU2V0dXAJNTg="
}
},
"Compatibility": {
"FolderObject": "1.0"
},
"Configuration": {
"Drivers": {
"IFolderAccess": "Maximizer.Model.Access.Sql.FolderAccess"
}
}
}
HowTo's
Create Udf Definition under specific Folder
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": null,
"Type": "StringField",
"Name": "My AlphaNumeric Udf",
"AppliesTo": [
"Company", "Individual", "Contact"
],
// FolderKey to put the new Udf. Will be created
// under Root folder if not specified.
"Folder": "VWRmU2V0dXAJOA==",
"Inactive": false,
"Attributes": {
"MaxLength": 254
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
MetaData
Read Udf Schema Definition metadata (simple)
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"Schema": {
"Scope": {
"Fields": 1
},
"Criteria": {
"SearchQuery": {
"Key": {
"$TREE": "/Schema"
}
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Read Udf Schema Definition metadata (more)
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"Schema": {
"Scope": {
"Fields": {
"Key": 1,
"Alias": 1,
"Type": 1,
"Name": 1,
"AppliesTo": 1,
"Sortable": 1,
"Nullable": 1,
"Assignable": 1,
"Queryable": 1,
"Mandatory": 1,
"Attributes": 1,
"HasOption": 1,
"DisplayValue": 1
}
},
"Criteria": {
"SearchQuery": {
"Key": {
"$TREE": "/Schema"
}
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
User Defined Fields Schema Definition CRUD
Udf Schema Definition - Read
// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
"Schema": {
"Scope": {
"Fields": {
"Key": 1,
"AppliesTo": 1,
"Folder": 1,
"TAG": 1,
"RequestedBy": 1,
"Inactive": 1,
"Mandatory": 1,
"Formula": 1,
"Alias": 1,
"Type": 1,
"Name": 1,
"Nullable": 1,
"ReadOnly": 1,
"Attributes": 1,
"Queryable": 1,
"Sortable": 1,
"HasOption": 1
}
},
"Criteria": {
"SearchQuery": {
"Key": {
// Change based on object you want to retrieve Udf from
"$EQ": "/AbEntry/Udf/$TYPEID(1)"
}
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Udf Schema Definition - Create
// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": null,
"AppliesTo": [
"Company", "Individual", "Contact"
],
"Name": "My AlphaNumeric Udf",
"TAG": "My AlphaNumeric Udf TAG",
"Inactive": false,
"Type": "StringField",
"Attributes": {
"MaxLength": 254
}
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Udf Schema Definition - Update
// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": "/AbEntry/Udf/$TYPEID(1)",
"Name": "My AlphaNumeric Udf Updated",
"TAG": "My AlphaNumeric Udf TAG Updated" // Can only be changed if there is no value defined yet
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}
Udf Schema Definition - Delete
// POST https://api.maximizer.com/octopus/Delete
// Authorization: Bearer <token>
{
"Schema": {
"Data": {
"Key": "/AbEntry/Udf/$TYPEID(1)"
}
},
"Compatibility": {
"SchemaObject": "1.0"
}
}