Skip to content

Miscellaneous Web Services Quirks

iloveitaly edited this page Nov 21, 2014 · 9 revisions

General

  • The SOAP API uses the GUI logic. If you are getting a random error, try replicating the same operation in the GUI and see if you can get it to work. Often there are configuration options or scripts that will prevent you from being able to complete the task on the GUI side
  • Minimum pageSize for searching is 5
  • The phone field has a 21 character limit. This will cause a fatal error if not respected
  • The first name field has a 33 character limit. This will cause a fatal error if not respected

Tasks

  • If you assign a contact without a company on a task, creating the task will fail with Invalid contact reference key CONTACT_INTERNAL_ID for company <NULL>.
  • If you assign a contact with a company (customer) whose does not have you listed as a contact it will fail with Invalid contact reference key CONTACT_INTERNAL_ID for company CUSTOMER_INTERNAL_ID.
  • The ContactList field on a Task comes in as very strange XML when both a contact & a customer are specified. In the GUI, only customers are listed, but in the SOAP the assigned contact will be listed as well.

Sales Order

  • The custom_form field will effect what you can set other fields to. For instance, a custom form could filter certain items from the item list in the GUI. If you try to add those filtered items into the sales order via Web Services you'll get a missing item error (NOT a "this item is not available for this custom form" error... NS errors are often unintuitive and don't actually report what the problem is).

Customer

  • internalId on CustomerAddressbook records are handled differently that most internalIds on records.
    • it's an element, not an attribute
    • if you have a CustomerAddressbook's internalId and include it in your update call the internalId will not change on the CustomerAddressbook. If replaceAll is true this causes CustomerAddressbooks that have an internalId which matches an existing internalId to not be replaced.

API Versions

  • NS will change the XML structure without notice. The only way to reliably detect changes between versions is to diff the XSDs for various objects.
  • If something is randomly not working, or returning a completely illogical error message, don't worry. That's normal. Check the user groups to see if someone else has encountered the same error. It just might be a NS Web Services bug that they won't fix.