missing primary contact block for new organizations without first/last names

Home Forums General Issues missing primary contact block for new organizations without first/last names

This topic contains 1 reply, has 2 voices, and was last updated by  Colin Pizarek 3 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #920

    Kevin Horan
    Participant

    For newly created organizations which do not have a first or last name set, the retrieveOrganizationAccount URL does not return a primaryContact block in the resulting JSON code. This makes it impossible to retrieve other information, such as the address, email, or phone numbers. Since it is legal in neon to enter an organization without a first and last name, this part of the API should also work.

    For example, when I first enter an organization without a first or last name and then fetch it with the URL

    https://api.neoncrm.com/neonws/services/api/account/retrieveOrganizationAccount?userSessionId=xxxx&accountId=115633

    I get this result:

    {
      "retrieveOrganizationAccountResponse": {
        "operationResult": "SUCCESS",
        "responseDateTime": "2016-04-15T20:06:56.812+0000",
        "organizationAccount": {
          "createdDateTime": "2016-01-26T16:27:20.000+0000",
          "createdBy": "Kevin Horan",
          "lastModifiedDateTime": "2016-01-26T16:27:20.000+0000",
          "lastModifiedBy": "Kevin Horan",
          "accountId": 115633,
          "noSolicitation": false,
          "url": "",
          "customFieldDataList": {
            "customFieldData": [
              {
                "fieldId": "67",
                "fieldValue": "1269"
              },
              {
                "fieldId": "65",
                "fieldValue": "Not-active"
              }
            ]
          },
          "source": {
            
          },
          "organizationName": "Protestant Chaplain Fund",
          "organizationTypes": {
            "organizationType": [
              {
                "id": "5",
                "name": "Corporate Donor"
              }
            ]
          }
        }
      }
    }

    This organization DOES have an address, but it is no where in the result.

    I then go into NeonCRM and add a first name in the primary contact of this organization and run the very same URL, then I get this:

    {
      "retrieveOrganizationAccountResponse": {
        "operationResult": "SUCCESS",
        "responseDateTime": "2016-04-15T20:08:02.718+0000",
        "organizationAccount": {
          "createdDateTime": "2016-01-26T16:27:20.000+0000",
          "createdBy": "Kevin Horan",
          "lastModifiedDateTime": "2016-04-15T20:07:59.000+0000",
          "lastModifiedBy": "Kevin Horan",
          "accountId": 115633,
          "primaryContact": {
            "contactId": 260801,
            "firstName": "removeme",
            "lastName": "",
            "middleName": "",
            "prefix": "",
            "suffix": "",
            "salutation": "",
            "preferredName": "removeme",
            "email1": "",
            "deceased": false,
            "addresses": {
              "address": [
                {
                  "addressId": 89183,
                  "isPrimaryAddress": true,
                  "isShippingAddress": false,
                  "addressType": {
                    "id": "2",
                    "name": "Business"
                  },
                  "addressLine1": "12th ABG\/HC",
                  "addressLine2": "",
                  "addressLine3": "",
                  "addressLine4": "",
                  "city": "Randolph AFB",
                  "state": {
                    "code": "TX",
                    "name": "TEXAS"
                  },
                  "province": "",
                  "zipCode": "78150",
                  "zipCodeSuffix": "5000"
                }
              ]
            },
            "department": "",
            "title": ""
          },
          "noSolicitation": false,
          "url": "",
          "customFieldDataList": {
            "customFieldData": [
              {
                "fieldId": "67",
                "fieldValue": "1269"
              },
              {
                "fieldId": "65",
                "fieldValue": "Not-active"
              }
            ]
          },
          "source": {
            
          },
          "organizationName": "Protestant Chaplain Fund",
          "organizationTypes": {
            "organizationType": [
              {
                "id": "5",
                "name": "Corporate Donor"
              }
            ]
          }
        }
      }
    }

    Now, if I now go back to that account and remove the first name (which I had set to ‘removeme’), and then run the same URL, then I DO get a primary contact block, with the first and last name fields blank. So this is the correct result, but it does not work for newly created organizations. I have to first set some dummy data into the primary account, and then remove it before the API functions correctly.

    • This topic was modified 3 years, 6 months ago by  Kevin Horan.
    #922

    Colin Pizarek
    Keymaster

    Yes, I agree that this method should always return the entire Primary Contact object, even if empty.

    The reason this issue is happening is because at one point, NeonCRM did require that the first and last name were populated for organization accounts. The architecture changed, but this API method was not updated to reflect this particular situation.

    I’ve submitted this issue to our development team to be scheduled for a fix. I’ll update this forum thread once I have more information. Thanks for bringing it to our attention.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.