AIML v2: Pandorabots - Two words keyword - keyword

When I try to use FAVOURITE GAME as keyword in AIML v2 (using Pandorabots) I get matches from * category, but not favourite game category. I have no idea what can be wrong.
For example for favourite game I get:
Sorry, could you repeat in an other way?
<aiml>
<!--POWITANIE-->
<category>
<pattern>HI #</pattern>
<template>
<random>
<li>Yo!</li>
<li>Hello!</li>
<li>Welcome to my chatroom man</li>
<li>Hi</li>
<li>Nice to meet you, I'm Alfred</li>
</random>
</template>
</category>
<!--ULUBIONA GRA-->
<category>
<pattern># FAVOURITE # GAME #</pattern>
<template> My favourite game is Starcraft2, and your? </template>
</category>
<!--NA BEZSENSOWNY INPUT-->
<category>
<pattern>*</pattern>
<template>
<random>
<li>I have no idea what to say to you.</li>
<li>I don't understand you.</li>
<li>Sorry, could you repeat in an other way?</li>
</random>
</template>
</category>
</aiml>

If you say, "FAVORITE GAME" to your bot (without the U), I would strongly suspect the category would work. By default, the normal.substitution file for your bot will contain this entry:
["favourite", "favorite"],
This means that whenever anyone says, "FAVOURITE", the bot thinks you mean, "FAVORITE".
If you remove this entry, your bot will recognise "favourite" instead of "favorite" and your pattern will match.

Related

Ability to Merge Voice Menu options with Recording Audio with VoiceXML and Plum Voice

I am trying to achieve the same issue mentioned VoiceXML Record whole call, including menu options a nutshell, have VoiceXML Record whole call while also including menu options. I need to do this is PlumVoice and as per the suggestions need to look for a vendor extension if available.
I tried to look for the vendor extensions but didn't find it. I am fairly new to VoiceXML.Is anyone familiar if this is possible with PlumVoice(version 3.2.8)?
Basically merging these two blocks of code: where the user can say a menu option using voice mode but also recording the whole audio as a wav file.
Voice Menu Selection
<?xml version="1.0"?>
<vxml version="2.0">
<form id="mainmenu">
<field name="menuchoice">
<grammar type="application/x-jsgf" mode="voice">
one|two|three
</grammar>
<prompt>
For sales, say 1.
For tech support, say 2.
For company directory, say 3.
</prompt>
<filled>
<if cond="menuchoice=='one'">
Welcome to sales.
<elseif cond="menuchoice=='two'"/>
Welcome to tech support.
<elseif cond="menuchoice=='three'"/>
Welcome to the company directory.
</if>
</filled>
</field>
</form>
</vxml>
Recording audio input
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<record name="myrecording" type="audio/x-wav" beep="true">
<prompt>
Please record a message after the beep.
</prompt>
​
<filled>
You just recorded the following message:
<value expr="myrecording"/>
<submit next="submitrecording.php" namelist="myrecording"
method="post" enctype="multipart/form-data"/>
</filled>
</record>
</form>
</vxml>
Is this possible with a PlumVoice(version 3.2.8) vendor extension?
It is not a standard VoiceXML feature (out of the VoiceXML standard).
Only some VoiceXML interpreters like Voximal can do that by adding extra properties (property record utterance for example).

TFS: Work item type is not allowed to be added as a link

I just finish to generate my custom WIT (work item type= CRM Case), I add the relative information in the categories s child of RequirementCategory:
<?xml version="1.0" encoding="utf-8"?>
<cat:CATEGORIES xmlns:cat="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/categories">
<CATEGORY refname="Microsoft.FeatureCategory" name="Feature Category">
<DEFAULTWORKITEMTYPE name="Feature" />
</CATEGORY>
<CATEGORY refname="Microsoft.RequirementCategory" name="Requirement Category">
<DEFAULTWORKITEMTYPE name="User Story" />
<WORKITEMTYPE name="CRM Case" />
</CATEGORY>
<CATEGORY refname="Microsoft.TestCaseCategory" name="Test Case Category">
<DEFAULTWORKITEMTYPE name="Test Case" />
</CATEGORY>
Then I add it in the Process Configuration to specify the new field used and the color:
My problem now is that I can associate the "CRM Case" as a general "User Story" Link but I can't associate as implementation, how can I do it?
If you are asking why I want do it is because I want retrieve the test case associate to a User Story when I create a query.
What am I doing wrong or forgetting?
You need to use the LinksControlOptions element to define the options for controlling what links can be added to a work item and the default columns that you want to appear for the list of links in a work item.
When you add a links control to a work item form, you can specify filters that restrict the types of links that users can be view and create and the types of work items to which users can create links.
For more details please refer LinksControlOptions XML elements (Web form), this topic applies to team project customization for Hosted XML and On-premises XML (TFS 2017 and later versions) process models.

