This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Accounts in SalesBinder
Overview
The following operations allow you to work with accounts. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with accounts, see Sample configuration.
Operation | Description |
---|---|
Creates a new account. | |
getAccountById | Retrieves account details. |
listAccounts | Retrieves all accounts. |
Operation details
This section provides further details on the operations related to accounts.
Creating a new account
The createAccount operation creates a new account.
<salesbinder.createAccount> <billingAddress1>{$ctx:billingAddress1}</billingAddress1> <billingAddress2>{$ctx:billingAddress2}</billingAddress2> <shippingPostalCode>{$ctx:shippingPostalCode}</shippingPostalCode> <shippingAddress1>{$ctx:shippingAddress1}</shippingAddress1> <officeFax>{$ctx:officeFax}</officeFax> <shippingAddress2>{$ctx:shippingAddress2}</shippingAddress2> <url>{$ctx:url}</url> <contextId>{$ctx:contextId}</contextId> <billingRegion>{$ctx:billingRegion}</billingRegion> <billingPostalCode>{$ctx:billingPostalCode}</billingPostalCode> <officeEmail>{$ctx:officeEmail}</officeEmail> <name>{$ctx:name}</name> <officeNumber>{$ctx:officeNumber}</officeNumber> <shippingRegion>{$ctx:shippingRegion}</shippingRegion> <billingCity>{$ctx:billingCity}</billingCity> <shippingCountry>{$ctx:shippingCountry}</shippingCountry> <billingCountry>{$ctx:billingCountry}</billingCountry> <shippingCity>{$ctx:shippingCity}</shippingCity> <customerLabelId>{$ctx:customerLabelId}</customerLabelId> </salesbinder.createAccount>
Properties
Billing address Line 1 of the customer.billingAddress1:
Billing address Line 2 of the customer.billingAddress2:
Shipping postal code or zip code of the customer.shippingPostalCode:
Shipping address Line 1.shippingAddress1:
Office fax of the customer.officeFax:
Shipping address line 2.shippingAddress2:
Company website address of the customer.url:
The value to determine what type of account you want to create.contextId:
Billing region (Province or State).billingRegion:
Billing Postal Code or Zip Code of the customer.billingPostalCode:
Office email address of the customer.officeEmail:
Business name of the customer.name:
Office phone number of the customer.officeNumber:
Shipping region (Province or State) of the customer.shippingRegion:
Billing city of the customer.billingCity:
Shipping country of the customer.shippingCountry:
Billing country of the customer.billingCountry:
Shipping city for the customer.shippingCity:
The ID of the customer label.customerLabelId:
Sample request
Following is a sample REST/JSON request that can be handled by the createAccount
operation.
{ "apiUrl": "https://sblsoft.salesbinder.com", "apiKey": "cb2192d4832db952ac5d0ec9f41770e88c733c0f", "billingAddress1": "Richland", "shippingAddress1": "Malabe", "officeFax": "234344", "contextId": "2", "billingRegion": "Ontario", "billingPostalCode": "23", "officeEmail": "sas.h@gmil.com", "name": "Peter pan", "officeNumber": "43545", "shippingRegion": "Western", "billingCity": "Toronto", "shippingCountry": "Sri Lanka", "customerLabelId":"54db4e6e-36ec-47c3-816d-4d240ad26590" }
Note
There are more optional parameters available. For more information on the usage of these parameters please check the API document.
Related SalesBinder documentation
http://www.salesbinder.com/kb/api-functions/create-new-account/
Retrieving account details by ID
The
operation retrieves account details by ID.getAccountById
<salesbinder.getAccountById> <id>{$ctx:id}</id> </salesbinder.getAccountById>
Properties
Required - The ID of the account.id:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getAccountById
{ "apiUrl":"https://sblsoft.salesbinder.com", "apiKey":"cb2192d4832db952ac5d0ec9f41770e88c733c0f", "id":"54e72c32-63e4-47b0-8dfa-3e500ad1a5a6" }
Related SalesBinder documentation
http://www.salesbinder.com/kb/api-functions/view-account/
Retrieving all accounts
The
operation retrieves all accounts.listAccounts
<salesbinder.listAccounts> <contextId>{$ctx:contextId}</contextId> <page>{$ctx:page}</page> </salesbinder.listAccounts>
Properties
The context ID of the account.contextId:
The number of pages of the accounts.page:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.listAccounts
{ "apiUrl":"https://sblsoft.salesbinder.com", "apiKey":"cb2192d4832db952ac5d0ec9f41770e88c733c0f", "contextId":"2", "page":"2" }
Related SalesBinder documentation
http://www.salesbinder.com/kb/api-functions/list-accounts/
Sample configuration
Following is a sample proxy service that illustrates how to connect to SalesBinder with the init
operation and use the createAccount operation. The sample request for this proxy can be found in the createAccount sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="salesbinder_createAccount" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="billingAddress1" expression="json-eval($.billingAddress1)"/> <property name="billingAddress2" expression="json-eval($.billingAddress2)"/> <property name="shippingPostalCode" expression="json-eval($.shippingPostalCode)"/> <property name="shippingAddress1" expression="json-eval($.shippingAddress1)"/> <property name="officeFax" expression="json-eval($.officeFax)"/> <property name="shippingAddress2" expression="json-eval($.shippingAddress2)"/> <property name="url" expression="json-eval($.url)"/> <property name="contextId" expression="json-eval($.contextId)"/> <property name="billingRegion" expression="json-eval($.billingRegion)"/> <property name="billingPostalCode" expression="json-eval($.billingPostalCode)"/> <property name="officeEmail" expression="json-eval($.officeEmail)"/> <property name="name" expression="json-eval($.name)"/> <property name="officeNumber" expression="json-eval($.officeNumber)"/> <property name="shippingRegion" expression="json-eval($.shippingRegion)"/> <property name="billingCity" expression="json-eval($.billingCity)"/> <property name="shippingCountry" expression="json-eval($.shippingCountry)"/> <property name="billingCountry" expression="json-eval($.billingCountry)"/> <property name="shippingCity" expression="json-eval($.shippingCity)"/> <property name="customerLabelId" expression="json-eval($.customerLabelId)"/> <salesbinder.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> </salesbinder.init> <salesbinder.createAccount> <billingAddress1>{$ctx:billingAddress1}</billingAddress1> <billingAddress2>{$ctx:billingAddress2}</billingAddress2> <shippingPostalCode>{$ctx:shippingPostalCode}</shippingPostalCode> <shippingAddress1>{$ctx:shippingAddress1}</shippingAddress1> <officeFax>{$ctx:officeFax}</officeFax> <shippingAddress2>{$ctx:shippingAddress2}</shippingAddress2> <url>{$ctx:url}</url> <contextId>{$ctx:contextId}</contextId> <billingRegion>{$ctx:billingRegion}</billingRegion> <billingPostalCode>{$ctx:billingPostalCode}</billingPostalCode> <officeEmail>{$ctx:officeEmail}</officeEmail> <name>{$ctx:name}</name> <officeNumber>{$ctx:officeNumber}</officeNumber> <shippingRegion>{$ctx:shippingRegion}</shippingRegion> <billingCity>{$ctx:billingCity}</billingCity> <shippingCountry>{$ctx:shippingCountry}</shippingCountry> <billingCountry>{$ctx:billingCountry}</billingCountry> <shippingCity>{$ctx:shippingCity}</shippingCity> <customerLabelId>{$ctx:customerLabelId}</customerLabelId> </salesbinder.createAccount> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>