eShop Example
- Overview
- Create New Customer (Person)
- Create New Deal
- Create New Invoice
- Create Recurring Billing Request
- Execute Workflow Actions Immediately
- Create New Marketing Trigger
Overview
Using Atollon to bill/invoice eShop purchases
How to use Atollon to quickly send invoices to eShop clients? See the illustration below describing the scheme necessary to adopt when billing from Atollon.
Used Functions
Functions to create objects:
(there may be some other functions necessary, if listing is required)
- CreateContact (main.wsdl)
- Use for both company & person
- CreateSimpleFolder (project.wsdl)
- For both company & person clients
- CreateProject (project.wsdl)
- CreateProjectItem (item.wsdl)
Create New Customer (Person)
First create new contact
CreateContact (main.wsdl) Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CreateContact>
<server>acme</server>
<session>6A941A9BC9EBEFAF585A4B936AA958755B1C85E2BD04</session>
<PERSON>
<name1>Jack</name1>
<name3>Buyer</name3>
<ADDRESSES>
<ADDRESS>
<cityName>London</cityName>
<countryName>United Kingdom</countryName>
<isPrimary>1</isPrimary>
<regionName>London</regionName>
<street>Our Street 10</street>
<type>132027101</type>
<zipName>1100</zipName>
</ADDRESS>
</ADDRESSES>
<CONTACTS>
<CONTACT>
<content>jackbuyer@gmail.com</content>
<isMain>1</isMain>
<isPrimary>1</isPrimary>
<type>132031101</type>
</CONTACT>
<CONTACT>
<content>33999888</content>
<isMain>0</isMain>
<isPrimary>1</isPrimary>
<type>132035101</type>
</CONTACT>
<CONTACT>
<content>990888333</content>
<isMain>0</isMain>
<isPrimary>1</isPrimary>
<type>132033101</type>
<typeType>3</typeType>
</CONTACT>
</CONTACTS>
<PERSONINFO>
<salutation>Dear Adam</salutation>
<preferedLang>131428101</preferedLang>
</PERSONINFO>
</PERSON>
</wsdl:CreateContact>
</soapenv:Body>
</soapenv:Envelope>
CreateContact Response
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
<ns0:Body>
<ns1:CreateContactResponse>
<result>OK</result>
<time>0.08316803</time>
<newId>139663101</newId>
</ns1:CreateContactResponse>
</ns0:Body>
</ns0:Envelope>
Create New Customer Folder
CreateSimpleFolder (project.wsdl) Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CreateSimpleFolder>
<server>acme</server>
<session>6A941A9BC9EBEFAF585A4B936AA958755B1C85E2BD04</session>
<FOLDER>
<name>Buyer, Jack</name>
<organization>130944101</organization>
<template>139633101</template>
<contact>139663101</contact>
<parent>130944101</parent>
</FOLDER>
</wsdl:CreateSimpleFolder>
</soapenv:Body>
</soapenv:Envelope>
CreateSimpleFolder Response
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
<ns0:Body>
<ns1:CreateSimpleFolderResponse>
<result>OK</result>
<time>0.28198600</time>
<newId>139676101</newId>
<TYPE>
<name>Client</name>
<guiAction/>
<id>132716101</id>
<iType>1</iType>
<masterProject>0</masterProject>
</TYPE>
</ns1:CreateSimpleFolderResponse>
</ns0:Body>
</ns0:Envelope>
Create New Deal
First Create Project Folder
CreateProject (project.wsdl) Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CreateProject>
<server>acme</server>
<session>6A941A9BC9EBEFAF585A4B936AA958755B1C85E2BD04</session>
<PROJECT>
<customer>139676101</customer>
<folder>139676101</folder>
<invoiceJournal>133150101</invoiceJournal>
<name>Super Sales</name>
<projectTemplate>133297101</projectTemplate>
<provider>132740101</provider>
</PROJECT>
</wsdl:CreateProject>
</soapenv:Body>
</soapenv:Envelope>
CreateProject Response
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
<ns0:Body>
<ns1:CreateProjectResponse>
<result>OK</result>
<time>0.24983001</time>
<newId>139704101</newId>
<TYPE>
<id>133295101</id>
<name>Deal</name>
<masterProject>0</masterProject>
<guiAction/>
<iType>2</iType>
</TYPE>
</ns1:CreateProjectResponse>
</ns0:Body>
</ns0:Envelope>
Second Create Billing Item
CreateProjectItem (item.wsdl) Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CreateProjectItem>
<server>acme</server>
<session>6A941A9BC9EBEFAF585A4B936AA958755B1C85E2BD04</session>
<ITEM>
<amount>1234</amount>
<billingDate>2020-05-14T00:00:00</billingDate>
<billingStatus>3</billingStatus>
<totalQuantity>5</totalQuantity>
<catalogPrice>190</catalogPrice>
<currency>CZK</currency>
<item>133629101</item>
<name>AAA Batteries</name>
<project>139704101</project>
<purchasePrice>130</purchasePrice>
<quantity>5</quantity>
<totalAmount>6170</totalAmount>
<totalAmountWithVat>6787</totalAmountWithVat>
<vatValue>10</vatValue>
<ratio>100</ratio>
</ITEM>
</wsdl:CreateProjectItem>
</soapenv:Body>
</soapenv:Envelope>
CreateProjectItem Response
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
<ns0:Body>
<ns1:CreateProjectItemResponse>
<result>OK</result>
<time>0.01379299</time>
<count>0</count>
<itemId>139721101</itemId>
</ns1:CreateProjectItemResponse>
</ns0:Body>
</ns0:Envelope>
Create New Invoice
Create Invoice from Billing Items in For approval Status
CreateInvoicesFromItems (invoice.wsdl) Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CreateInvoicesFromItems>
<server>acme</server>
<session>6A941A9BC9EBEFAF585A4B936AA958755B1C85E2BD04</session>
<PROJECTS>
<RECORD>
<id>139704101</id>
</RECORD>
</PROJECTS>
</wsdl:CreateInvoicesFromItems>
</soapenv:Body>
</soapenv:Envelope>
CreateInvoicesFromItems Response
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
<ns0:Body>
<ns1:CreateInvoicesFromItemsResponse>
<result>OK</result>
<time>0.52524996</time>
<INVOICE>
<id>139758101</id>
<invoiceNumber>232010001</invoiceNumber>
</INVOICE>
</ns1:CreateInvoicesFromItemsResponse>
</ns0:Body>
</ns0:Envelope>
Create Recurring Billing Request
On top of created project (deal), it is possible to create recurring billing request.
See the documentation of CreateFolderItem function for more details.
Example CreateFolderItem (item.wsdl) Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CreateFolderItem>
<server>acme</server>
<session>7CDF678513DCBF0379DDD26A6961B604D7F1515CBD04</session>
<ITEM>
<amount>1234</amount>
<billingDate>2020-05-14T00:00:00</billingDate>
<billingStatus>2</billingStatus>
<totalQuantity>5</totalQuantity>
<catalogPrice>190</catalogPrice>
<currency>CZK</currency>
<item>133629101</item>
<name>Repeated service</name>
<note>Billing the yearly service.</note>
<purchasePrice>130</purchasePrice>
<quantity>5</quantity>
<folder>139676101</folder>
<totalAmount>6170</totalAmount>
<totalAmountWithVat>6787</totalAmountWithVat>
<vatValue>10</vatValue>
<ratio>100</ratio>
<taxationDate>2020-05-14T00:00:00</taxationDate>
<isModelItem>1</isModelItem>
<validFrom>2020-05-14T00:00:00</validFrom>
<validTo>2099-05-04T00:00:00</validTo>
<destinationProject>139704101</destinationProject>
<billingFrequency>2</billingFrequency>
</ITEM>
</wsdl:CreateFolderItem>
</soapenv:Body>
</soapenv:Envelope>
CreateFolderItem (Response)
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
<ns0:Body>
<ns1:CreateFolderItemResponse>
<result>OK</result>
<time>0.01345706</time>
<count>0</count>
<itemId>139812101</itemId>
</ns1:CreateFolderItemResponse>
</ns0:Body>
</ns0:Envelope>
Execute Workflow Actions Immediately
In case your integration requires executing workflow actions immediately after your request, it is necessary to call CheckWorkflowQueue function that is part of features.wsdl.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CheckWorkFlowQueue>
<server>yourserver</server>
<session>---yoursessionstring---</session>
</wsdl:CheckWorkFlowQueue>
</soapenv:Body>
</soapenv:Envelope>
Create New Marketing Trigger
Marketing triggers are used to track any activity of the contact / public user, which have some meaning in your company sales or marketing process.
The example below notifies Atollon about new phone number added to contact. Atollon may therefore create call task.
Example Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:CreateMarketingTriggers>
<server>acme</server>
<session>61A...DBD04</session>
<MARKETING_TRIGGER>
<baseType>new-phone-number</baseType>
<contextId>132716101</contextId>
<contactId>139663101</contactId>
<url>www.yourcompany.com/product/page</url>
<trackingCode>www.company.com/product/page</trackingCode>
<description>Extranet user added new phone number</description>
<triggerDate>2020-07-31 12:00</triggerDate>
<numberOfVisits>1</numberOfVisits>
</MARKETING_TRIGGER>
</wsdl:CreateMarketingTriggers>
</soapenv:Body>
</soapenv:Envelope>
Example Response
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
<ns0:Body>
<ns1:CreateMarketingTriggersResponse>
<result>OK</result>
<time>0.22972488</time>
<newId>400097101</newId>
</ns1:CreateMarketingTriggersResponse>
</ns0:Body>
</ns0:Envelope>
Fields Description
Field name | Example | Description |
baseType |
new-phone-number url-visit goal-achieved |
Text identification of the marketing trigger (what actually happened) |
contextId | 123456789000 | Identification 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. |
contactId | 113456789000 | Identification of contact, who caused the trigger |
url | https://yourcompany.atollon.com/pub/23423432 | Page that the contact visited (optional) |
trackingCode | yourSuperCampaignXYZ | Any text string representing one particular campaign / marketing activity / message template |
description | Contact visited URL | Any descriptive text that will be visible to Atollon users in Timeline |
triggerDate | 2020-08-12 12:00 | When the trigger happened? |
numberOfVisits | 45 | In case the target user is super active (or robot), we may want to avoid spamming Atollon with unnecessary records and aggregate page visits |