References¶
Partoo¶
Partoo is a JS object that it is made available globally when you add this script your page header.
<script src="https://static.partoo.co/jssdk/partoo.js" type="text/javascript"></script>
Methods¶
init (divId: string, options: Option Object)¶
Insert the iFrame in the div whose id equal divId
and returns a Page .
Parameters:
divId (mandatory): id of the div where the iFrame should be inserted
options (optional): option JS object to override some behaviour on Partoo App. See Options object
Page¶
Page is the JS object is returned by Partoo.init
method.
It provides a set of methods to manipulate the iFrame.
// Instantiating the page object that will handle the manipulation
// of the iFrame in the div whose id is 'divId'
const page = Partoo.init('divId');
Methods¶
setOptions (options: Option Object)¶
Set options to override some behaviour on Partoo App.
Parameters:
options (mandatory): option JS object. See Options object.
login (connectionToken: string)¶
Log user on Partoo App using the connectionToken
and redirects to the startPage
defined in Options object.
Parameters:
connectionToken (mandatory): connection token generated with generate connection token endpoint.
back ()¶
Go back to previous page.
forward ()¶
Go forward to next page. Opposite of back.
on (eventId: string, callback: Function)¶
Define a callback on a specific Partoo app event.
Parameters:
eventId (mandatory): Id of the event for which we want to define a callback. See Available callback events
callback (mandatory): Function that will be triggered on event. This function should expect one argument.
Miscellaneous¶
Options object¶
The options can be provided to both the Partoo
global object (being default options) or to a page instance, result of Partoo.init()
using the following syntax
var partooPage = Partoo.init(elemId, userToken, options);
partooPage.setOptions(options);
options
is an object with the following keys.
Parameter |
Type |
Default |
Description |
---|---|---|---|
startPage |
string |
|
The navigation start page when doing |
startPageAnchorParam |
string |
|
Add an anchor param in the login url |
displayIntercom |
boolean |
|
Display the intercom help button in the lower right corner |
displayAddButton |
boolean |
|
Display the add business button on the top banner |
displayPresenceManagementDownload |
boolean |
|
Display the download data button on the presence management view |
displayBusinessModalFilters |
boolean |
|
Display the Business filter button in the top right corner of some pages (Google Posts, Presence Management, Presence Analytics, Review Management, Review Analytics, Messaging) |
displayVerificationRequiredButton |
boolean |
|
Display the Verification Required button inside businesses rows and on top of business page |
selectedBusinessId |
string |
|
Select a specific business on some pages when defined (Google Posts, Presence Management, Presence Analytics, Review Management, Review Booster, Review Analytics, Messaging). To unselect the selected business, set null. |