XUL get the value of MENUITEM selected

I am creating a dropdown in XUL like this:
<button id="bid" oncommand="alert(event.target.nodeName)" >
<menupopup>
<menuitem label="one" value="one" />
<menuitem label="two" value="two" />
<menuitem label="three" value="three" />
</menupopup>
</button>
I want to alert the value of nodeitem which is being clicked. Using event.target.nodeName giving nodeName as menuitem but using nodeValue is retuning undefined as it starts to take value of button node. How can I get the value of the menuitem clicked. I also tried $(this).val() but even that gave undefined. Using $(this).attr('value')
also didn't help. I can put oncommand for menuitem but that doesn't seem to be actual solution. Is that the only way or some method exist to get the value?
The XUL code you have in the question is non-functional. Either you should be using a <menulist> instead of a <button>, or your <button> needs the property type="menu" or type="menu-button". If you are going to use a <button> without the type="menu" property, you would actually have to open a popup in the command event handler for the <button> and then select from there. That does not appear to be what you are wanting. It is, however, quite doable. I use a construction like that in one of my add-ons, except I have it open when one of several <label> items is clicked. This allows re-use of a single <menupopup> for multiple different items in the window. In that case, the <menupopup> is a rather large amount XUL code that I did not want to repeat and maintain multiple duplicates in the XUL for the window.
The value of the <menuitem> selected:
Your actual question is how to get the value of the <menuitem> selected by the user. All of the code below is tested and functional. As you can see from the code you can get the value of the <menuitem> you select (at the time of selection) from: event.target.value.
Using a <menulist> element:
The most common element to use would be a <menulist>. This would normally be used when you are having the user select from multiple options a choice that is going to be remembered and used later, or used to adjust what is presented in the user interface. It would generally not be used to select from multiple immediate actions (which are acted upon and the choice not remembered). A <menulist> is what is used in the examples for <menuitem> and <menupopup> on MDN.
<menulist id="bid2" oncommand="alert(event.target.value)" >
<menupopup>
<menuitem label="one" value="one" />
<menuitem label="two" value="two" />
<menuitem label="three" value="three" />
</menupopup>
</menulist>
The above code will give you what looks like a button with a selection of <menuitem> entries when you click on it. It will alert with the value of the <menuitem> you have selected.
This will produce an item that looks like:
Which you can click on to open a drop-down list:
If you select an item:
You will get an alert:
And the object will then show your selection:
Using a <button> element:
It is also possible to use a <button> element with the property type="menu" or type="menu-button" specified. However, this provides no visual feedback to the user as to which option is currently selected. [Note: Your JavaScript could manually change the <button> label property to provide this feedback.] You could use this type of element if it is button that produces an immediate action rather than a selection that is remembered.
The code:
<button type="menu" id="bid2" label="A Button" oncommand="alert(event.target.value)">
<menupopup>
<menuitem label="one" value="one" />
<menuitem label="two" value="two" />
<menuitem label="three" value="three" />
</menupopup>
</button>
This will produce an item that looks like:
Which you can click on to open a drop-down list:
If you select an item:
You will get an alert:
And the object will then NOT show your selection:
If you want to set the label of the <button> to reflect the selection made by the user, you could use:
<button type="menu" id="bid2" label="A Button" oncommand="event.target.parentElement.parentElement.label=event.target.value;alert(event.target.value)">
<menupopup>
<menuitem label="one" value="one" />
<menuitem label="two" value="two" />
<menuitem label="three" value="three" />
</menupopup>
</button>
When three is selected, that will result in a button that looks like:
Using a <toolbarbutton>:
You could, alternately, use a <toolbarbutton>.
When not hovered, doing so would look like:
When hovered:
When open for selection:
Choices in UI design:
There are many choices that you have to make when designing your user interface. There are many different ways to get to the same effective result, with somewhat different look and feel. You really should be trying these types of options on your own. You may find the XULRunner program XUL Explorer to be of use when prototyping XUL.
Selecting UI elements and a look and feel is, in my opinion, beyond the scope of questions on stackoverflow. While you probably won't get specific XUL help, you can ask UI design questions at: the User Experience stack exchange.

VoiceXML Record whole call, including menu options

