Strategic IT Consulting and Implementation Services

Workaround for the Jitterbit Harmony Studio with NetSuite Custom Segments Issue

I’ve run Jitterbit Harmony with various integrations for a few years now and have had no issues until recently selecting Custom Segment objects from NetSuite for searches, upserts, etc. I’m unsure if NetSuite 2019.1 changes, the NetSuite API changes, or recent versions of Jitterbit Harmony Agents and Studio have caused the recent problems around the inability to select NetSuite Custom Segment records or what. But, as of now, I am unable to query NetSuite Custom Segments natively in the Studio user interface. If you use NetSuite with Jitterbit and are not having issues selecting Custom Segments for projects, that is great. I’ve created cases and had multiple remote sessions with Jitterbit Support and there is not a fix that they can provide.

So, I had to try and figure something out since a few key integrations needed to be put in place between NetSuite and Saleforce. The good news, in my case, was that I was able to harvest some past setups and projects where I had created and saved some querys/searches in Jitterbit Studio for a couple of our Custom Segments. That ability to pull project data allowed me to hang-on a little longer while I waited for Jitterbit to try and fix this issue that started to pop-up around the later 9.x versions of Agent and Studio.

The problem essentially is that when you go to create a new NetSuite Connector Search, you should receive all objects you have access to in your NetSuite instance. This usually includes all standard and custom objects. Of course, if there are permission restrictions for the user or token-based connection setup you are using, you will be limited on what is sent back. This has been the case for me over the last couple of years until now for some reason. Because Jitterbit Harmony Studio requires you to select an object from the returned, and parsed list, you can only move forward with your integration operation if you can select the object you want. If it is not there, then you cannot select it and you cannot continue.

In the screenshot below, you should be able to select the “Revenue ID” custom segment. It’s in our NetSuite system, it was sent back to render in the XML query Jitterbit Harmony Studio does post-connection. But, it’s not present.

NetSuite sends the list of objects back, but Jitterbit Harmony Studio doesn’t render them all if they are Custom Segments

Of course, the initial concern is that the NetSuite system is NOT sending back the objects due to a permissions limitation or change. NetSuite, around 2019.1, started to restrict APIs and Admin connections with MFA and that also essentially required a shift to token-based authentication which initially was thought to be the issue. It was just weird though since it has worked for years but all of a sudden now it’s not. Also, in the NetSuite integrations log, you can obtain an XML dump of what the system is sending to the Jitterbit connection on query for the objects and see that NetSuite is sending all the possible objects correctly. If it was a permissions issue, then NetSuite would NOT be sending the objects at all for Jitterbit Harmony Studio to render for the Studio user. Also, in harvesting past saved queries, the objects those NetSuite connector queries used still worked even though you could not find them again if you went through the Harmony Studio new query “wizard” select process.

The takeaway here is that the objects are still there, they are still accessible, and past saved queries still work even with all the version and security changes with Jitterbit Harmony Agents and Studio along with the changes to the API on the NetSuite side.

After numerous tries with Jitterbit Support to resolve the issue, I tried a Linux Agent (to see if it could have been just a Windows Agent bug) but that didn’t work but I still needed to get these new queries and operations going. I decided to try and go into the project file data and see if I could hack the XML in the Jitterbit Harmony Studio saved projects to see if I could redirect the naming of the saved queries to the custom segment objects I needed.

It worked. Here is what I did to at least get around the issue that I hope Jitterbit will correct in future versions once they get a handle on it. But, I couldn’t wait for that and I wasn’t ready to trash all of the time and production integrations I have running with Harmony.

WARNING: Do not attempt this unless you know what you are doing-ish.

Jitterbit does not expect (or want you) going into project files and editing the XML output the Studio generates. It could have dire consequences, so don’t do this unless you are really confident and/or really motivated to get this going.

1. In Jitterbit Studio project, create a NetSuite Search off the NetSuite Connector or right-click copy to duplicate an existing search. Rename it to something that makes sense. Save it and deploy right after. This saves an XML file for that search in the project folder. We’ll edit it manually outside of Studio to point to the custom segment.

