### Claude Desktop MCP Configuration File Example - JSON Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Example JSON snippet from a Claude Desktop configuration file (`simple_mcp_config.json`) defining how to launch and configure the Intacct MCP server. ```JSON "intacct-mcp": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/DIRECTORY", "run", "intacct_mcp_stdio.py" ] } ``` -------------------------------- ### Install Dependencies with uv Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Command to install project dependencies listed in the requirements file using the uv package manager. ```bash # Install dependencies using uv uv sync ``` -------------------------------- ### Example Intacct Query Response (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet shows an example response structure from an Intacct query operation. It displays a list of GLBATCH records, including the RECORDNO, STATE, and the related JOURNAL.SYMBOL fields as requested in the query. ```XML 2624 Posted APJ 2625 Posted APJ ... ``` -------------------------------- ### Copy Example Environment File Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Command to copy the template environment file (.env.example) to the active configuration file (.env). ```bash # Copy the example file cp .env.example .env # Edit the .env file with your actual credentials ``` -------------------------------- ### Example Intacct Query Response (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet illustrates the structure of a response from the Sage Intacct `query` function. It includes attributes like `totalcount`, `count`, and `numremaining` providing information about the result set, followed by the start of an entry for an `APBILL` object containing selected fields. ```XML 208 ``` -------------------------------- ### Example JSON-RPC list_tools Request Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md A basic JSON-RPC request object to call the 'list_tools' method, which returns available tools. ```json {"jsonrpc": "2.0", "id": "1", "method": "list_tools"} ``` -------------------------------- ### Example .env File Content Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Structure and placeholder values for the .env file, used to store sensitive Intacct credentials. ```plaintext INTACCT_SENDER_ID=your_sender_id INTACCT_SENDER_PASSWORD=your_sender_password INTACCT_COMPANY_ID=your_company_id INTACCT_USER_ID=your_user_id INTACCT_USER_PASSWORD=your_user_password ``` -------------------------------- ### Sample Query Response (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This is an example of a query response in XML format, including control, authentication, and result elements, containing data for two vendor objects. ```XML success ******* 1234567890 false 3.0 success joe.user Goliath Corp 2022-02-07T20:21:01+00:00 2022-02-08T20:21:01+00:00 success query a92cb391-6647-494d-bfca-c52d677be181 1010 Ackman, Alice 3797 1009 Halpert, Jim 2987 ``` -------------------------------- ### Example JSON-RPC get_info Request Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md A basic JSON-RPC request object to call the 'get_info' method, which returns server information. ```json {"jsonrpc": "2.0", "id": "1", "method": "get_info"} ``` -------------------------------- ### Sample Query Response (CSV) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This is an example of a query response in CSV format, containing data for two vendor objects without surrounding XML elements. ```CSV RECORDNO,PAYTOCONTACT.CONTACTNAME,TOTALDUE 1010,"Ackman, Alice",3797 1009,"Halpert, Jim",2987 ``` -------------------------------- ### Sample Query Response (JSON) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This is an example of a query response in JSON format, containing data for two vendor objects as an array of objects, without surrounding XML elements. ```JSON [ { "RECORDNO": "1010", "PAYTOCONTACT.CONTACTNAME": "Ackman, Alice", "TOTALDUE": "3797" }, { "RECORDNO": "1009", "PAYTOCONTACT.CONTACTNAME": "Halpert, Jim", "TOTALDUE": "2987" } ] ``` -------------------------------- ### Example JSON-RPC tools/post_xml_to_intacct Request Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md A JSON-RPC request to post XML content to Intacct using the 'tools/post_xml_to_intacct' method, including credentials and the XML payload. ```json { "jsonrpc": "2.0", "id": "1", "method": "tools/post_xml_to_intacct", "params": { "credentials": { "sender_id": "your_sender_id", "sender_password": "your_sender_password", "session_id": "your_session_id" }, "xml_content": "CUSTOMER*", "parse_response": true } } ``` -------------------------------- ### Querying EMPLOYEE - IDs Starting with 'b' (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query uses the LIKE operator with a wildcard (%) to find EMPLOYEE records where the EMPLOYEEID starts with the letter 'b'. ```Intacct Query EMPLOYEEID like 'b%' ``` -------------------------------- ### Example JSON-RPC tools/batch_xml_to_intacct Request (Basic) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md A JSON-RPC request using 'tools/batch_xml_to_intacct' to send multiple XML function elements in a single Intacct API call. ```json { "jsonrpc": "2.0", "id": "1", "method": "tools/batch_xml_to_intacct", "params": { "functions": [ "VENDOR", "APBILL" ], "parse_response": true } } ``` -------------------------------- ### Example XML Data Structure for APBILL Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet provides an example of the data structure used for representing Accounts Payable Bill (APBILL) information within a larger data set. It shows the basic elements like RECORDNO and VENDORNAME for individual bills. ```XML Regal Services 227 Regal Services ``` -------------------------------- ### Example JSON-RPC tools/batch_xml_to_intacct Request (Transaction) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md A JSON-RPC request using 'tools/batch_xml_to_intacct' with the 'transaction' parameter set to true, ensuring all included functions succeed or fail together. ```json { "jsonrpc": "2.0", "id": "1", "method": "tools/batch_xml_to_intacct", "params": { "functions": [ "...", "..." ], "parse_response": true, "transaction": true } } ``` -------------------------------- ### Example JSON-RPC tools/get_intacct_session Request Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md A JSON-RPC request to obtain a new Intacct session ID using the 'tools/get_intacct_session' method, requiring full login credentials. ```json { "jsonrpc": "2.0", "id": "1", "method": "tools/get_intacct_session", "params": { "credentials": { "sender_id": "your_sender_id", "sender_password": "your_sender_password", "company_id": "your_company_id", "user_id": "your_user_id", "user_password": "your_user_password" } } } ``` -------------------------------- ### Batch Create Operations with Transaction in Intacct API (Python) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/claude-system-prompt.md Provides another example of using `batch_xml_to_intacct` to send multiple Intacct API create functions within a transaction. Setting `transaction=True` guarantees atomicity for related record creation. The response is parsed. ```python # Example of creating multiple related records in a transaction functions = [ '...', '...' ] batch_response = batch_xml_to_intacct( functions=functions, parse_response=True, transaction=True # Ensures both succeed or both fail ) ``` -------------------------------- ### Specifying Query Object in XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet demonstrates how to specify the target object for a query using the 'object' element. The example uses 'APBILL', indicating the query will operate on accounts payable bills. ```XML APBILL ``` -------------------------------- ### Querying AP Bills by Vendor Name Starting With 'B' (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML query retrieves AP Bills where the 'VENDORNAME' field starts with the letter 'B'. It uses the 'like' operator with the '%' wildcard character. ```xml APBILL VENDORNAME B% ``` -------------------------------- ### Intacct MCP Batch Response Format - JSON Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Example JSON structure for responses from batch operations, showing an array of results for each function executed in the batch. ```JSON { "status": "success", "batch_results": [ { "status": "success", "function": "query", "controlid": "query1", "data": {} }, { "status": "success", "function": "query", "controlid": "query2", "data": {} } ] } ``` -------------------------------- ### Querying AP Bills with Empty Descriptions and Offset (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML query lists AP Bills with empty descriptions, similar to the previous example, but includes an 'offset' of 5. This skips the first five results returned by the query. ```xml APBILL DESCRIPTION 5 ``` -------------------------------- ### Authenticating with Login - Multi-Entity Shared Company - Sage Intacct API - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/requests.md This example demonstrates authenticating a request for a multi-entity shared company using the `login` element. In addition to user ID, parent company ID, and password, it requires specifying the `locationid` for the target entity. ```XML myUserId myParentCompanyId myPassword entityId ``` -------------------------------- ### Intacct MCP XML Response Format (Default) - JSON Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Example JSON structure when the MCP server returns the raw XML response, typically when `parse_response` is set to `false`. ```JSON { "status": "success", "xml_response": "..." } ``` -------------------------------- ### Querying AR Invoice Items by Item ID and Customer Credit Limit - Intacct XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Lists AR invoice items where the item ID starts with the letter `B` and the customer has a credit limit within the given range. ```XML ARINVOICEITEM ARINVOICE.CUSTOMER.CREDITLIMIT 500 10000 ITEMID B% ``` -------------------------------- ### Querying Intacct Objects with readByQuery (Limit Fields) - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Provides an example of an Intacct 'readByQuery' call that limits the fields returned to improve performance when querying many objects. It queries the 'APBILL' object, selecting only 'RECORDNO' and 'RECORDTYPE', uses an empty 'query' element to return all records (up to the pagesize), and sets a 'pagesize'. ```XML APBILL RECORDNO,RECORDTYPE 25 ``` -------------------------------- ### Paginate Intacct Query Results with readMore (Object Name) - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Demonstrates how to retrieve the next batch of results after an initial 'readByQuery' call using the 'readMore' function. This example uses the object name ('APBILL') within the 'readMore' element to specify which results to continue fetching. ```XML APBILL ``` -------------------------------- ### Paginate Intacct Query Results with readMore (Result ID) - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Shows an alternative and recommended method for retrieving the next batch of results using the 'readMore' function. This example uses the 'resultId' obtained from the initial 'readByQuery' response, which helps ensure consistency when data might be changing or multiple queries are active. ```XML 7765623332WU1hh8CoA4QAAHxI9i8AAAAA5 ``` -------------------------------- ### Intacct MCP Error Response Format - JSON Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Example JSON structure for error responses from the MCP server or Intacct API, including a status, message, and optionally the raw XML response for debugging. ```JSON { "status": "error", "message": "API Error (authentication): Authentication failed", "raw_response": "..." } ``` -------------------------------- ### Querying Intacct with Aggregate and Record Number (Incorrect) - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Demonstrates an Intacct query using the 'query' element within an XML request. It includes 'select' with 'CUSTOMERID', 'RECORDNO', and 'count(RECORDNO)' on the 'ARINVOICE' object. This example highlights an incorrect pattern where including 'RECORDNO' in the select alongside the aggregate function leads to unexpected results (counting each record individually). ```XML ... ARINVOICE ``` -------------------------------- ### Intacct MCP Parsed JSON Response Format - JSON Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Example JSON structure when the MCP server parses the Intacct API response into a JSON object, typically when `parse_response` is set to `true`. ```JSON { "status": "success", "parsed_response": { "control": {}, "operation": {} } } ``` -------------------------------- ### Querying and Summing AR Invoices by Customer ID (Case-Insensitive Like) - Intacct Query XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Lists invoices where the customer ID starts with the letter `c` or `C` and provides a sum of the total due by customer ID. Results are grouped by the first two fields selected. The query uses a 'like' filter with a wildcard and the 'caseinsensitive' option. ```Intacct Query XML ARINVOICE CUSTOMERID c% true ``` -------------------------------- ### Create and Activate uv Virtual Environment Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Commands to create a Python 3.11 virtual environment using uv and activate it on different operating systems. ```bash # Create a virtual environment with Python 3.11 uv venv --python=3.11 # Activate the virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate ``` -------------------------------- ### Batch Query Operations with Intacct API (Python) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/claude-system-prompt.md Shows how to use the `batch_xml_to_intacct` tool to send multiple Intacct API query functions in a single request. Each function has a unique `controlid`. The response is parsed. ```python # Example of sending multiple queries in a batch functions = [ 'CUSTOMER*', 'VENDOR*' ] batch_response = batch_xml_to_intacct(functions=functions, parse_response=True) ``` -------------------------------- ### Batch Create Operations with Transaction in Intacct API (Python) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/claude-system-prompt.md Demonstrates using `batch_xml_to_intacct` to send multiple Intacct API create functions as a transaction. Setting `transaction=True` ensures that all operations succeed or fail together, maintaining data consistency. The response is parsed. ```python # Example of creating related records in a transaction (all succeed or all fail) create_functions = [ '...', '...' ] transaction_response = batch_xml_to_intacct( functions=create_functions, parse_response=True, transaction=True # This makes it a transaction ) ``` -------------------------------- ### Run Intacct MCP Server with uv Source: https://github.com/russellkt/intacct-mcp-server/blob/main/README.md Command to launch the Intacct MCP server script using uv's run command, typically for manual testing. ```bash uv run intacct_mcp_stdio.py ``` -------------------------------- ### Correct Single Function Element for Intacct MCP Source: https://github.com/russellkt/intacct-mcp-server/blob/main/claude-system-prompt.md This snippet shows the correct XML format for a single function element to be sent to the `intacct_mcp_stdio` server. Only the block should be sent, as the server automatically wraps it with authentication and request elements. ```XML \n \n CUSTOMER\n *\n \n \n ``` -------------------------------- ### Selecting Multiple Fields in Intacct Query (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Demonstrates how to specify multiple fields to be returned in the results of an Intacct Web Services query using the `select` and `field` elements. ```XML ``` -------------------------------- ### Authenticating with Login - Console Slide In (Method 1) - Sage Intacct API - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/requests.md This snippet shows one method for authenticating a request to a distributed child company via the console using the `login` element. It requires console user credentials (`userid`, `password`, `companyid`), the client company ID, and the entity location ID. ```XML myExtUserId myConsoleId myPassword clientCompanyId entityId ``` -------------------------------- ### Filtering Results Using Like Operator in Intacct Query (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Illustrates using the `filter` element with the `like` logical operator and wildcards (`%`) to match field values based on a pattern. ```XML VENDORNAME B% ``` -------------------------------- ### Combining Conditions Using And in Intacct Query (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Demonstrates how to use the `and` condition within the `filter` element to combine multiple operator statements, requiring all conditions to be true. ```XML WHENCREATED 04/19/2023 WHENCREATED 04/26/2023 VENDORNAME Acme Supply ``` -------------------------------- ### Querying Intacct Objects with readByQuery (Basic) - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Demonstrates a basic Intacct 'readByQuery' function call embedded within the 'content' and 'function' elements of an XML request. It queries the 'APBILL' object, selects all fields ('*'), filters by 'VENDORNAME' using a simple query string, and sets a 'pagesize' limit for the results. ```XML APBILL * VENDORNAME = 'Regal Services' 100 ``` -------------------------------- ### Setting Control ID - Function Element - Sage Intacct API - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/requests.md The `function` element includes the `controlid` attribute, which serves as an identifier for the specific API call. Using unique values like GUIDs or sequenced numbers helps correlate results and ensures transaction idempotence. ```XML ``` -------------------------------- ### Setting Response Data Format (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Use the `returnformat` option within the `` element to specify the desired format for query responses. Valid values are `xml`, `csv`, and `json`. CSV and JSON formats exclude surrounding XML elements. ```XML csv ``` -------------------------------- ### Filtering Results Using Equal To in Intacct Query (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Shows how to use the `filter` element with the `equalto` comparison operator to select records where a field matches a specific value. ```XML STATE Paid ``` -------------------------------- ### Correct Batch Function Elements for Intacct MCP Source: https://github.com/russellkt/intacct-mcp-server/blob/main/claude-system-prompt.md This snippet shows the correct format for sending multiple function elements in a batch request using the `batch_xml_to_intacct` tool. It is a JSON array where each element is a string representation of a function element. ```JSON [\n "CUSTOMER*",\n "VENDOR*"\n] ``` -------------------------------- ### Authenticating with Login - Console Slide In (Method 2) - Sage Intacct API - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/requests.md This is an alternative method for authenticating a request to a distributed child company via the console using the `login` element. It combines the console company ID, client company ID, and entity ID into a single pipe-separated value in the `companyid` element. ```XML myExtUserId myConsoleId|clientCompanyId|entityId myPassword ``` -------------------------------- ### Creating Multiple Objects via Intacct Web Services XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/requests.md This XML snippet demonstrates how to use the generic `create` function within an Intacct Web Services request to create multiple different object types (LOCATION, VENDOR, and a custom COUNTER) in a single function call. Each object type is defined by its own XML element within the `` block, containing the necessary fields as sub-elements. ```XML 23 Bags and More Vend-201 Style Messenger Bags US 2389 Item count ``` -------------------------------- ### Setting Page Size for Query Results (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md The `` element specifies the maximum number of results to return in a single set. The default is 100, with a maximum of 2000. ```XML 200 ``` -------------------------------- ### Setting Offset for Query Results (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md The `` element is used for pagination when the total number of records exceeds the maximum page size. It specifies the number of initial results to skip. ```XML 10 ``` -------------------------------- ### Incorrect Full XML Request Format Source: https://github.com/russellkt/intacct-mcp-server/blob/main/claude-system-prompt.md This snippet shows the full XML request structure, including authentication and control elements. This format should NEVER be sent to the `intacct_mcp_stdio` server, as the server automatically adds these outer elements. ```XML \n \n \n \n \n \n \n \n \n ...\n \n \n ``` -------------------------------- ### Response XML for Intacct Lookup on GLBATCH Object Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet shows an excerpt of the response received from an Intacct Web Services 'lookup' operation on the 'GLBATCH' object. It details the object's metadata, including fields with their properties (ID, label, data type, etc.), valid values for enums, and relationships to other objects. ```XML RECORDNO Record Number false false INTEGER false ... STATE true false TEXT Draft Submitted Partially Approved Approved Posted Declined Reversal pending Reversed false ... ... JOURNAL JOURNAL MANY2ONE JOURNAL ... ``` -------------------------------- ### Querying depreciation_schedule - Custom Object with Multiple Conditions (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query filters a custom object, `depreciation_schedule`, based on multiple conditions: depreciation amount less than or equal to 50, a specific asset name, and a posting date greater than or equal to a given date. It demonstrates querying custom objects and using XML entity references for operators. ```Intacct Query depreciation_amount <= 50 AND Rasset = 'Thinkpad T61' AND posting_date >= '02/01/2022' ``` -------------------------------- ### Constructing an Intacct Query Request (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet shows the structure of a basic `query` request for the Sage Intacct web services API. It specifies the object type (`APBILL`), filters results where the `VENDORNAME` field equals "Regal Services", and selects the `RECORDNO` and `VENDORNAME` fields to be returned in the response. ```XML APBILL VENDORNAME Regal Services ``` -------------------------------- ### Authenticating with Login - Standalone Company - Sage Intacct API - XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/requests.md This code snippet shows how to use the `login` element to authenticate a request for a standalone company. It requires providing the user ID, company ID, and password used for logging into the Sage Intacct UI. ```XML myUserId myCompanyId myPassword ``` -------------------------------- ### Querying GLACCOUNTBALANCE - By Period (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query lists account balances from the GLACCOUNTBALANCE object for a specific accounting period identified by its name. ```Intacct Query PERIOD = 'Month Ended June 2021' ``` -------------------------------- ### Ordering Results by Field Descending in Intacct Query (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Shows how to use the `orderby` element to specify the order of the results based on a field, using the `descending` value. ```XML TOTALDUE ``` -------------------------------- ### Inspecting Object Details (Intacct XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet demonstrates how to use the `inspect` function in the Intacct API to retrieve detailed information about an object, such as field names and types. The `detail="1"` attribute requests comprehensive details. ```XML APBILL ``` -------------------------------- ### Querying Custom MCA Attendee Objects by Customer Total Due - Intacct XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Lists MCA_attendee custom objects where the related customer (via R_attendee_customer relationship) owes more than 5,000. ```XML MCA_attendee R_attendee_customer.TOTALDUE 5000 ``` -------------------------------- ### Filtering Results Using Greater Than in Intacct Query (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Demonstrates how to use the `filter` element with the `greaterthan` comparison operator to qualify records based on a field value. ```XML TOTALDUE 500 ``` -------------------------------- ### Querying EMPLOYEE - IDs with 'b' as Second Character (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query uses the LIKE operator with the underscore (_) wildcard to find EMPLOYEE records where the EMPLOYEEID has any single character followed by 'b' and then any sequence of characters. ```Intacct Query EMPLOYEEID like '_b%' ``` -------------------------------- ### Setting Case Sensitivity for Queries (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md By default, queries are case sensitive. Set the `caseinsensitive` option within the `` element to `true` to perform a case-insensitive query. ```XML true ``` -------------------------------- ### Request XML for Intacct Lookup on GLBATCH Object Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML snippet demonstrates the structure for a request to perform a 'lookup' operation on the 'GLBATCH' object (Journal Entry) via the Intacct Web Services API. The '' element specifies the target object for which metadata is requested. ```XML GLBATCH ``` -------------------------------- ### Querying ACTIVITYLOG - By ID and Date Range (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query lists audit trail logs from the ACTIVITYLOG object for records with an ID greater than 2000, created specifically on April 19, 2021. It shows how to use greater than, greater than or equal to, and less than operators with dates and numeric IDs, noting the use of XML entity references for operators. ```Intacct Query OBJ_ID > 2000 AND CREATED_AT >= '04/19/2021 12:00:00' AND CREATED_AT < '04/20/2021 12:00:00' ``` -------------------------------- ### Intacct Query Function XSD Schema Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Defines the complete XML schema for the Intacct 'query' function. It specifies required elements like 'select' and 'object', optional elements for filtering ('filter'), ordering ('orderby'), pagination ('pagesize', 'offset'), and options ('options'). It also defines complex types and groups used for constructing filter expressions. ```XML ``` -------------------------------- ### Querying GLACCOUNTBALANCE - By Period Excluding Zero Balances (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query retrieves account balances for a specific period, excluding entries where all balance fields (TOTDEBIT, TOTCREDIT, TOTADJDEBIT, TOTADJCREDIT, FORBAL, ENDBAL) are zero. It uses the NOT operator and logical grouping. ```Intacct Query PERIOD = 'Month Ended June 2021' AND NOT (TOTDEBIT = 0 AND TOTCREDIT = 0 AND TOTADJDEBIT = 0 AND TOTADJCREDIT = 0 AND FORBAL = 0 AND ENDBAL = 0) ``` -------------------------------- ### Querying DEPARTMENT - By Specific IDs (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query retrieves DEPARTMENT records where the DEPARTMENTID matches any value within the provided list of IDs. It uses the IN operator for multiple value matching. ```Intacct Query DEPARTMENTID IN ('10','20','15','11','12','8','3','4','100','99') ``` -------------------------------- ### Querying Intacct GLBATCH by State (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML query retrieves GLBATCH records from Intacct, filtering them to include only those where the STATE field is 'Posted'. It selects the RECORDNO and STATE fields. ```XML GLBATCH STATE Posted ``` -------------------------------- ### Querying USERINFO - Business User Type (Intacct Query) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This query lists user information records from the USERINFO object where the usertype field is 'B', representing the 'business' user type. Note that validated lists often store single characters. ```Intacct Query usertype = 'B' ``` -------------------------------- ### Using Aggregate Function (Count) in Intacct Query (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Illustrates how to use an aggregate function, specifically `count`, within the `select` element of an Intacct query. Fields in `select` are used for grouping results when aggregates are used. ```XML ARINVOICE ``` -------------------------------- ### Querying Sales Order Entry Transactions by Definition - Intacct Query XML Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md Lists Order Entry transactions where the transaction definition (`docparid`) is `Sales Order`. This shows how to filter transactions based on their specific type. ```Intacct Query XML SODOCUMENT Sales Order ``` -------------------------------- ### Querying AP Bills with Empty Descriptions (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML query lists AP Bills where the 'DESCRIPTION' field is empty or null. It uses the 'isnull' operator to filter for records lacking a description. ```xml APBILL DESCRIPTION ``` -------------------------------- ### Querying AP Bills by Vendor Name and Creation Date (XML) Source: https://github.com/russellkt/intacct-mcp-server/blob/main/docs/queries.md This XML query lists AP Bills using an 'and' filter. It combines two conditions: the 'WHENCREATED' field must be greater than or equal to '04/26/2021', and the 'VENDORNAME' must not be equal to 'Acme Supply'. ```xml APBILL WHENCREATED 04/26/2021 VENDORNAME Acme Supply ```