How do you categorize Items into Service, Product, Discount, Discount %, Other Charge, Other Charge % - intuit-partner-platform

In Quickbooks desktop each item is categorized as a product, service, or discount etc. In Quickbooks online I need to download the list of items and have noticed they are no longer categorized.
The code I'm using is like this:
list = commonService.FindAll(new Intuit.Ipp.Data.Qbo.Item(), currentPage, itemListPageSize) as IEnumerable;
When I download this list from Quickbooks Online, I need to know if it's a product/service/discount so that I can import it into our system like we did for QB Desktop.
How do I go about getting the category of this item?

QuickBooks Online does not have multiple different item types. It's a different product which works significantly differently from QuickBooks for Windows/Mac.
The Intuit Anywhere/IDS APIs do not support any concept of inventory for QuickBooks Online right now, though QuickBooks Online itself does support the concept.
QuickBooks Online does not have a concept of a "discount" item at all (discounts are just another rate/amount field on an invoice, vs. a line item like in QuickBooks for Windows).
Here's a screenshot of the QuickBooks Online interface:
Notice that I have added a 10% discount, but that 10% discount does not show up as a normal line item. It's just a field on the invoice that accepts a discount amount. Because it's not a line item, it doesn't require an item type at all.
This is reflected in the APIs as well.
Here's a qbXML example (notice: it's not a line item, and doesn't refer to an item type at all):
<DiscountLineAdd> <!-- optional -->
<!-- BEGIN OR -->
<Amount >AMTTYPE</Amount> <!-- optional -->
<!-- OR -->
<RatePercent >PERCENTTYPE</RatePercent> <!-- optional -->
<!-- END OR -->
<IsTaxable >BOOLTYPE</IsTaxable> <!-- optional -->
<AccountRef> <!-- optional -->
<ListID >IDTYPE</ListID> <!-- optional -->
<FullName >STRTYPE</FullName> <!-- optional -->
</AccountRef>
</DiscountLineAdd>
Here's an IPP example (again, notice isn't not a line item, and doesn't refer to an item type at all):
<Header>
<DocNumber>00010</DocNumber>
<TxnDate>2010-08-07-07:00</TxnDate>
<Msg>No Black Ink Pens</Msg>
<Note>Blue Ink pens only</Note>
<CustomerId>5</CustomerId>
<SalesTaxCodeId idDomain="QBO">1</SalesTaxCodeId>
<SalesTaxCodeName>IS_TAXABLE</SalesTaxCodeName>
<SubTotalAmt>200.00</SubTotalAmt>
<TaxAmt>100.00</TaxAmt>
<TotalAmt>298.75</TotalAmt>
<DueDate>2010-08-16-07:00</DueDate>
<BillEmail>john_doe#digitalinsight.com</BillEmail>
<DiscountAmt>-1.25</DiscountAmt>
</Header>

Related

SDTT error: "Service is not a known valid target type for the itemReviewed property"

Using the following HTML+RDFa:
<div vocab="https://schema.org/" typeof="Service">
<meta property="name" content="My Service Name"/>
<div property="description">
For verified ratings of our services, please view our:
<a
href="https://www.capterra.com/link/to/captera"
target="_blank"
>4.9 Star Rating on Capterra</a>
</div>
<div property="aggregateRating" typeof="AggregateRating">
<div>
Capterra Rating:
<span property="ratingValue">4.9</span> out of
<span property="bestRating">5</span> with
<span property="ratingCount">112</span> ratings
</div>
</div>
</div>
This snippet is in my code, but when I test it all in Google's Structured Data Testing Tool, I get the following error:
I'm having trouble accepting this error because (if i'm reading this correctly), according to the Service docs in https://schema.org/, this is a supported property. I'm sure there is a syntax error somewhere or, if I dare touch the sun, Google is wrong.
I ran it through the structured data and it recognized it:
What am I doing wrong here?
You are not doing anything wrong.
On 16th Sep 2019, Google tweaked their rich snippets requirements, wherein the itemReviewed property is now supported only for a very small list of Schema.org types.
As per Google:
While, technically, you can attach review markup to any schema type,
for many types displaying star reviews does not add much value for the
user. With this change, we’re limiting the pool of schema types that
can potentially trigger review rich results in search. Specifically,
we’ll only display reviews with those types (and their respective
subtypes)...
Earlier, CreativeWork, Article, BlogPosting, Service were all supported and there was no error message on the structured data testing tool.
Now, any schema other than the list below will trigger a '_______ is not a known valid target type for the itemReviewed property.' error.
The valid types for the itemReviewed property are:
Book
ListItem
Course
CreativeWorkSeason
CreativeWorkSeries
Episode
Event
Game
HowTo
LocalBusiness
MediaObject
Movie
MusicPlaylist
MusicRecording
Organization
Product
Recipe
SoftwareApplication
Note : There are other schema types that are valid and may not trigger an error message on the testing tool for aggregateRating or itemReviewed. However, from the Google Blog posting, I understand it as 'Even if the schema is valid, stars / rich snippets may not show up for schemas other than those specifically listed.'

