Activating Webservices

The activation of the Webservices in your Propertybase-ORG is needed to be able to work with those services:

For the activation of the Portal Syndication, please have a look first to our Portal Overview.

 

Propertybase Webservices Overview

 

You can activate the Webservices yourself as long as you are an Administrator!

The following documentation is for Administrators familiar with the the underlying Salesforce.com platform and the Sites feature.It is a step by step instruction that is done in the setup of Propertybase. Therefore the following documentation is for power users only.

1. Request an additional site license from propertybase support (it´s free of charge!)

Send an email to support@propertybase.com with your ORG ID and request your complimentary site license to proceed with activation. 

2. Activate Sites

If not already activated, you have to create a force.com
To do this go to Setup > Develop > Sites > Then enter a new domain name.

 

 

We recommend to try your company name first. (mentioned below as: XXX.force.com).
Finally click "Register My Force.com Domain".

On the next page click the "New" button.
Add the following details to the new site:

Site Label: Webservices
Site Name: Webservices
Active: checked
Active Site Home Page: e.G: "UnderConstruction"

The next picture display the above described details:
As no changes to any other setting here are needed you will click Save.

For additional information on this topic you may go to: 
http://wiki.developerforce.com/index.php/An_Introduction_to_Force.com_Sites#Creating_a_Force.com_Site

3. Assign Webservice Pages to your Site

After saving you will be sent back to the Sites page. Alternatively to: Setup > Build > Develop >Sites

Now click the Site Label Webservices. Click the button Public Access Settings then Visualforce Page Access click the Edit button.

Add the following available Visual Force Pages:
pba.WebserviceListingQuery
pba.WebserviceProspectApi
pba.WebserviceWebToProspect

 

Now do the same thing for the Apex Classes. Webservices. Click the button Public Access Settings then Apex Class Access click the Edit button.

Add the following available Apex Classes
pba.WebserviceListingsQuery
pba.WebservicePortalFeedQuery
pba.WebserviceProspect
pba.WebserviceProspectRest

Note: if you cannot see the classes in that view and are on the "Previous User Interface" (see below), then please activate the "Enhanced Profile User Interface" in Setup > User Interface > Enable Enhanced Profile User Interface.

Fullscreen_23_08_17__10_08.png

Also outlined in detail here: http://wiki.developerforce.com/index.php/An_Introduction_to_Force.com_Sites#Assigning_a_Visualforce_Page

4. Change the public access settings for the Guest user

The next step is to setup the profile permission for the website user. For the sites page click on the "Public Access Settings" button. Alternatively > Setup > Develop > Sites: Click on Site Label "Webservices" > Button "Public Access Settings" 

 

ATTENTION:
Depending on whether you are on the new or old Improved Profile User Interface, the steps to change the guest users object permissions will be different. Make sure to look at the the steps depending on how the user interface look like. Select "PREVIOUS PROFILE INTERFACE" version if your profile setup looks different.

 

ENHANCED PROFILE INTERFACE

Upon entering the enhanced Profile setup user interface you will see the overview with a list of options to modify. Click on the "Object Settings" link.

If you cannot find an object, then please consult this article: How to find a "missing" Custom Object.

Next a list of all objects will appear. Here you will need to each of the following objects and set the correct permissions so that the webservice has the correct access. The following objects that will need to be edited are: Accounts, Contacts, Requests(Inquiries), Favorites(Linked Listings), Listings, Properties, Property Media, and Settings. To start off select Accounts:

Within the Accounts Overview you will need to modify the Record Types, Object Permissions and Field Permissions. For the Record Type add Company (Default) and SystemInternal. Set both Object permissions to Read and Create. Next make sure all fields in the Field Permission section are set to Read. All objects will need to have all the fields in the Field Permission set to Read as well:

 Next move to the Contacts object settings. Within the Contacts Overview you will need to modify the Record Types, Object Permissions and Field Permissions. For the Record Type add Individual Client (Default) and Company Contact. Set both Object permissions to Read and Create. Next make sure all fields in the Field Permission section are set to Read and Edit. All objects will need to have all the fields in the Field Permission set to Edit as well: 

Next move to each of the rest of the objects mentioned above. For these objects Record Type is not necessary to set. For Requests(Inquiries) and Favorites(Linked Listings) the Objects Permissions will need to have Read, Create and View All. As mentioned above all fields will from the Field Permission section will need to have the Edit set.

 

For the Listings, Properties, Property Media and Settings objects the Record Types and Page Layout Assignments does not need to be set. The Objects Settings will need to have Read and View All. As mentioned above all fields will from the Field Permission section will need to have the Read set.

 With this Enhanced Profile User Interface you can then ignore Step 5 further down in this documentation.

 The last objects to be modified are:

  • SObject Work Queue
  • SystemLogs
  • SystemStructs
These 3 objects will need to have READ and CREATE Object Permissions for the webservice profile.

PREVIOUS PROFILE INTERFACE

For the sites page click on the "Public Access Settings" button.
Alternatively > Setup > Build > Develop > Sites: Click on Site Label "Webservices" > Button "Public Access Settings" 

Once on this page click on
Edit > Scroll down "Standard Object Permissions" and "Custom Object Permissions"

Make sure, your Sites user has

  • Create permission for Accounts and Contacts
  • Read and ViewAll permissions for Favorite(Linked Listings), Property, PropertyMedia, Request and Setting custom objects
 
When complete click the "Save" button. 

5. Assign a propertybase license to your Sites user and adjust time zone and currency

Now you are ready to activate the Site user.
Go to Setup > Develop > Sites: Click on Site Label "Webservices" > Button "Public Access Settings" > "Assigned Users" > Name of the Sites User "Site Guest User, Webservices" > Scroll down to the "Managed Packages" section and click on "Assign licenses" to assign a " Propertybase V3" to your Sites user.
Note: If you don't see Propertybase V3, then you will need to go back to step 1... ;-)

Please check/adjust "Time Zone" and currency depending on your requirements.

 

6. Get your Endpoint URL and generate Token

The final step to configure the Webservices is to get your Endpoint URL.
The Endpoint URL is the domain name of the new Webservice site you have just created.
To get it, you will need to go to Setup > Develop > Sites and click on the newly created Webservices.
The following screen shot demonstrates your Enpoint URLs under the column Domain Name.
By clicking the "View" link you will get the entire URL.
In this case: https://thejunetest.secure.force.com

So your endpoints will look like this:

For Weblisting:
https://thejunetest.secure.force.com/pba__WebserviceListingsQuery

For Web To Prospect:
https://thejunetest.secure.force.com/services/apexrest/pba/webtoprospect/v1/

 

7. Generate your Tokens

To authenticate your website, you need two tokens. Please add those two settings:

  1. "webserviceListingsQuery_token" and insert your token as the value.
  2. "webserviceWebToProspect_token" and insert your token as the value.

We recommend using a hash token generator!

 

Now you are ready to use the following functionalities:

 

8. FAQ

Why can´t I access a particular object field?

- Please check topic 4.

 

Powered by Zendesk