Could someone provide a sample code to create an estimate using Soho Creator's Deluge script?
The following script doesn't work.
For the XMLString, I copied the sample that is given in the Soho Invoice API documentation for adding an estimate into a map. What am I doing wrong?
- mymap = map();
- myURLXMLstring = encodeUrl("<Estimate><CustomerID>3000000000338</CustomerID><EstimateDate>2009-09-06</EstimateDate><ReferenceNumber>121</ReferenceNumber><EstimateItems><EstimateItem><ProductID>3000000000332</ProductID></EstimateItem><EstimateItem><ItemName>Sample Item</ItemName><ItemDescription>Sample Description</ItemDescription><Price>34</Price><Tax1Name>PST</Tax1Name></EstimateItem></EstimateItems><Comments><Comment><Description>Comment added to an invoice</Description></Comment></Comments><Notes>Estimate Notes will be shown in PDF</Notes><Terms>Terms and Conditions apply</Terms></Estimate>");
- mymap.put("XMLString", myURLXMLstring);
- responsemap = postUrl("https://invoice.zoho.com/api/estimates/create?authtoken=mytoken&scope=invoiceapi&apikey=myapikey", mymap);
Thanks