Mapping Script
For implementing the module, users have to add a blank div and script to their own system, which is mentioned below:
Add the Script: Include the following script in your HTML to load the required JavaScript file:
<script src="https://static.otaswitch.com/JS/script.js"></script>
Create a Container Div: Insert a blank div in your HTML and assign it an id of your choice:
<div id="app"></div>
Invoke the Function: Call the function exported from the script, passing in the necessary object. This object is mandatory for loading the module.
Sample Example
const tmpScriptObj = {
elementId: "app",
type: "channel-Mapping", // Other possible values are "booking-details", and "mbs"
appId: "c3RheWlubi5zdWlzc3UuY29t",
propertyId: "",
token: "",
channelCode: "",
language: "en",
themeColor: {
iconColor: "#1e8ce4"
}
};
See below:
Elements
Description
Optional/Required
Notes
elementId
The ID of the HTML <div>
where the module will be mounted.
Required
Must match the id
of the <div>
added in the HTML. Example: <div id="app"></div>
type
Defines the integration type.
Required
Possible values are: channel-Mapping
, booking-details
, and mbs
appId
Base64-encoded PMS (Property Management System) domain value.
Required
Obtain your PMS domain and convert it to Base64 before passing.
propertyId
Encrypted Property ID obtained via the API.
Required
Fetch this from the Property ID API before initializing the module.
token
Authentication token obtained via the API.
Required
Generate and pass a valid token from the Authentication API.
channelCode
Specific channel code to filter the results.
Optional
If left empty, all channels will be loaded by default.
Only applicable when type == "channel-Mapping
" otherwise it will be ignored.
language
Sets the application language.
Optional
Default is "en"
for English. Supported values may vary depending on API configuration.
All the languages mentioned in the table: Language Supports in Widget are allowed.
themeColor
Object to customize the module’s theme colors.
Optional
Example: { iconColor: "#1e8ce4" }
. If not provided, default colors will be applied automatically.
Use below mention function to load module:
loadScript(tmpScriptObj);
Language Supports in Widget
We currently support the following languages. To set a preferred language, please use the corresponding language codes:
Here’s the table you requested:
1
ar
Arabic
2
zn
Chinese
3
en
English
4
fr
French
5
ja
Japanese
6
ka
Georgian
7
de
German
8
it
Italian
9
pl
Polish
10
es
Spanish / Castilian
11
uk
Ukrainian
Last updated
Was this helpful?