Accessing customer contact details with QBSDK

According to the QBSDK v12 and v13 OSR documentation, the SDK returns contact details (phone, email, etc.) for each of the contacts associated with a customer. In other words, tags within the contact. But when I query a customer that has multiple contacts associated with it, all I get is:
<Contact>Thing One</Contact> (for the contact flagged as primary)
<AltContact>Thing Two</AltContact> (for the contact flagged as secondary)
<AdditionalContactRef>
<ContactName>Main Phone</ContactName> (the main phone # for CUSTOMER, not contact)
<ContactValue>425-555-1212</ContactValue>
</AdditionalContactRef>
etc...
The phone # and email set up for each contact is not included in the response XML. This is with QB Premier 2014 and QBSDK v13. Am I missing something, or does QB not yet return the contact details, which are supposedly supported by the SDK?
If I understand the question correctly, you are looking for the ContactsRet element.
You should be able to request ContactsRet element using the IncludeRetElement element.
From the OSR:
<CustomerRet>
<ContactsRet> <!-- optional, may repeat -->
<ListID> IDTYPE </ListID> <!-- required -->
<TimeCreated> DATETIMETYPE </TimeCreated> <!-- required -->
<TimeModified> DATETIMETYPE </TimeModified> <!-- required -->
<EditSequence> STRTYPE </EditSequence> <!-- required -->
<Contact> STRTYPE </Contact> <!-- optional -->
<Salutation> STRTYPE </Salutation> <!-- optional -->
<FirstName> STRTYPE </FirstName> <!-- required -->
<MiddleName> STRTYPE </MiddleName> <!-- optional -->
<LastName> STRTYPE </LastName> <!-- optional -->
<JobTitle> STRTYPE </JobTitle> <!-- optional -->
<AdditionalContactRef> <!-- must occur 0 - 5 times -->
<ContactName>STRTYPE</ContactName> <!-- required -->
<ContactValue>STRTYPE</ContactValue> <!-- required -->
</AdditionalContactRef>
</ContactsRet>
</CustomerRet>

Umbraco - Displaying a specific image within a macro for-each child of certain node

Umbraco newbie here. I've researched a tonne but can't seem to find what I' looking for.
I have a site with a slider on the homepage, the slider is sitting in a macro which is using a for-each (of a nodes children) with a final goal to display the 'heroImage' image from that doctype. I cant post images as a newbie to this site, but heres my content structure:
HOME
PORTFOLIO
- First Item
- Another Item
ABOUT
CONTACT US
Home, Portfolio, ABOUT and CONTACT US are "Landing Pages" document types, and the children under Portfolio (First Item and Another Item) are "Portfolio Entries" document types. Below is the code on "Landing Page" calling the Slideshow macro.
Portfolio Entry has fields:
heroImage
images
body
Slideshow macro obviously being the highlight there. Easy enough. Heres my macro code where you'll see I'm trying to display the heroImage of the node in question for each 'for-each'.
<xsl:template match="/">
<!-- slider -->
<div id="slideshow">
<div id="slider" class="nivoSlider">
<xsl:for-each select="umbraco.library:GetXmlNodeById(1081)/*[#isDoc and position() < 4]">
<xsl:variable name="mediaId" select="umbraco.library:GetMedia(#id, 'false')/data [#alias = 'umbracoFile']" />
<xsl:if test="$mediaId > 0">
<xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
<xsl:if test="count($mediaNode/data) > 0 and string($mediaNode/data[#alias='umbracoFile']) != ''">
<img src="{$mediaNode/data[#alias='umbracoFile']}" alt="[image]" />
</xsl:if>
</xsl:if>
</xsl:for-each>
</div>
</div>
<!-- data-transition="slideInLeft" -->
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</xsl:template>
I feel like im so close, and ran out of search queries as most of the solutions I found were dependant on the imageId being passed onto the macro from the other side of the macro which wouldn't work.
Hope Ive explained this enough and thanks in advance for your help!
First of all, it looks like you're hardcoding the parent node id. In the code you just provided, it seems to only be getting the children of the node with id 1081. From reading what you just posted, it would seem that on all landing pages, you want to display their individual portfolio entries.
Either way, I would stay away from hardcoding IDs. If the node id changes in any way(user deletes the node, it gets exported as a package to the live environment, etc), your code will stop working. I'd just use $currentPage instead.
Judging by your filter, I imagine you only want the first 3 items to show in the slider. The code seems correct, but you seem to be using the old schema and its associated xpath. If you're using a newer version of Umbraco, the way you reference node data in xslt would have changed. I would guess that you've found many code examples and tried merging them together, without realising they wouldn't call the same schema.
This wiki link will provide more information, and hopefully fix your problem if you're using the wrong xpath.

schema.org and an online dictionary

I'm having trouble about what to use from schema.org. I'm making a web site kinda similar to urbandictionary.com. Users are the contributors of the dictionary. Also the dictionary may include phrases like "2012 London Olympics", "MIT Dorms" etc. Whatever. So I want to add schema to the website. What should be schema-named the words/phrases and the users' descriptions?
http://schema.org/docs/full.html
Edit: layout of a sample page:
Gmail
Google's email service -user63
best email service in terms of spam prevention -user21
Gmail has a support of IMAP, POP3, SMTPi OAUTH, FRD, two-way secure login -userMew
Edit2: loyout of another sample page:
Batman 5
Upcoming movie of Batman, where Justien Bieber is going to play Joker -user43, May 2015
The opening was a disaster; Bieber slipped to the stairs and then was carried to a hospital -user22, December 2015
This movie was a disaster, a very poor quality movie -userKitten, March 2016
General
There is a getting started page in the documentation on schema.org. As you are building a dictionary, you might have an entry about a movie there (the example they are using). The markup could look like this:
<div itemscope itemtype ="http://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<span>Director: <span itemprop="director">James Cameron</span></span>
<span itemprop="genre">Science fiction</span>
Trailer
</div>
This requires that you know that your data entry is a movie of course. If you do not know that, you could use the itemtype Article (or even Thing) and the global properties name and description.
There is also additional information about the format of e.g. dates and how to integrate invisible data using the meta tag and setting a content attribute: <meta itemprop="bestRating" content="5" />.
You can always give multiple types to an item by specifying the property additionalType. You can even extend the schema. But you should use them carefully as they are not recognized by search engines, but might get used in the future:
If the schema gains adoption and proves useful to search applications, search engines may start using this data.
In general, all this markup is optional, so feel free to mark up as much as possible, but only those parts that make sense. From the schema.org FAQ:
It is fine to mark up only some properties of an item - markup is not an all-or-nothing choice.
Markup validation
To test your markup, Google provides a Rich Snippets Testing Tool. You can paste your HTML there and see what Google extracts from it. For the above example, this is the result:
Item
Type: http://schema.org/movie
name = Avatar
director = James Cameron
genre = Science fiction
trailer
text = Trailer
href = http://www.example.com/movies/avatar-theatrical-trailer.html
On your page
As the information on your page is user-generated, you could let the users choose from the higher level schema.org types (Movie, Place (MIT Dorms), SportsEvent (2012 London Olympics) etc.) and fallback to Thing. Then get the data in form elements matching the properties of those types. Save the data and evaluate it when you build your dictionary pages. It is then crawled by Google (and others) and used for indexing.
For the Gmail example you gave, the markup could simply look like this (copy and paste it into the testing tool to see that Google understands the nesting):
<div itemscope itemtype ="http://www.schema.org/SoftwareApplication">
<h1 itemprop="name">Gmail</h1>
<div itemprop="comment" itemscope itemtype="http://www.schema.org/Comment">
<span itemprop="comment">Google's email service</span>
<span itemprop="author">user63</span>
</div>
<div itemprop="comment" itemscope itemtype="http://www.schema.org/Comment">
<span itemprop="comment">best email service in terms of spam prevention</span>
<span itemprop="author">user21</span>
</div>
<div itemprop="comment" itemscope itemtype="http://www.schema.org/Comment">
<span itemprop="comment">Gmail has a support of IMAP, POP3, SMTPi OAUTH, FRD, two-way secure login</span>
<span itemprop="author">userMew</span>
</div>
</div>
Additional information
For more information see the Google schema.org FAQs. Also see the Dublin Core Metadata Initiatice (DCMI) (Wikipedia) as an alternative way to semantically markup your data. They also have a wiki page for mapping between schema.org and DC.
Dictionaries can now be represented in schema.org in several ways. At the moment the google search results are not based on structured data/schema.org but that may change in future.
Most of the suggestions below are more specific types of http://schema.org/CreativeWork - which is important because it contains properties like comment, contributor, and text which are useful for user-editable content and contributions. CreativeWork also contains learningResourceType which can be set to dictionary - but this isn't a suggested value by schema.org so search engines may not know where to look.
SEO and Semanic HTML for dictionaries
Using the tags with and is the standard way of doing dictionary terms/definitions and used by the top dictionary websites, you can these tags with the schema inside them,
<div itemscope itemtype="http://schema.org/Collection"><h1 itemprop="name">Dictionary</h1>
<dl id="gmail" itemscope itemtype="http://schema.org/CreativeWork">
<dt itemprop="name">Gmail</dt>
<meta itemprop="sameAs" content="http://gmail.com">
<meta itemprop="url" content="http://mydictionary.com/page1.html#gmail">
<dd itemprop="description"><span itemprop="comment">Google's email service</span> -<span itemprop="contributor">user63</span></dd>
</dl>
</div>
Having a separate page (or breadcrumb) for each terms seems key to ranking highly. The page name (including any bookmark) is used in the ranking, so if you search for 'ardvark' the URL http://mydictionary.com/A will rank below http://mydictionary.com/Aardvark even if both pages are otherwise identical.
Explanation of 3 Suitable schema types, including the 'official' dictionary
Method 1)
Use http://schema.org/Thing or http://schema.org/Intangible with only name (your term) and description (your definition) set. This will be hundreds (or more) of separate ones, so you could group them under a collection with http://schema.org/Collective (this how VideoGallery and ImageGallery structured data is done). The nice thing about this is it's simple and very each to show each on a separate page, which should increase hits.
Method 2)
The only way that the schema will recognize the value of Dictionary as a Dictionary is to use http://schema.org/publicationType - which can be any one of the values listed here - one of which is Dictionary. Another is Terminology.
The catch is that at the moment publicationType can only be used inside http://schema.org/MedicalScholarlyArticle - but raise a request and this may be expanded, for example to other ScholarlyArticles, or to CreativeWork (which is a parent of MedicalScholarlyArticle). MedicalScholarlyArticle is a type of CreativeWork - as explained above. If using MedicalScholarlyArticle you can nest items inside, one for each term, possibly using http://schema.org/Thing or http://schema.org/Intangible (set name and description, sameAs can be used to point to a wikipedia or urban dictionary entry that identifies the term, or to social media).
You can open an issue here to request that publicationType be added to all CreativeWork.
Method 3)
A dictionary is a book (whether offline or online), so use http://schema.org/Book and add each term within it by nesting inside. Book is a type of http://schema.org/CreativeWork and as in Method 1 you can set the terms with Thing, Intangible, or even make each term into it's own CreativeWork (just check because google may want an image for each as it does with each ScholarlyArticle).

