Saasu – Company information via the API
May 16, 2012 /
Posted in Integration Corner
If you are using Saasu and looking to integrate with Salesforce or a CRM that has a Company object, you’ll need to handle this differently with Saasu. With the Saasu API you are able to create/update a Contact’s Company information via the Contact page as Company in Saasu is not a separate object.
To retrieve or create the Company information, we can do this via the Contact Object. In a Contact profile, Saasu utilizes the following elements to associate with the Contact’s Company:
organisationName, organisationAbn, organisationWebsite
Following is an example of a insertContact Request profile which consist of the Company information (see the bold section):
<?xml version=”1.0″ encoding=”utf-8″?>
<tasks>
<insertContact>
<contact uid=”0″>
<salutation>Mr.</salutation>
<givenName>John</givenName>
<familyName>Smith</familyName>
<organisationName>Saasy.tv</organisationName>
<organisationAbn>777888999</organisationAbn>
<organisationPosition>Director</organisationPosition>
<email>john.smith@saasy.tv</email>
<mainPhone>02 9999 9999</mainPhone>
<mobilePhone>0444 444 444</mobilePhone>
<contactID>XYZ123</contactID>
<tags>Gold Prospect, Film</tags>
<postalAddress>
<street>3/33 Victory Av</street>
<city>North Sydney</city>
<state>NSW</state>
<postCode>2000</postCode>
<country>Australia</country>
</postalAddress>
<otherAddress>
<street>111 Elizabeth street</street>
<city>Sydney</city>
<state>NSW</state>
<postCode>2000</postCode>
<country>Australia</country>
</otherAddress>
<isActive>true</isActive>
<acceptDirectDeposit>false</acceptDirectDeposit>
<directDepositAccountName>John Smith</directDepositAccountName>
<directDepositBsb>000000</directDepositBsb>
<directDepositAccountNumber>12345678</directDepositAccountNumber>
<acceptCheque>false</acceptCheque>
<customField1>This is custom field 1</customField1>
<customField2>This is custom field 2</customField2>
<twitterID>Contact twitter id</twitterID>
<skypeID>Contact skype id</skypeID>
<saleTradingTerms>
<type>1</type>
<interval>7</interval>
<intervalType>1</intervalType>
</saleTradingTerms>
<purchaseTradingTerms>
<type>2</type>
<interval>14</interval>
<intervalType>1</intervalType>
</purchaseTradingTerms>
<defaultSaleDiscount>15.75</defaultSaleDiscount>
<defaultPurchaseDiscount>12.50</defaultPurchaseDiscount>
</contact>
</insertContact>
</tasks>
For example, when creating/updating a Contact, the operation would use the organisationName value to find for matching Company Name and if there is no match, the defined Company will be created in Saasu instead.