I'm trying to record a whole phone call using VoiceXML (on Nexmo).
I can make a recording or give menu prompts and forward a call seperately, but I can't work out how to do both together. I'd like to record the call from start to finish, including the forwarded call part.
I would imagine the VoiceXML would look something like this, but this isn't valid VoiceXML.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<var name="callerid" expr="123" />
<form>
<record name="recording" beep="true" dtmfterm="true" maxtime="100s">
<menu dtmf="true">
<property name="inputmodes" value="dtmf"/>
<audio src="server/forwardingnow.mp3"/>
<choice dtmf="10" next="#sales"/>
<choice dtmf="30" next="#support"/>
</menu>
<form id="sales">
<transfer name="MyCall" dest="tel:123123123" bridge="true" connecttimeout="20s"/>
</form>
<form id="support">
<transfer name="MyCall" dest="tel:123123123" bridge="true" connecttimeout="20s"/>
</form>
<catch event="connection.disconnect.hangup">
<submit next="server/voice/savecall" method="post" namelist="recording callerid" enctype="multipart/form-data"/>
</catch>
</record>
</form>
It is not possible to do this using standard VoiceXML, you either have to use vendor extensions or put your call in conference with a recording application (a single document with a single for the whole call).
We had GeneSys add this for our company about 10 years ago. (Who knows, maybe other vendors started supporting it this way since then; try it ...) In your vxml, as soon as it is entered, add this vendor-specific log line to the first block of the first form entered in order to turn on whole call recording (NOTE: they MUST each be on their own line for it to work in GeneSys, so do not reformat these 4 lines):
<log gvp:dest="calllog">
directory /myDirectoryName absolute
enable callrec type=audio/wav recsrc=mixed;
</log>
Whole call recording will automatically end when the call is disconnected; or you can end it when you want by executing this log line:
<log gvp:dest="calllog">
disable callrec;
</log>
CCXML is for this purpose.
You can use CCXML for conference and record call etc...
I have built click to call and conference recording for InterpreXer
Voximal is the VoiceXML interpreter for Asterisk.
He can manage the Asterisk Application from the VoiceXML syntaxe.
With the MixMonitor application you can record all the call and then post the result with the ot tags...

quickbooks vendor credit error message

