Installation via Code Snippet (Extension Free)


CONTENTS

All the Apty Client/Widget features can be accessed by end users via one of the following methods:

  • by adding a JavaScript code snippet to the source code of your web application (described in this article), or
  • by installing an extension to your browser. For more information refer to one of the following articles: 


What is Code Snippet?

Code "snippets" are small, reusable pieces of code that can be integrated into a larger codebase, designed to illustrate a specific purpose. Here, by adding the short snippet of code to the source code of hosting application end users can access all the Apty Client/Widget features.

When this method can be used ?

When System Administrator has access to the source code of the hosting application, Apty Client can be installed on a hosting application by adding the Code Snippet to the source code.

This method is not applicable when instructional material is added to the third-party application; for example, if an organization creates instructional material for Salesforce, only browser extension method is applicable. Alternatively, Apty Client can be installed globally for all end users in a couple of simple steps by the owner of a hosting application (and its source code). In this case, Apty Assist Client is seamlessly embedded into the functionality of the hosting application and can be accessed from the browser window without installing additional software.

Why this method?

  • The script eliminates the need of a browser extension for the end user to leverage the features of Apty Assist.
  • This method guarantees independence of the browser to the end user.
  • Feature updates of Apty Assist are directly available to the end users with no need to push out any extension updates.
  • No maintenance and easy upgrades

How to deploy the Snippet?

Below are certain points that need to be considered while deploying the snippet:

  • Admin users need to whitelist *.apty.io for the application.
  • This code snippet needs to be injected in such a way that it appears in all the pages of the host application. (Since Header or Footer appears in all the pages, user can inject the snippet there). 
  • The application URL must be registered with Apty in admin console in order to see the widget on screen.
  • The content displayed in the widget will be pulled from client.app.apty.io, which means only connected application data will be pulled.

Upon successful deployment JavaScript code performs the following actions:

1.   The URL point to client.apty.io; tenantKey represents a unique identifier for the given application

2.   The script element is created

3.   Apty attribute is added to the source code and links the style sheet to the created element

4.   The element is added to the DOM of the hosting application.

NOTE: Tenant Key will be provided by the Apty CS team.

Outcome

Once the services are restarted, open the respective application and observe that the 'Need Help?' widget is displayed on the surface of the hosting application. The position of an Apty Client on the screen can be defined at:

PATH: Apty Admin > Select application on the left side panel > Customization >Themes> Click on required Theme>Widget


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.