# Web Service Functions List of Web Services functions examples and their explanation. # CreateFolderItem #### Description Create recurring billing request. Recurring billing request is used to instruct the server to create individual instance of **Billing Request**, which is a source for Invoice creation. #### Important Parameters
amountUnit price to be charged
billingDateSample date, in which the Billing Request will be used as a date for invoicing.
billingStatus1 .. Pending 2 .. For Approval (Sales Order may be generated here) 3 .. To Be Invoiced (Invoice may be generated here)
totalQuantityPcs to be charged per Unit price after free Qty is reduced
catalogPricePrice before any discounts
itemProduct ID
nameMain title of the future Billing Request
noteFuture description of Billing Request
purchasePriceUnit price for which the goods is purchased
QuantityPcs to be charged per Unit Price
folderCustomer folder ID
totalAmounttotal qty \* amount
totalAmountWithVattotalAmount + VAT
vatValueVAT rate in numbers
ratiofixed value (100) = 100%
taxationDateDate relative to Billing Date, in which you may decide to put the transaction into current / previous / next periods. Put any date close to Billing Date (ie any day in the same/previous month)
isModelItem1
validFromDate, from which the rule becomes active. Difference of dates between validFrom and billingDate is important. Item generated in validFrom = today should have billingDate today + 1 year, in case the first next fee is paid after one year of using the service.
validToExpiration date
destinationProjectTarget Project ID, where the Billing Request will be created.
billingFrequency2 .. yearly 4 .. quarterly 6 .. monthly 8 .. weekly 10 .. daily
#### Request Example ```XML acme 7CDF678513DCBF0379DDD26A6961B604D7F1515CBD04 1234 2020-05-14T00:00:00 2 5 190 CZK 133629101 Repeated service Billing the yearly service. 130 5 139676101 6170 6787 10 100 2020-05-14T00:00:00 2020-05-14T00:00:00 2099-05-04T00:00:00 139704101 2 ``` #### Response Example ```XML OK 0 139812101 ``` # UpdateFormItemValues There are several scenarios to use this function, based on knowledge you have about the form, where you want to save the data. #### FormValuesId + formItemName You may gather **formValuesId** from context object using get function (getFolder, getProject, getActivity). **FormValuesId** is bigint which identifies set of values of one form instance. **formItemName** is the name of form field. Form fields may be listed using **ListFormItem** method. ```XML acme ....string_here.... 392302101 form-component-name-here 123456 ``` # GetDocument #### WSDL document\_library.wsdl #### Required parameter - id - id of saved file #### Example Request ```XML multi BDA7025DFBA9CDF53AE306DB4372AF3492FA59DBBD04 141942102 ``` #### Example Response ```XML OK 1 141942102 AdminAtollon 141942102 DLIB000000008997 1PMP-Canvas.pdf 0 133780102 2020/06/22/141941102 0 134567102 204248 0 3 1PMP-Canvas.pdf 0 0 2020-06-22T16:27:00 2020-06-22T16:27:00 2020-06-22T00:00:00 2020-06-22T00:00:00 134687102 1 application/pdf; charset=binary 134567102 ``` # ListDocument Function that lists document in given folder. Documents can be stored in most of the folders of tree structure. Therefore any context ID (Folder, Project or Activity) may act as document placeholder = **parent** #### WSDL document\_library.wsdl #### Example Request ```XML multi BDA7025DFBA9CDF53AE306DB4372AF3492FA59DBBD04 100 0 134567102 and aa.doc_parent is null ``` The restriction means no older document versions would be returned as a result of query. #### Example Response ```XML OK 1 AdminAtollon 141942102 DLIB000000008997 1PMP-Canvas.pdf 0 133780102 2020/06/22/141941102 0 134567102 204248 0 3 1PMP-Canvas.pdf 0 0 2020-06-22T16:27:00 2020-06-22T16:27:00 2020-06-22T00:00:00 2020-06-22T00:00:00 134687102 1 application/pdf; charset=binary ``` # CreateGlobalText Global texts are used as storage of localizable text blocks, usually used in printing. Part of [translate.wsdl](https://help.atollon.com/books/atollon-api/page/wsdl-listing "WSDL Listing") LANG must be EN. Below is the example of Invoice footer print. ### Request Example ```XML acme 4D2...D04 invoice-footer 131485101 In case of any questions, or request for additional details, do not hesitate to contact us by email to invoice@company.com or using phone number +44 00099333. Yours sincerely, Your Team. ``` ### Response Example ```XML OK 0 1936935101 ``` ### Related Functions [ListLanguages](https://help.atollon.com/books/atollon-api/page/listlanguages "ListLanguages") ## Global Text Idents Below you can find examples of Global text idents that are used mainly as text blocks when printing documents from ATOLLON.
**Document****Global text IDENT****Description**
Invoice issuedinvoice-footerPrint text at the bottom of invoice
Estimateestimate-footerPrint text at the bottom of estimate
Invoice/estimate/order/offerinvoice-global-CSSUse corporate CSS
# CreateMarketingTriggers #### Description Marketing triggers are used to track any activity of the contact / public user, which have some meaning in your company sales or marketing process. #### Fields Description
**Field name****Example****Description**
baseTypenew-phone-number url-visit goal-achieved mail-url-visit mail-open url-visit unsubscribe Text identification of the marketing trigger (what actually happened)
contextId123456789000Identification of Folder ID, Project ID or Activity ID in Atollon's context structure. It is necessary to enter context ID in case it should be displayed in context Timeline.
contactId113456789000Identification of contact, who caused the trigger
urlhttps://yourcompany.atollon.com/pub/23423432Page that the contact visited (optional)
trackingCodeyourSuperCampaignXYZAny text string representing one particular campaign / marketing activity / message template
descriptionContact visited URLAny descriptive text that will be visible to Atollon users in Timeline
triggerDate2020-08-12 12:00When the trigger happened?
numberOfVisits45In case the target user is super active (or robot), we may want to avoid spamming Atollon with unnecessary records and aggregate page visits
The example below notifies Atollon about new phone number added to contact. Atollon may therefore create call task. #### Example Request ```XML acme 61A...DBD04 new-phone-number 132716101 139663101 www.yourcompany.com/product/page www.company.com/product/page Extranet user added new phone number 2020-07-31 12:00 1 ``` #### Example Response ```XML OK 400097101 ``` #### WSDL Listing **web.wsdl** # NewMail #### Description New mail function is used to send regular e-mail from Atollon. I supports sending both plaintext and html e-mails. In case html e-mail is sent, plaintext part is generated automatically. #### Fields Description
**Field****Description****Example**
priorityE-mail priority handled by other mail clients1, 2, 3
groupMessage group with similar characteristics, requiredFor e-mails sent in context, there is always default "group" available in the response of request to getFolder, getProject, getActivity. For example: <messageGroup>133185101</messageGroup>
treeHandleMessage container (mailbox)Similar comment to "group" field above: <messageDefault>133186101</messageDefault>
htmlWhat is the body format?0..plaintext 1..html
encodingUse utf-8 onlyutf-8
fromFull format of sender mailbox
toRecipient address
subjectSubject of the message
bodyEither plaintext or html part of the message (based on above html = 0/1 flag)
attachments.attachmentLink to documentId in Atollon. The document will be converted to base64 and added to sent e-mail
forwardEmailsList ids of e-mail messages that will be attached
#### Example ```XML acme 5B5EA....8BD04 2 491826101 491827101 1 utf-8 "Your team" <admin@mydomain.com> jan@safka.cz Welcome to your new world of success <html><head><title>Welcome to your new world of success</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333; } a:link { color: #666666; } a:visited { color: #999999; } --> </style></head><body><div ALIGN="LEFT"><span style="font-family:helvetica,arial,sans-serif; font-size:12px; color:#000000; ">This is the secret message</span></div> <br/> <div ALIGN="LEFT"><span style="font-family:helvetica,arial,sans-serif; font-size:12px; color:#000000; ">Your super powerful team</span></div> </body></html> 496477101 ``` ##### Response ```XML OK 496505101 MSGS000000151828 0 ``` # GetSchedulerSettings ##### Description Function that takes care about administration of lists connected with Events (calendar), Tasks and Issues. Settings are administered using one function only - UpdateSchedulerSettings. ##### Type of settings
**ListType****Settings**
1Scheduler status
2Severity
3Solution status
4Type of work
# CreateProjectItem #### Description Create **billing request**. Billing request is used as a source for creating new invoice. That invoice can be created manually from Billing Invoices, using Draft Invoice generation or using one-off function CreateInvoicesFromItems. #### Important Parameters
amountUnit price to be charged
billingDateDate, in which the Billing Request will become valid for invoicing.
billingStatus0 .. Sales Items (representing Deal Value) 1 .. Pending 2 .. For Approval (Sales Order may be generated here) 3 .. Approved by manager (Invoice may be generated here, only users with Authorize rights to project may approve billing items) 4 .. Billed 5 .. Approved by client 6 .. Postponed 7 .. Canceled 999 .. Installed technology project items // will be canceled
type1 .. sales items or billing items 2 .. auto-generated time sheet item 3 .. installed technology
catalogPricePrice before any discounts (also referred as Recommended Price, Price List Price, ...). The original price, from which discount is calculated.
itemProduct ID
nameMain title of the Billing Request
noteDescription of Billing Request
purchasePriceUnit price for which the goods is purchased
quantityPcs to be charged per Unit Price
folderCustomer folder ID
totalAmountqty \* amount
totalAmountWithVattotalAmount + VAT
vatValueVAT rate in numbers
ratiofixed value (100) = 100% (used only in sales opportunity/deal to evaluate probability of the item in the sales basket)
projectProject ID, where the Billing Request will be created.
#### Request Example #### CreateProjectItem (item.wsdl) Request ```XML acme 6A941A9BC9EBEFAF585A4B936AA958755B1C85E2BD04 1234 2020-05-14T00:00:00 3 5 190 CZK 133629101 AAA Batteries 139704101 130 5 6170 6787 10 100 ``` #### CreateProjectItem Response ```XML OK 0 139721101 ``` # ListLanguages Part of [translate.wsdl](https://help.atollon.com/books/atollon-api/page/wsdl-listing "WSDL Listing") ### Sample Request ```XML saas FB...C3 ``` ### Sample Response Reduced to one item. ```XML iso-8859-2 2607000 Czech CZE cz 0 1 1 ``` # ListContactList #### Description Function listing basic contact configuration items / lists. #### Important Parameters
listcontacttype industry nationality companylegalform category department position addresstype relationtype\_p (person) relationtype\_c (company)
treeHandleeither use "node" attribute from [Login](mks://localhost/en/devel/API/Functions_Examples/Login_Example "en/devel/API/Functions Examples/Login Example") function, DEFAULTS->DEFAULT with "ident" CONTACTCONFIGNODE or use attrib **useDefaultTreeHandle** = true
#### Request Example ```XML                      atollon          4A...04          1685000          contacttype          ``` #### Response Example ```XML                      OK                   12                      1883000             E-mail (other)             1                               1884000             E-mail (personal)             1                               1885000             E-mail (work)             1                   ...          ``` # ModifyProjectItemValues # **8 metod nastavení cen položek kufříku** - **SetPurchaseByMargin** z: Unit Sales Price a Margin - Změna nákupní jednotkové ceny na základě zadané marže, vychází z jednotkové ceny prodejní. - **purchase\_price = amount x (1 - value)** ``` SetPurchaseByMargin: purchase_price = amount x (1 - value) ``` - **SetSalesByMargin** z: Unit Purchase Price a Margin - Změna prodejní jednotkové ceny na základě zadané marže, vychází z jednotkové ceny nákupní. - **amount = purchase\_price/ (1 - value)** ``` SetSalesByMargin: amount = purchase_price/ (1 - value) ``` - **SetPurchaseByPurchase** - Změna nákupní jednotkové ceny na základě zadané nové **celkové nákupní ceny**, postup (zkráceně: zvýšit/snížit jednotkovou cenu dle % změny celkové ceny): - sečíst původní položky sum(**purchase\_price\*quantity** (itm\_project\_item\_par)) = **total\_purchase\_old** - hodnota **value** reprezentuje novou celkovou nákupní cenu - zjistit % změnu **dif = value / total\_purchase\_old** - změnit hodnotu všech stávajících jednotkových purchase\_price = **purchase\_price**(itm\_project\_item\_par) x **value** - pokud je sum purchase\_price = 0, potom se jde na metodu SetUnitPurchaseToTotalPurchaseBySalesUnit ``` SetPurchaseByPurchase: purchase_price=purchase_price*(value/sum(purchase_price*quantity)) ``` - **SetPurchaseBySales** - pokud jsou všechny nákupní ceny = 0, potom se použije výpočet obdobný, ale bude vycházet na základě cen prodejních (tedy sum(amount)) - pokud je sum amount = 0, potom se jde na metodu SetUnitPurchaseToTotalPurchaseByQty ``` SetPurchaseBySales: purchase_price=amount*(value/sum(amount*quantity)) ``` - **SetPurchaseByQuantity** - pokud jsou všechny prodejní ceny = 0, potom se použije výpočet obdobný, ale bude se vycházet na základě počtu ks (qty) … tedy spočítá se jednotková nákupní cena za položku … purchasePerQty = value / qty a tou se roznásobí hodnota - tedy purchase\_price \* purchasePerQty ``` SetPurchaseByQuantity: purchase_price=(value/sum(quantity)) ``` - **SetSalesBySales** - Změna prodejní jednotkové ceny na základě zadané nové **celkové prodejní ceny,** postup (zkráceně: zvýšit/snížit jednotkovou cenu dle % změny celkové ceny): - sečíst původní položky sum(**amount\*quantity** (itm\_project\_item\_par)) = **amount\_without\_vat\_old** - hodnota **value** reprezentuje novou celkovou prodejní cenu - zjistit % změnu **diff = value** / **amount\_without\_vat\_old** - změnit hodnotu všech stávajících jednotkových **amount** = **amount** (itm\_project\_item\_par) x **diff** - pokud jsou všechny prodejní ceny sum (amount) = 0, použije se SetUnitSalesToTotalSalesByUnitPurchase ``` SetSalesBySales: amount=amount*(value/sum(amount*quantity)) ``` - **SetSalesByPurchase** - pokud jsou všechny prodejní ceny = 0, potom se použije výpočet obdobný, ale bude vycházet na základě cen nákupních (tedy sum(purchase\_price)) - pokud jsou všechny nákupní ceny sum (purchase\_price) = 0, použije se SetUnitSalesToTotalSalesByQty ``` SetSalesByPurchase: amount=purchase_price*(value/sum(purchase_price*quantity)) ``` - **SetSalesByQuantity** - pokud jsou všechny nákupní ceny = 0, potom se použije výpočet obdobný, ale bude se vycházet na základě počtu ks (qty) - vypočítá se pricePerQty = value / Qty, pak pro každou položku Qty \* pricePerQty ``` SetSalesByQuantity: amount=(value/sum(quantity)) ``` # CreateEvent #### WSDL scheduler.wsdl #### Related Services [GetSchedulerSettings](https://help.atollon.com/books/atollon-api/page/getschedulersettings "GetSchedulerSettings") Contains several configurations of lists, incl. **Solution Status** and **Type of Work (entryType)** used in creating New Event. Please note that Solution Status should be selected based on Type of work and current user's profile. #### Example Request ```XML Operation request: 'CreateEvent' acme ... 0 0 0 0 0 //--ID of event owner-user--// 0 //--ID of event owner-user--// Event location text //-- ID of custom state--// 0 0 0 //-- ID of customer folder--// 0 0 0 0 0 0 0 Event description text ... 2023-03-09T12:30:00 2023-03-09T12:00:00 0 //-- ID of type of work--// //----// 0 //--ID of event organizer-user--// Event summary main text 0 0 0 //--ID of event owner-user--// 2 2023-03-09T12:06:23 2023-04-09T00:00:00 1 0 0 0 0 4 12:00 12:30 0 0 1 1 ``` #### Example Response ```XML Operation response: 'CreateEvent' OK create 107751483081 107751484081 107751483081 ```