Can the QBO API indicate the account is using the US or international version? - quickbooks-online

Our system is dealing with QBO users from the states and other countries. Does the API support to indicate the account is using US or international edition? It is essential as the tax model is very different on the 2 versions.

If you query for CompanyInfo with a query like this:
SELECT * FROM CompanyInfo;
You'll get back a response with a Country field like this:
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-07-11T08:30:10.953-07:00">
<QueryResponse maxResults="1">
<CompanyInfo domain="QBO" sparse="false">
<Id>1</Id>
<SyncToken>3</SyncToken>
<MetaData>
<CreateTime>2013-04-20T10:32:18-07:00</CreateTime>
<LastUpdatedTime>2013-07-11T08:27:06-07:00</LastUpdatedTime>
</MetaData>
<CompanyName>n57GbCorp.</CompanyName>
<LegalName>n57GbLegal Corp.</LegalName>
...
<Country>US</Country>
...
Reference these docs:
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/030_entity_services_reference/companyinfo

Related

The createdFrom field on NetSuite Invoice is not populating when using SOAP Web Services via Workato

I am using Workato for my Salesforce to NetSuite integration and everything works perfectly with the exception of populating the createdFrom field on the Invoice record. Has anyone been successful in linking the NetSuite Invoice to its associated Sales Order using Web Services? This is critical as the linkage ensures that Revenue Arrangements are not duplicated in NetSuite.
I do not have first hand experience with SOAP Web Services but have seen via SuiteScript 2.x that one cannot simply create the record and try to fill in the createdFrom field. You must rather "transform" a Sales Order into an Invoice for example. The "transformation" is what links the two. Looks like for SOAP the operation is named "initialize / initializeList". The SOAP web services initialize operation emulates the UI workflow by prepopulating fields on transaction line items with values from a related record. Reference Suite Answer 10771 for more information. Suite Answer 91358 also has some sample code.
yes I have created invoices from Sales Order using SOAP Webservices. I am using minimum number of required fields to create the invoice.
Here is the endpoint URL that I used : https://(insert your account Id here).suitetalk.api.netsuite.com/services/NetSuitePort_2020_1
Note 1: You need to make sure that the version is consistent through out your SOAP request (in my case it's 2020_1)
Note 2: You can see that I am passing createdFrom tag as second last tag and I am passing Sales order's internal ID there. That means that invoice is being generated from that particular sales order and it carries over rest of the fields from sales order
Note 3: I am passing externalid of the invoice at the end which will the unique id of this newly created invoice across different systems
Please let me know how this goes!
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:messages="urn:messages_2020_1.platform.webservices.netsuite.com" xmlns:accountingLists="urn:accounting_2020_1.lists.webservices.netsuite.com" xmlns:employeesLists="urn:employees_2020_1.lists.webservices.netsuite.com" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:employeesTransactionsTypes="urn:types.employees_2020_1.transactions.webservices.netsuite.com" xmlns:demandplanningTransactions="urn:demandplanning_2020_1.transactions.webservices.netsuite.com" xmlns:common="urn:common_2020_1.platform.webservices.netsuite.com" xmlns:commonTypes="urn:types.common_2020_1.platform.webservices.netsuite.com" xmlns:accountingListsTypes="urn:types.accounting_2020_1.lists.webservices.netsuite.com" xmlns:customizationSetup="urn:customization_2020_1.setup.webservices.netsuite.com" xmlns:inventoryTransactionsTypes="urn:types.inventory_2020_1.transactions.webservices.netsuite.com" xmlns:supportLists="urn:support_2020_1.lists.webservices.netsuite.com" xmlns:filecabinetDocuments="urn:filecabinet_2020_1.documents.webservices.netsuite.com" xmlns:bankTransactionsTypes="urn:types.bank_2020_1.transactions.webservices.netsuite.com" xmlns:communicationGeneralTypes="urn:types.communication_2020_1.general.webservices.netsuite.com" xmlns:customizationSetupTypes="urn:types.customization_2020_1.setup.webservices.netsuite.com" xmlns:supplychainListsTypes="urn:types.supplychain_2020_1.lists.webservices.netsuite.com" xmlns:core="urn:core_2020_1.platform.webservices.netsuite.com" xmlns:coreTypes="urn:types.core_2020_1.platform.webservices.netsuite.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:supplychainLists="urn:supplychain_2020_1.lists.webservices.netsuite.com" xmlns:demandplanningTransactionsTypes="urn:types.demandplanning_2020_1.transactions.webservices.netsuite.com" xmlns:websiteLists="urn:website_2020_1.lists.webservices.netsuite.com" xmlns:salesTransactions="urn:sales_2020_1.transactions.webservices.netsuite.com" xmlns:salesTransactionsTypes="urn:types.sales_2020_1.transactions.webservices.netsuite.com" xmlns:relationshipsLists="urn:relationships_2020_1.lists.webservices.netsuite.com" xmlns:inventoryTransactions="urn:inventory_2020_1.transactions.webservices.netsuite.com" xmlns:employeesListsTypes="urn:types.employees_2020_1.lists.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:customersTransactions="urn:customers_2020_1.transactions.webservices.netsuite.com" xmlns:schedulingActivitiesTypes="urn:types.scheduling_2020_1.activities.webservices.netsuite.com" xmlns:financialTransactions="urn:financial_2020_1.transactions.webservices.netsuite.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:relationshipsListsTypes="urn:types.relationships_2020_1.lists.webservices.netsuite.com" xmlns:employeesTransactions="urn:employees_2020_1.transactions.webservices.netsuite.com" xmlns:faults="urn:faults_2020_1.platform.webservices.netsuite.com" xmlns:marketingListsTypes="urn:types.marketing_2020_1.lists.webservices.netsuite.com" xmlns:communicationGeneral="urn:communication_2020_1.general.webservices.netsuite.com" xmlns:faultsTypes="urn:types.faults_2020_1.platform.webservices.netsuite.com" xmlns:supportListsTypes="urn:types.support_2020_1.lists.webservices.netsuite.com" xmlns:websiteListsTypes="urn:types.website_2020_1.lists.webservices.netsuite.com" xmlns:purchasesTransactions="urn:purchases_2020_1.transactions.webservices.netsuite.com" xmlns:financialTransactionsTypes="urn:types.financial_2020_1.transactions.webservices.netsuite.com" xmlns:schedulingActivities="urn:scheduling_2020_1.activities.webservices.netsuite.com" xmlns:bankTransactions="urn:bank_2020_1.transactions.webservices.netsuite.com" xmlns:marketingLists="urn:marketing_2020_1.lists.webservices.netsuite.com" xmlns:customersTransactionsTypes="urn:types.customers_2020_1.transactions.webservices.netsuite.com" xmlns:purchasesTransactionsTypes="urn:types.purchases_2020_1.transactions.webservices.netsuite.com" xmlns:generalTransactions="urn:general_2020_1.transactions.webservices.netsuite.com" xmlns:filecabinetDocumentsTypes="urn:types.filecabinet_2020_1.documents.webservices.netsuite.com">
<soap:Header>
<urn:tokenPassport xmlns:urn="urn:messages_2020_1.platform.webservices.netsuite.com">
<ns8:account xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">XXX</ns8:account>
<ns8:consumerKey xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">XXX</ns8:consumerKey>
<ns8:token xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">XXX</ns8:token>
<ns8:nonce xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">XXX</ns8:nonce>
<ns8:timestamp xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">XXX</ns8:timestamp>
<ns8:signature xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com" algorithm="HMAC_SHA256">XXX</ns8:signature>
</urn:tokenPassport>
<preferences xmlns="urn:messages_2020_1.platform.webservices.netsuite.com"/>
</soap:Header>
<soap:Body>
<add>
<record xmlns:salesTransactions="urn:sales_2020_1.transactions.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="salesTransactions:Invoice">
<itemList>
<item xsi:type="salesTransactions:InvoiceItem">
<orderLine xsi:type="salesTransactions:long">1</orderLine>
<quantity xsi:type="salesTransactions:double">1</quantity>
<rate xsi:type="salesTransactions:string">30000</rate>
<description xsi:type="salesTransactions:string">Annuity test</description>
</item>
</itemList>
<tranDate xsi:type="salesTransactions:dateTime">2020-09-09T00:00:00.000</tranDate>
<createdFrom xmlns:core="urn:core_2020_1.platform.webservices.netsuite.com" xsi:type="core:RecordRef" internalId="33202933"/>
<externalId xmlns:core="urn:core_2020_1.platform.webservices.netsuite.com" xsi:type="core:RecordRef">INV000089099</externalId>
</record>
</add>
</soap:Body>
</soap:Envelope>

How to save Salesforce Query Results to MySql database

I want to query Salesforce and save the results in a database. The first problem is that I find my payload is a ConsumerIterator. How can I process these results to store in a database?
<flow name="process.accounts" processingStrategy="synchronous">
<sfdc:select config-ref="MySQLDB" doc:name="Select Contact by Email">
<sfdc:parameterized-query><![CDATA[SELECT first_name,last_name,email
FROM Contact WHERE email=#[payload.email]]]></db:parameterized-
query>
</sfdc:select>
</flow>
<flow name="insert.contacts.to.audit" >
<vm:inbound-endpoint exchange-pattern="one-way" path="contact-audit"/>
<db:insert config-ref="Generic_Database_Configuration" doc:name="Save
Contact">
<db:parameterized-query><![CDATA[insert into user_audit v
values(?,?,?)]]></db:parameterized-query>
</db:insert>
</flow>
mulesoft exchange provides many common integration patterns such as the one you seek.
https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2db-account-bidirectional-sync/
use that template to quickly understand the how

how to get synonym value from entities ibm watson conversation

i have work-space in www.ibmwatsonconversation.com
in this work-space i have an entity of automotive_and_vehicles
in this entity have a value of vehicle brand
this value have many synonyms like opel isuzu bmw ford bently ... (30 synonyms)
like it showed in this two pic
entities+vehicle brand,synonyms
I succeed to get the entity and value in java code but when i want to get the synonym value i can't
this is the output script=>
script+output pic
You can use .literal property to get the exact text that was recognized as the detected entity. E.g. <?#automotive_and_vehicles.literal?> in your example.

Where is the data saved, from the Datatable-items, in ECM eRoom-database?

I am trying to retrieve data out of the ECM eRoom Database (which isn't documented, as I know of).
I have an eRoom with an custom "Database", some Fields.
When I query the objects table I find the "Database" row
select * from[dbo].[Objects] where internalId = 1234567
and the Rows for the entries
select top 10 * from[dbo].[Objects] where parentInternalId = 1234567
but I don't find any field with the values of the entries, only an Column with NonSearchableProperties., that is only full with Hex Data.
My Question(s),
how could i retrieve the values?
Is it possible to retrieve them with mere SQL?
What is the simplest way?
This is not the silver bullet, but it is okay for my usecase
After long goolging and alot of test scripts, i found some answers, but probably due to the fact the the system is soon end-of-life and that the documentation is not easy to read, here are my finding.
Is it possible to retrieve them with mere SQL?
As far as I could find out, no! (please correct me If I'm wrong)
how could i retrieve the values?
With the eRoom API(on the Server there are some Sample programms to query the data/objects <installation-path>\eRoom Server\Toolkit\Samples, with c++, vb, vbscript, ... all a bit to much overhead), or with the eRoom XML Query Language(exql) over soap calls.
What is the simplest way?
After alot of tests, searching in forums and many tests with soap ui. I found out that queries with exql seem to be the simplest way to retrieve Data, if you understand the structure.
Here some ressource that were helpful:
(very) Basic info of exql from the manufacturer https://eroom.asce.org/eRoomHelp/en/XML_Help/Introduction.htm
(disclaimer: I didn't find it helpful, but it shows at least some basics)
short 9 page Developer guide https://developer-content.emc.com/developer/downloads/eRoomXMLCapabilitiesUseCaseProgramDashboard.pdf (the last example on page 8, helped me understand how to setup the query, with alot of fantasy)
But for this to work, don't forget, to activate Allow XML queries and commands from external applications in the Site Settings
TIP 1:
you always can go go deeper you just need to know the right xml-element under. <Database>, <Cells> and <DBCell> can help you go deeper
TIP 2:
don't query to much data since this query likely run into timeouts
Update 1:
Just to save time for anyone who is looking, this "query" returns all rows (properties) for a Database(s) created in an eRoom Root.
(don't forget to set facility and room in the Url ex. http://server/eroomxml/facilities/TEST/Rooms/TestRoom, although it could be set in the query)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:er="http://www.eroom.com/eRoomXML/2003/700">
<soapenv:Header/>
<soapenv:Body>
<er:ExecuteXMLCommand>
<er:eRoomXML>
<er:command er:select="HomePage/Items">
<er:getproperties>
<er:Item>
<Database>
<Rows>
<Item>
<Cells>
<DBCell>
<Content>
</Content>
</DBCell>
</Cells>
</Item>
</Rows>
</Database>
</er:Item>
</er:getproperties>
</er:command>
</er:eRoomXML>
</er:ExecuteXMLCommand>
</soapenv:Body>
</soapenv:Envelope>

Retrieve list of places lang/lat in country

I want to retrieve a list containing hospital names, long/lat from mapping services like Google map..
Can you help me?
The google geocode API is the way to do this:
https://developers.google.com/maps/documentation/geocoding/
to get a list i.e. for all hospitals in Oregon, USA you can use the following request:
http://maps.googleapis.com/maps/api/geocode/json?address=hospital,oregon,usa&sensor=false
This results in a long response with all information about a dozen hospitals.
There a various ways to modify the results.

Resources