Skip to content
  • There are no suggestions because the search field is empty.

Use Custom Fields with InfoPlus API and Scripts

Insert, update, and search custom field values as part of syncing data from your system into InfoPlus.

Is This What I'm Looking For? 

Use this article when you need to send data from your own system into InfoPlus custom fields, change those values later, or find records by them. The API and scripts expect a specific format, and small mistakes (like passing the wrong name) cause calls to fail or update nothing. This article does not cover creating custom fields in InfoPlus.

 

Before You Begin

  • Create the custom fields on the table first. Scripts can’t create new custom fields. See Create / Edit Custom Fields.
  • Have your InfoPlus API key ready.
  • If you’re using scripts, you should know the basics. See Introduction to InfoPlus Scripts.
  • Know the exact name of each custom field you want to use. Names must match what is set up on the table.
  • Know the record type name for your table. Record type names start with a lowercase letter, use camel case, and are singular. For example: zone, order, orderLine, item. The Shipment table is the exception: use parcelShipment, not shipment.

 

How Custom Fields Work in the API

Custom fields let you store extra data on any InfoPlus table. You can see and edit them when you view a table or a single record. You can also use them to search.

Here is what you need to know:

  • InfoPlus supports 5 data types: String (up to 250 characters), Integer, Decimal, Boolean, and Date.
  • You can have up to 20 custom fields of each data type on each table.
  • Custom fields are the same across all of your Lines of Business.

In the API, every table has a customFields object. Its keys match the names of the custom fields on that table.

The examples in this article use the Warehouse Zone table with two custom fields: priority and nickname. When you use these examples, replace zone with your table’s record type name, and replace priority or nickname with your own custom field names.

A zone record from the API looks like this:

{
   "id": 7,
   "name": "Down Forward",
   "customFields":
   {
      "priority": 1,
      "nickname": "Forward"
   },
   ...
}

 

Insert a Record with Custom Fields

Using the API: 

Include the customFields object in the JSON you send with your POST request. InfoPlus saves the values with the new record.

POST /infoplus-wms/api/beta/zone 
{
   "name": "Back Storage",
   "customFields":
   {
      "priority": 10,
      "nickname": "Back"
   }
}

This adds a new zone with both custom fields filled in.

Using a Script: 

To insert and save a custom field through a Script:

zone.customFields.put("priority", 10);
infoplusApi.updateCustomFields("zone", record)

 

Update Custom Fields on a Record

Using the API: 

Send a PUT request to the customFields endpoint for your table. If you use an API version other than beta, replace beta in the path. 

PUT /infoplus-wms/api/beta/zone/customFields
{
   "id": 7,
   "customFields": { "priority": 1 }
}

This updates only the priority field on the zone with id 7.

Keep these rules in mind:

  • Your request must include the record’s primary key and the customFields object. For the Zone table, the primary key is the id field.
  • Only the custom fields you include get updated. Any you leave out stay the same.
  • This endpoint does not change any other fields on the record.

Using a Script:

Set the new value, then save it with updateCustomFields. The first value you pass is the record type name, not the custom field name. The second is the record. 

zone.customFields.put("priority", 1);
infoplusApi.updateCustomFields("zone", zone);

 

Search by Custom Fields

Using the API:

Add your custom field to the filter parameter. Put custom. in front of the field name. This example finds all zones with a priority less than 5: 

GET /infoplus-wms/api/beta/zone/search?filter=custom.priority lt 5

Using a Script:

Use infoplusApi.search with the same filter format. 

var zones = infoplusApi.search(
    "zone",                    // record type
    "custom.priority lt 5",    // filter
    1,                         // page number
    100,                       // limit (records per page)
    "name"                     // sort
);

This returns up to 100 zones. If more match, change the page number to get the next set.

To read a custom field value from a record in a script:

zone.customFields.get("priority");

 

What You Should See

Go to the table you updated. For these examples, Go to Zone table. Open the record or view the table. The new custom field values should update immediately.

 

Troubleshooting

If your Shipment script or API call can’t find the record type:

Why this happens: The Shipment table’s record type name is parcelShipment.

How to fix it: Use parcelShipment instead of shipment.

 

Next Steps