I am trying to use AI Connector Service but so far...
# ai-netsuite
n
I am trying to use AI Connector Service but so far no luck. I have checked the docs but I am still not sure what to do. Any help is appreciated. Do I need to enable any feature? I tried the MCP permission but couldn't find it in the list.
r
Hey @NickSuite did you download the suiteapp?
n
Oh...no
Doing that now.
r
👍
n
MCP Tools?
👍 1
r
1. Install SuiteApp 2. Make a role with the permissions you want Claude to have access to. Including “MCP Server Connection” permission. 3. Make sure you have the features enabled - Review this: https://suiteanswers.custhelp.com/app/answers/detail/a_id/1021122 - Answer ID1021122 and Answer ID1021115 4. Follow these steps - Answer ID1021119. This is missing the correct url for all. Use this for all tools your role has permission for https://_companyid_suitetalk.api.netsuite.com/services/mcp/v1/all 5. In Claude pro, go to new chat, click on the “search and tools” icon and make sure your NetSuite connector shows like this:
n
Installed.
Which feature?
r
I’ll add it in above
Should look like this when it’s fully setup in Claude pro
n
Installed SuiteApp. Feature is already enabled. Gave myself the MCP permission - but I also have Admin role..
r
Should have something like this when you have connected correctly. In Claude pro, go to settings, connectors, go to your NetSuite custom connector and click “Configure”. Then you should have “Tools” listed. The tools correlate to the custom role’s permissions.
@NickSuite you will need a new role, admin isn’t useable for this setup.
👍 1
n
Do I need custom tool script as well?
r
@NickSuite no you shouldn’t need any custom tool script of any kind
Happy to hop on a screensharing call if you need
n
Thanks @Ryan Longenecker for the help. I will let you know if more assistance is required.
e
@Ryan Longenecker Have you played around with the Custom Tool scripts at all? I've been working through the documentation but am hitting a wall
r
Hey @ericbirdsall are you referring to this part of the setup? - Returns only the custom tools exposed by the specified SuiteApp. The structure of <_appid_> is: <_vendor_prefix_>.<_project_name_> where <_vendor_prefix_> could be, for example, “com.netsuite”, and <_project_name_>, for instance, “mcptools”.
👍 1
e
r
Hey @ericbirdsall I haven’t and not sure if I fully understand it’s capabilities tbh ha
Could be a good thing to post in here as a new thread or in #C29HQS63G
e
No worries -thanks for the reply. I posted in #C29HQS63G and did get some answers!
r
@ericbirdsall nice keep me posted. Not sure what’s possible with it so would love to hear how you use it
n
What's the puropose of custom script tool when you have to do the implementation of the function? To create agents?
@ericbirdsall
e
@NickSuite So, the "out of the box" connector has access to a short list of "predefined tool" (Article Here) All of these are just suitescript functions- ex: getSalesOrder is really just a function that loads a specific Sales Order, and pulls data from it. (I'll include NetSuites actual code below) So with custom script tools. You can build whatever functions you want, and then expose them so they can be used from within Claude
Copy code
getSalesOrder: function (params) {
      var orderId = params.orderId;
      if (!orderId) {
        return { error: "Missing order ID" };
      }
      try {
        var salesOrder = record.load({
          type: record.Type.SALES_ORDER,
          id: orderId,
        });

        // Get header fields
        var result = {
          id: orderId,
          tranId: salesOrder.getValue("tranid"),
          customerId: salesOrder.getValue("entity"),
          customerName: salesOrder.getText("entity"),
          date: salesOrder.getValue("trandate"),
          status: salesOrder.getValue("status"),
          poNumber: salesOrder.getValue("otherrefnum"),
          memo: salesOrder.getValue("memo"),
          salesRep: salesOrder.getValue("salesrep"),
          salesRepName: salesOrder.getText("salesrep"),
          total: salesOrder.getValue("total"),
          items: [],
        };

        // Get line items
        var lineCount = salesOrder.getLineCount({
          sublistId: "item",
        });

        for (var i = 0; i < lineCount; i++) {
          result.items.push({
            line: i + 1,
            itemId: salesOrder.getSublistValue({
              sublistId: "item",
              fieldId: "item",
              line: i,
            }),
            itemName: salesOrder.getSublistText({
              sublistId: "item",
              fieldId: "item",
              line: i,
            }),
            quantity: salesOrder.getSublistValue({
              sublistId: "item",
              fieldId: "quantity",
              line: i,
            }),
            rate: salesOrder.getSublistValue({
              sublistId: "item",
              fieldId: "rate",
              line: i,
            }),
            amount: salesOrder.getSublistValue({
              sublistId: "item",
              fieldId: "amount",
              line: i,
            }),
            description: salesOrder.getSublistValue({
              sublistId: "item",
              fieldId: "description",
              line: i,
            }),
          });
        }

        return JSON.stringify(result);
      } catch (error) {
        return {
          error: `Error getting sales order ${orderId}: ${error.toString()}`,
        };
      }
    },
The provided an example for a "custom tool" and the functions are "add" and "reverseText" If you see the end of this thread, Matt was able to get the example one working and was able to have Claude reverse the text that he sent to it. Now these are obviously not helpful/real world examples. But this gives devs A LOT of freedom to build some crazy stuff.
r
What would be a general example of something not built in but would be very useful to add that claude couldn’t do on it’s own?
e
Sky's the limit. Maybe you're an accountant and you could ask Claude "what was the balance of X account at the end of Q3 this year?"
Maybe you're in the warehouse and ask "We're running low on SKU ABC, when do we expect more to arrive?"
r
From what I’ve seen this is possible with the “runCustomSuiteQL” tool
e
^ very well could be. I haven't played around with it enough to say 100% yes or no
r
“runCustomSuiteQL” seems to be able to answer any query thrown at it
Maybe it might be useful in custom record interaction or creation
so then you could interact with them via claude
e
Without sharing any sensative data, could you let me know some of the examples you've asked using the reunCustomSuiteQL tool?
r
@ericbirdsall Prompts I have used so far: - “What are great questions I can ask to get a view of someone’s entire NetSuite account as a consultant?” - (Claude provided a long list of answers) - Run these all through and give me a comprehensive business overview” - “Look for all the text messages that have been sent out and whats the most common 5 phrases?” (Using Sinch MessageMedia NetSuite SMS) - Claude provided a complete SMS Text Message Analysis. - “Looking at all the current data available, what option makes the most sense for this company, an exit or to go public?” - “Look at my account and let know what other features I’m not utilizing and what would make a huge impact on our business?”
e
And answers have very promising?
r
100%
It’s insane ha
e
Good to know. I'm trying to figure out if there is a way to have some of our non-NetSuite users utilize this as well. Maybe using 1 generic login on the NetSuite side and having multiple Claude accounts connect to the same login... ?
----100% limiting them to read access----
r
hmm not sure tbh, it seems like the connection to claude is for one user into one claude account so some sharing of login info into Claude would be needed
e
Ahh gotcha. Was hoping this would be a good way to get a ton of non-NetSuite users to have read access to NetSuite data
r
Good idea @ericbirdsall. Maybe with some sort of Claude pro business account you could maybe share connectors?
thisred 1
Sharing Connectors: • For team and enterprise plans, administrators can manage and share custom connectors within their organization.
e
Have you been able to give it "normal" company names and get back the correct data? ex: "What date was the last Sales Order for Bobs Burgers?" Or do you have to actually specify the Customer ID of 12345?
r
Let me try
@ericbirdsall looks possible!
Prompt: “Can you provide a comprehensive overview of the customer named, Ryan Customer?”
e
yeah that's huge. That's with the
runCustomSuiteQL
tool?
Feels like the real power is that you can type "natural language" and Claude / (the mcp?) is able to write a valid NS query with it. I tried to build something like this using N/llm and it was a dumpster fire meow dumpster fire
r
@ericbirdsall exactly it’s really amazing. I can also see the other tools being great for connecting other systems and having claude create customers etc in NetSuite. This is going to be the new Celigo connector if you connect it all in the right way. N/llm is also cool to get data saved into NetSuite fields from the projects I have done.
cheers 1
l
for me why only one tool is showing as RunCustomSuiteQL? But not other, I am missing something?
r
@Lucas its dependent on the role permissions. I was told to customize the CFO role it get a lot more
l
Ohk, ,let me try, and another quick question, can we setup MCP tool in Postman?
r
@Lucas from what I know right now it’s only Claude but I could be mistaken
l
Yes, you’re right. I tried that, but it didn’t work, MCP is only supported for Claude as of now. However, I did read somewhere that someone managed to get it working with Gemini Studio. Not sure how they did it, but I’m looking into that, as well as testing with ChatGPT Playground. Let’s see how it goes.
r
Nice let us know! I don’t know enough about mcp to make it work other places
e
@Lucas keep me posted if you get it working outside of Claude. Would be very eager to learn how
l
@Ryan Longenecker @ericbirdsall see this article @michoel wrote on connecting NetSuite MCP in postman, it's working though it's a workaround but working. https://www.linkedin.com/pulse/breaking-open-netsuite-ai-connector-service-from-claude-chaikin-xqagc
🙌 1
r
Nice work @michoel !
l
@ericbirdsall Just implemented a NetSuite MCP AI Assistant using React + MCP + Gemini!✅💯 The MCP integration is solid and the AI responses are working perfectly! 🎯✨
e
Nice! Does that mean you could swap out Gemini for any AI? Or is Gemini somehow crucial to having this work?
l
r
Nice!
e
@Lucas Game changer!
l
Yes..
r
Great job! This collaboration is really cool to keep pushing these features
l
That's true...
e
@Matt Bernstein Check this out - I think you were trying to connect to the MCP server from somewhere other than Claude. Maybe Lucas could explain more of how he did it
That's the piece I'm struggling with- figuring out how to get the credentials to pass (and where to pass them to)
l
I can set up a Git repository for this project if anyone would like...
đź’Ż 1
thisred 1
e
YES
m
@ericbirdsall it requires some manual intervention currently unless @Lucas has figured out a way to automate it since netsuite hasn’t opened up the MCP scope on the integration record
l
Sure, will do, once done will let you know..
FYI, I’m using "MCP" as the scope to obtain the proper access token from the token endpoint, which should work with the NetSuite MCP endpoints. The MCP scope in NetSuite isn’t exposed in the UI, but it does exist.
m
Correct. We just can’t use our own integration record which means we have to use the existing claude one. We have to take the code from the redirect url (manual intervention) and then pull the token
âś… 1
s
Hey QQ- Can I use the MCP server and connect it to N8N? I want to build my own chatter that is connected to NetSuite and able to retrieve data based on natural questions.
r
@michoel ⬆️