Sharepoint 2007 - Custom List provisioning - are List Forms needed at deployment?

I have a feature which is provisioning 1 document library and 2 custom lists. A folder is included for each list containing the schema.xml for that list. Each folder also contains the associated forms (AllItems, DispForm, EditForm, NewForm, etc.). Everything deploys/works correctly but it seems a little redundant having the same forms copied into each list's folder. There is nothing special about these lists - the are basically a default doc library/generic list with additional fields provided through new content types (derived from Item/Document).
As far as I can tell these forms are pretty generic. Are there pre-installed forms that I can reference from my list so I don't have to deploy all of these extra files? Is there any reason I would not want to do this?
Update - moving xml in comment to original question for readability:
<Forms>
<Form Type="DisplayForm" Url="Forms/DispForm.aspx" WebPartZoneID="Main"/>
<Form Type="EditForm" Url="Forms/EditForm.aspx" WebPartZoneID="Main"/>
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main"/>
<Form Type="NewFormDialog" Path="EditDlg.htm">
....
There are virtual defaults that are used if you don't specify a concrete page.
All lists use these template defaults unless you use a tool like SharePoint designer to customize the page. Then the template is used to create the concrete page and you can customize the look for a particular list without affecting others.
For my custom definitions, I use
<List>
...
<MetaData>
...
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
</MetaData>
</List>
If you have no reason to customize the out of the box version of these forms, you can use the virtual form and not deploy copies.