[Not Assigned] user when adding a contact note via XML-RPC API

Hello. I am trying to add a contact note via XML-RPC API. So. I am making a Data service request (DataService.add) to table ContactAction.
When I send UserID - a note is saved with correct assigned user but also falls into Tasks section.
When I don’t send UserID - a note is saved without assigned user and falls only in Notes section.
The desired behaviour is to add a note with assigned user without having it duplicated in Tasks section.
Also I’ve discovered that when I add a contact note via API - it does not have values in LastUpdated and LastUpdatedBy fields. The same for DataService.update request. But when I add a note via Infusionsoft web-interface - it has these values. Maybe that’s the problem?
I am asking Infusionsoft developers to answer and help.

1 Like

The DataService allows what amounts to direct access to the database, but isn’t clear about the business rules involved, which means it’s easy to stumble on magic numbers that we expose in a more well-reasoned manner in the REST API. Fortunately, we just completed work on the Notes endpoint, and are waiting on QA/release cycle for it to make the process easier.

In the meantime, the magic mixture for ContactActions is:

if (hasActionDate && !hasEndDate) {
     if (hasCompletionDate) {
          Note
     } else {
          Task
     }
} else if (hasEndDate && !hasCompletionDate) {
          Appointment
} else {
          Note
}

Though the table contains fields that “could” apply, the settings/values for those fields can change what the record actually shows up as in the UI. A note does not require a user id to be specified as the user is assigned as the owner on the contact record. A user id is only required on a task or appointment. So that is one of the fields that actually determines what type of record it is.