When I sent the following XML to QuickBooks Desktop cloud, I received the following error which I don't understand. Googled but didn't find anything relating. Does anyone know what the source column is?
error message received:
p_validate_txn_ln - unable to find src_column_name_id per ref id acc_id = 39 idDomain = QB
<Object xsi:type="VendorCredit"><Header>
<DocNumber>8D1FC366607</DocNumber>
<TxnDate>2013-09-11</TxnDate>
<Note>Expense Report 09/11/2013 #2</Note>
<VendorName>E100</VendorName>
<TotalAmt>-25.00</TotalAmt>
<APAccountName>Accounts Payable</APAccountName></Header>
<Line>
<Desc>Airfare:</Desc>
<Amount>25.00</Amount>
<ClassId idDomain="QB">5</ClassId>
<ReimbursableInfo>
<CustomerId idDomain="QB">5</CustomerId>
<JobId idDomain="QB">6</JobId>
</ReimbursableInfo>
<BillableStatus>NotBillable</BillableStatus>
<AccountId idDomain="QB">39</AccountId>
</Line>
</Object>
After not including AccountId or ItemId, I was able to send the create VendorCredit object fine. Got success response. However after I ran sync manager, go to QB Desktop, find the Account, the vendorCredit is not there. Any advice?
XML sent:
<Object xsi:type="VendorCredit">
<Header>
<DocNumber>58B58878D79</DocNumber>
<TxnDate>2013-09-12</TxnDate>
<Note>Expense Report 09/12/2013 #2</Note>
<VendorName>E100</VendorName>
<TotalAmt>-43.80</TotalAmt>
<APAccountName>Accounts Payable</APAccountName>
</Header>
<Line>
<Desc>Advertising:</Desc>
<Amount>43.80</Amount>
<ClassId idDomain="QB">1</ClassId>
<ReimbursableInfo>
<CustomerId idDomain="QB">4</CustomerId>
<JobId idDomain="QB">8</JobId>
</ReimbursableInfo>
</Line>
</Object>
Response received:
<?xml version="1.0" encoding="UTF-8"?>
<RestResponse>
<Success RequestId="4a3f1538a01b4a4dac6f03406c6710c7">
<VendorCredit>
<Id idDomain="NG">14542796</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreatedBy>app</CreatedBy>
<CreateTime>2013-09-12T23:41:38Z</CreateTime>
<LastModifiedBy>app</LastModifiedBy>
<LastUpdatedTime>2013-09-12T23:41:38Z</LastUpdatedTime>
</MetaData>
<Synchronized>false</Synchronized>
<Header>
<DocNumber>58B58878D79</DocNumber>
<TxnDate>2013-09-12T00:00:00Z</TxnDate>
<Note>Expense Report 09/12/2013 #2</Note>
<VendorName>E100</VendorName>
<TotalAmt>-43.8</TotalAmt>
<APAccountName>Accounts Payable</APAccountName>
</Header>
<Line>
<Id idDomain="NG">50786642</Id>
<Desc>Advertising:</Desc>
<Amount>43.8</Amount>
<ClassId idDomain="QB">1</ClassId>
<ReimbursableInfo>
< CustomerId idDomain="QB">4</CustomerId>
<JobId idDomain="QB">8</JobId>
</ReimbursableInfo>
</Line>
</VendorCredit>
<RequestName>VendorCreditAdd</RequestName><ProcessedTime>2013-09-12T23:41:38Z</ProcessedTime>
</Success>
</RestResponse>
Although the docs mention AccountId as a required field, it is not(the docs might be slightly off). You can ignore it. if you chooss to add it then all fields related to Items need to included.
Instead ItemId is a required field. So, please include it in your request.
Please refer:
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0500_quickbooks_windows/0600_object_reference/vendorcredit
I created a vendor create request as follows and was able to get the correct response.
Request-
<Add xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" RequestId="Szey2z7hrGf888888888jfc5hrGSYg99" xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 ./RestDataFilter.xsd">
<Object xsi:type="VendorCredit">
<Header>
<DocNumber>8D1FC366607</DocNumber>
<TxnDate>2013-09-11</TxnDate>
<Note>Expense Report 09/11/2013 #2</Note>
<VendorName>TestVendor4</VendorName>
<TotalAmt>-25.00</TotalAmt>
<APAccountName>Accounts Payable</APAccountName>
</Header>
<Line>
<Desc>Airfare:</Desc>
<Amount>25.00</Amount>
<ClassId idDomain="QB">1</ClassId>
<ReimbursableInfo>
<CustomerId idDomain="QB">31</CustomerId>
</ReimbursableInfo>
<BillableStatus>NotBillable</BillableStatus>
<ItemId idDomain="QB">12</ItemId>
</Line>
</Object>
</Add>
Response-
<RestResponse xmlns="http://www.intuit.com/sb/cdm/v2">
<Success RequestId="Szey2z7hrGf888888888jfc5hrGSYg99">
<ObjectRef>
<Id idDomain="NG">1925041</Id>
<SyncToken>1</SyncToken>
<LastUpdatedTime>2013-09-12T07:50:34Z</LastUpdatedTime>
</ObjectRef>
<RequestName>VendorCreditAdd</RequestName>
<ProcessedTime>2013-09-12T07:50:34Z</ProcessedTime>
</Success>
</RestResponse>
Edit for the questions asked:
*Please note:*
VendorCredit is an AP transaction representing a credit from a third party for returned goods or services not rendered. In QuickBooks desktop versions, a vendor credit is also known as a "bill credit". That is, it is a credit that a vendor owes you because you overpaid your bill, returned merchandise, or for some other reason. The VendorCredit is not applied until it is referenced in a Bill Payment transaction.
Note: A VendorCredit should not be confused with a Credit Memo, which is something you owe your customer
ItemId refers to those items for which the credit is made. You can get the ItemId by calling the Item api in QBD. Refer is in your request here.
Since, you are not mentioning the itemid in your request xml, you got the response but the sync to QB desktop file failed. You Vendor credit object must have errored out.
To check if the entity is in an error state, you can check by executing a query and setting ErroredObjectsOnly="true".
http://docs.developer.intuit.com/0025_Intuit_Anywhere/0050_Data_Services/v2/0500_QuickBooks_Windows/0100_Calling_Data_Services/0015_Retrieving_Objects#Objects_in_Error_State
If the entity is in error state, you can query for the specific reason using the SyncStatus API:
http://docs.developer.intuit.com/0025_Intuit_Anywhere/0050_Data_Services/v2/0500_QuickBooks_Windows/0600_Object_Reference/SyncStatus
Please add the itemid reference in your request and it should work.
http://support.quickbooks.intuit.com/support/articles/SLN74445
QuickBooks has detected that you have no items When trying to enter an Invoice or a Sales Receipt without an item this warning is received:
QuickBooks has detected that you have no items or that one or more of your amounts are not associated with items. Please enter an item.
Why this is happening
If "Require Accounts" is checked in the Preferences this warning will occur.
How to fix it
To be able to enter in an Invoice or Sales Receipt without an Item on it:
1. Click the Edit Menu.
2. Click Preferences...
3. Click Accounting Preference> Company Preferences.
4. Uncheck Require accounts.
5. Click OK.
You will now be able to enter an Invoice or a Sales Receipt without an item on it.

Resources