How do you add a job to an existing customer. I have tried both CustomerAddRq and CustomerModRq and neither works. My client wants to create a new job for each customer contract and track invoices and bills by job.
Would appreciate some help.
To add a job, you call CustomerAdd and specify the ParentRef of the parent customer.
For example:
<CustomerAddRq>
<CustomerAdd>
<Name>Child Customer Name</Name>
<ParentRef>
<FullName>Parent Customer Name</FullName>
</ParentRef>
<FirstName>Keith</FirstName>
<LastName>Palmer</LastName>
<Phone>860-634-1602</Phone>
<Email>support#consolibyte.com</Email>
</CustomerAdd>
</CustomerAddRq>
Here's a few additional examples:
qbXML for adding a job
other qbXML examples
Related
I am trying to do this example.
In here the added queryGuid to Appconfig file. Can anyone please help me to find that queryGuid in TFS.
This is the tag in Appconfig:
<add key="queryGuid" value="12345678-d96b-4f03-9ceb-1b49de27ef41"/>
When you enter a query you can see the Query GUID on the url:
https://tfs-server:8080/tfs/Collection/Project/_queries/query/{Query GUID}
If you want to get daily mails for TFS queries you can install also Scheduled Work Item Query extnsion, it's a new extension that sends an E-Mail on a schedule for Work Item Queries.
I've been using QuickBooks Enterprise, Web connector ver: 2.1.0.30 and the framework found here: https://github.com/consolibyte/quickbooks-php for adding invoices and jobs. It is working fine but I can't get the CLASS of the invoice to be shown in quickbooks. I pass it correctly in my xml (I get no error and the invoice gets added), as described in accepted answer here: quickbooks desktop web connector qbxml: add invoice with CLASS field but it doesn't show in quickbooks. Here is the part of my xml:
...<InvoiceLineAdd>
<ItemRef>
<FullName>item name</FullName>
</ItemRef>
<Desc>item description</Desc>
<Quantity>2</Quantity>
<Rate>123</Rate>
<ClassRef>
<FullName>class name</FullName>
</ClassRef>
</InvoiceLineAdd>...
When I edit the invoice in quickbooks it has no CLASS selected and CLASS field is empty, I can't post screen-shot, the CLASS field appears as a dropdown right next to CUSTOMER JOB field when editing the invoice.
So is there anything else I should do for the class to show up?
Thanks in advance.
You are adding Class to the invoice line. If you want it at the invoice level, you need to use the ClassRef in the invoice and not on the line.
I need to know more on the back end flow, when a user adds an item to cart as a guest and the logs in using his valid credentials. The orderId created for the guest gets migrated to the registered user's id. Could someone please explain how this is handled ? Details of the commands and DB tables would be helpful.
I did read about a MigrateUserEntries Command but I am not sure if that is the correct one.
Thanks in advance.
When a guest user logs in, his cart gets merged with the cart of the registered user account.
This impacts the tables related to order and order items.
You can look at the documentation of OrderCopy for more details.
But the Trick here is :-
public class MigrateUserEntriesCmdImpl
extends TaskCommandImpl
implements MigrateUserEntriesCmd
This task command is used to migrate resources owned by one user to another. The mandatory resources that are migrated are Addresses, Current Orders, Interest Items, Order Items, Orders, and Order templates.
By default, this command will not merge the shopping cart for the 2 users, but it can be configured to do so by:
a) Setting the mergeCart flag in the request property in the command context to true.
OR:
b) Setting MemberSubSystem/MergeCartsAtAuthentication/enabled in the wc-server.xml to true.
The mergeCart flag in the request property will take higher priority.
Before executing this task command the following sets should be performed:
setOldUser() -->getOldUser()
This method retrieves the old user whose resources are to be migrated to the new user.
setNewUser() -->getNewUser()
This method retrieves the new user who is the recipient of migrated resources from the old user.
These both OldUser and NewUser will be able to retrieve from UserAccessBean of concern JSP.
migrateOrderItem(OrderItemAccessBean abOrderItem, UserAccessBean abNewUser, CommandContext newUserCmdCtx)
This method migrates an order item to a new user.
First, some review about User lifecycle in WCS commerce :
1- user visited the site as generic user with USER ID = -1002
2- when user add any item to his shopping cart , WCS create an OrderId and assign it to new USER ID created and user called "guest" in this case
(both #1 and #2) have userType=G
3- when user log in using login form it is by default attached to LogonCmd in struts configuration , and if you decompile that controller command you will see that it is calling MigrateUserEntriesCmd task command which responsible for migrating Addresses, Current Orders, Interest Items, Order Items, Orders, and Order templates.
the new orderID that is used is the Registered OrderId .
I suggest you use decompiler installed to your RAD so you can decompile IBM classes for better understanding of the logic and then customize your code as IBM best practice (extending commands .. etc )
I use JAD eclipse plugin for decompilation .
you can further read (references):
http://pic.dhe.ibm.com/infocenter/wchelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.commerce.admin.doc%2Fconcepts%2Fcmsmembers.htm&resultof%3D%2522%2555%2553%2545%2552%2553%2522%2520%2522%2575%2573%2565%2572%2522%2520
http://pic.dhe.ibm.com/infocenter/wchelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.commerce.api.doc%2Fcom%2Fibm%2Fcommerce%2Fsecurity%2Fcommands%2FMigrateUserEntriesCmdImpl.html
Thanks
Abed
In login page add this code when user Guest and OrderItemMove is out of box command used
<pre>
<c:if test="${userType == 'G'}">
<wcf:url var="orderMove" value="OrderItemMove" type="Ajax">
<wcf:param name="toOrderId" value="."/>
<wcf:param name="deleteIfEmpty" value="*"/>
<wcf:param name="fromOrderId" value="*"/>
<wcf:param name="continue" value="1"/>
<wcf:param name="createIfEmpty" value="1"/>
<wcf:param name="calculationUsageId" value="-1" />
<wcf:param name="calculationUsageId" value="-2" />
<wcf:param name="calculationUsageId" value="-7" />
<wcf:param name="updatePrices" value="0"/>
</wcf:url>
</c:if>
</pre>
Button javascript code User clicks on :
LogonSubmit(document.Logon,'<c:out value='${orderMove}'/>','<c:out value='${afterOrderCalculateURL}'/>');void(0);">
After validation and form the URL
function LogonSubmit{
var completeOrderMoveURL = orderMoveURL;
completeOrderMoveURL = completeOrderMoveURL + "&URL=OrderCalculate?URL=" + afterOrderCalculateURL +"&calculationUsageId=-1&calculationUsageId=-2&calculationUsageId=-7";
document.getElementById('URL').value = completeOrderMoveURL;
}
//Then submit the form
form.submit();
I hope this Help for merging the items after login
I've gotten frustrated with the .NET DevKit and am now considering switching my app over to XML. But I'm still having trouble figuring out how to perform very basic queries.
How can I retrieve a QBD Sales Order by the order number? This is the "Sales Order Number" in the QBD UI, "RefNumber" in the SDK, and "DocNumber" in IPP.
Just in case somebody needs me to explain the use case for looking up a record by the human-readable unique ID: I'm integrating with a system where we don't have the luxury of storing a QB transaction ID after importing a sales order. So if that system wants to query QB later to check the status of a sales order, it needs to do so by that system's unique order #.
I already have links to all the documentation; thanks. I just need to know how to perform this query. Similarly, I need to do it for Invoices and POs.
I need the same thing for Items, the use case being that if we're importing items from another system, we need to query the QB item list by name to see if we already have that item in QB.
For ITEMS, you can use ItemConsolidated and a NameContains filter. For example, the XML would look something like:
POST https://services.intuit.com/sb/itemconsolidated/v2/<realmID>
...
<?xml version="1.0" encoding="UTF-8"?>
<ItemConsolidatedQuery xmlns="http://www.intuit.com/sb/cdm/v2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 RestDataFilter.xsd ">
<NameContains>Your item name goes here</NameContains>
</ItemConsolidatedQuery>
It won't be perfect, because Intuit only supports "NameContains" (the item name contains the string you specify) rather than "NameEquals", but you can then loop through what you get back and filter it client-side from there.
For SALES ORDERS, unfortunately, Intuit Data Services doesn't support querying by DocNumber at this time.
Instead, a work-around for your situation might be to query for all sales orders, and then cache the Id and DocNumber value of each in your application. When you need to look something up, look up the Id in the cache, and then query by Id value. It's not pretty... but it's really the only way you can do what you're describing.
I'm working in QBXML and trying to apply a payment to specific invoice in a ReceivePaymentAddRq. I'm getting the, apparently quite common, "Object TxnID specified in the request cannot be found". Most other forums threads on this topic are resolved once the ARAccountRef field is added to the request, that didn't seem to make a difference for me.
I've queried the invoice for TxnID 68B4-1290718970 and verified the following:
My request's ARAccountRef ListID matches what is in the QueryRet
My request's CustomerRef ListID matches what is in the QueryRet
My XML request is below. What am I missing?
Thanks
<QBXML>
<QBXMLMsgsRq onError = "continueOnError">
<ReceivePaymentAddRq requestID = "0">
<ReceivePaymentAdd>
<CustomerRef>
<ListID>80000111-1286514304</ListID>
</CustomerRef>
<ARAccountRef>
<ListID>80000091-1273734429</ListID>
</ARAccountRef>
<TxnDate>2010-11-10</TxnDate>
<RefNumber>2999 </RefNumber>
<TotalAmount>15.95</TotalAmount>
<PaymentMethodRef>
<ListID>80000002-1273560098</ListID>
</PaymentMethodRef>
<Memo>_32T0DE94J</Memo>
<DepositToAccountRef>
<ListID>80000090-1273734138</ListID>
</DepositToAccountRef>
<AppliedToTxnAdd>
<TxnID>68B4-1290718970</TxnID>
<PaymentAmount>15.95</PaymentAmount>
</AppliedToTxnAdd>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
</QBXMLMsgsRq>
</QBXML>
For anyone else's reference, the question was already answered over here:
https://idnforums.intuit.com/messageview.aspx?catid=7&threadid=14923&enterthread=y
Updated answer now that Intuit have taken down their own forums:
There are a couple of common reasons for the error you're seeing:
The object you're referring to (68B4-1290718970) might not exist. Are you 100% positive this transaction exists?
The object you're referring to might not be something you can apply a payment to. You apply payments to Invoices. Is the object you're referring to an invoice?
The object you're referring to might not have the same currency that the payment has. Are you using multi-currency with QuickBooks, and do the currencies match?
The object you're referring to may not have a matching A/R account with the payment. This is especially common if you have multiple A/R accounts in QuickBooks, and you're not explicitly specifying which A/R account to use when creating the invoice or payment. Do the A/R accounts for the invoice and the payment match?
The object that you're referring to might not have an open balance (e.g. it might already be paid). Does the object that you're referring to have a balance of at least 15.95? (the amount you tried to apply)