2. Find your local Jitterbit Studio user directory where your projects are saved locally. I’m on Windows so my location is: C:\Users\myuser\JitterbitStudio

3. Quit the Jitterbit Studio app. It probably doesn’t make any difference, but I’m unsure when the program loads these files so best to just not try and fight that refresh or write operation.

4. In your file explorer, go into the Jitterbit Studio directory, then into the ‘projects’ subdirectory to get to the project from step 1.

5. Under an env###/Data folder in that project, you will have a NetSuite Query directory that will have some XML files in it. One of them is the one you created or duplicated in Step 1. Find it.

NetSuite Query saved searches from Jitterbit Studio in XML.

6. Find the saved search detailed in one of your files by opening the XML files one by one in an editor like Notepad ++ or your text editor of preference.

7. Once inside the specific XML file, change the object name designation from the one you created or duplicated in Studio to the one you want. There should be two places to replace. The xsd file will not exist yet but change them both.

NetSuite Query XML file from Jitterbit Studio for a Custom Segment ‘Employee_ID”

8. If you have a space in the custom segment name in NetSuite, use an underscore. Spaces in the object name in Jitterbit Harmony seem to cause issues (even though there might be spaces in the NetSuite custom segment name. Also, notice in the example, the ‘(custom)’ prefix needed for the object name reference. This is important to include.

9. Save the updated XML, and go back into Jitterbit Studio and into the project.

10. Go to the save search reference under the NetSuite connector and open it up. Confirm it is now referencing the object name you manually edited in the above few steps. Even though Jitterbit see this now as the values, the supporting metadata of the object fields, etc. are wrong. You can force a rebuild by clicking the refresh button on the upper-right of the window when viewing the query.

Check the object reference on the left and push the refresh on the upper right to rebuild the object structure

11. After you rebuild/refresh, if all goes well, you should get a proper list of fields now on the custom segment you forced Jitterbit to see again. From here, you can go create a new operation and/or response.

12. If you have other custom segments, you can repeat this process as many times as needed.

Hope this helps as a workaround for now until Jitterbit addresses this in a future release. It could be related to a bug with custom segments with spaces in it or something else, I don’t know. If you are not affected by this, that is even better!

About the author

Jonathan Mergy

4 comments

  • This is a great article! There is an easier way to find the file name for the XML that you need to modify. Inside the saved search definition, click the little white triangle in the upper right hand corner and select “Additional details…”. The GUID you see there will the name of the file with an XML extension.

    • Hey awesome. Thank you for reading and posting to help others on this. I’m fully now into getting up to speed on CloudStudio so I haven’t been doing much new on the Desktop app studio and I copied-out all my custom segment queries, so I haven’t had to do this much but this is a great help! Good eye.

  • Hi Jonathan – life saver! I got stuck with the same issue, also in my case I needed to upsert records in the custom segment in Netsuite, not only query them. Your workaround worked like a charm, and I had tried absolutely everything, so thank you ever so much for taking the work to write this article.

    When I contacted Jitterbit support, this is the furthest I got – couldn’t try this solution because we don’t have a private agent, but maybe it is of help for someone in the same situation:

    “It seems to be an issue with the cloud agent that is not supporting the custom object and its field to be viewed in the NetSuite Activity. However, if you have a private agent, then we can manually edit the NetSuite config.file and add the object and its custom fields. Please refer to the steps below:
    1. In the netsuite.config.file, you will need to add under :
    Example:

    CustomSegments
    otherCustomField

    2. Then, you will need to delete the Studio cache, eg. location: C:\Users\Your_User\JitterbitStudio\cache\7.1\ConnectorObjectCache\NetSuite
    and then try again.”

    Thanks again!

    • Danny – thank you for posting. Often times I feel like I am from another planet when stuff like this happens and no one else seems to understand or even hope to be able to help. So, posting this in the hope of having others that come across this kind of stuff know they are not alone and it can be fixed is very reassuring. Taking the time to post a reply is awesome. Thank you!

Strategic IT Consulting and Implementation Services