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/javascript/build/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:

login (connectionToken: string)

Log user on Partoo App using the connectionToken and redirects to the startPage defined in Options object.

Parameters:

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

businesses

The navigation start page when doing login()

startPageAnchorParam

string

null

Add an anchor param in the login url

displayIntercom

boolean

true

Display the intercom help button in the lower right corner

displayUserParams

boolean

true

Display the user’s parameter dialog

displayAddButton

boolean

true

Display the add business button on the top banner

displayPartnerConnexionBanner

boolean

true

Display the partner connexion (Google My Business) banner on edit

displayBusinessListSearch

boolean

true

Display the search dialog on the business list

displayMultibusinessSelection

boolean

true

Allow selection of multiple business on the business list

displayPresenceManagementDownload

boolean

true

Display the download data button on the presence management view

displayBusinessAdmin

boolean

true

Display the menu item to close a business in edit view

displayEditBusinessSelector

boolean

true

Display the business selector on the business edit view

displaySideBar

boolean

false

Display the Sidebar menu to navigate between the different pages of the app (by default the Sidebar is hidden)

displayBusinessModalFilters

boolean

true

Display the Business filter button in the top right corner of some pages (Google Posts, Presence Management, Presence Analytics, Review Management, Review Analytics, Messaging)

selectedBusinessId

string

null

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.