Enterprise White-Label - Embedding GlobalPatron

As an enterprise white-label user, you are permitted to embed the GlobalPatron platform within your own web application, and can seamlessly onboard your own users without requiring them to "Login" or "Sign Up" to our platform. From your users perspective the GlobalPatron platform and form-builder functionality will appear as if they are a part of your own branding/product.

The process for white-label embedding is as follows:

Note: If you have not already added any of your customers as users of the GlobalPatron platform, please do so now using this API endpoint for adding customers

  1. Server-SideGet a JwtToken on behalf of your customer
    This must be a secure server-side call to our userauth API endpoint
  2. Client-SideInclude this script tag on your web page:
    <script src="https://www.globalpatron.com/production/gp_white_label_platform_loader_bundle.min.js" type="text/javascript"></script>
  3. Client-SideAdd a html div container on your web page to specify where the globalpatron platform should be loaded:
    <div id="globalpatroncontainerid"></div>
  4. Client-SideInitialise and load the relevant globalpatron feature:
    <script type="text/javascript">					
      var globalPatronEmbedParams = {
    	"partnerAccountId": "YOUR_PARTNER_ID",
    	"hostOrigin": "your-domain.com",
    	"htmlTargetId": "globalpatroncontainerid",
    	"userJwtToken": "USERS_JWT_TOKEN",
    	"feature": "NAME_OF_FEATURE_TO_LOAD",
    	"autoResize": true,
    	"expiredJwtTokenCallback": expiredJwtTokenCallback
      };
    
      //optional method to be called if JwtToken has expired.
      function expiredJwtTokenCallback(event) {
        
        //when you have the fresh token you can supply it to GlobalPatron
        globalPatronPartnerEmbed.supplyJwtToken(event, "USERS_FRESH_JWT_TOKEN");
    
        //Alternatively you can simply request a new JwtToken based on a timer 
        //(e.g. every 45 minutes if user is still logged-in on your platform, 
        //request a new JwtToken and call globalPatronPartnerEmbed.init(...) to start over again)
      }  
    
      //now load the globalpatron feature
      globalPatronPartnerEmbed.init(globalPatronEmbedParams);
    </script>
    								
    partnerAccountId
    This is your partner id, e.g. "a12bc345-d67e-89b1-23d4-567e891dcb23". You can view your partner id by going to the partner dashboard
    hostOrigin
    This is the domain where you will be hosting the GlobalPatron functionality, e.g. "mysite.com"
    htmlTargetId
    This is the html id of the DOM element on the web page where you would like the GlobalPatron platform to be embedded
    userJwtToken
    This is the JWT Token of your customer which you received by making a secure *server-side* call to our partner user authentication API endpoint
    feature
    This is the name of the GlobalPatron feature you would like to load.
    (Valid values are: "newformcreator", "myforms", "mydatalists", "mydashboard", "formeditor|formId", "formcollaborators|formId", "formshare|formId", "formreports|formId", "formsubmission|formId|submissionId"), e.g. "formeditor|xxxx-xxxxx-xxxx-xxxxx"
    autoResize
    This indicates whether or not you would like the iframe displaying GlobalPatron to autoresize in height depending on its content.
    (Valid values are: boolean true or false)
    expiredJwtTokenCallback
    (optional) This is an optional JS Method that you would like to be called when GlobalPatron requires a fresh JwtToken.
  5. Via Support TicketMake JS & CSS Style Overrides:
    If you wish to make any JS or CSS style overrides to the GlobalPatron content displayed, this is also fully supported. Simply send us your JS and CSS style overrides, we will do a code security review, and once reviewed upload them to the server under your account. For example this client below is overriding the loading state colours, and the page background:
    /* Loading State */
    .loading-overlay {
        background: red !important;
    }
    .bounce-loader .bounce1, .bounce-loader .bounce2, .bounce-loader .bounce3 {
        color: #000000 !important;
    }
    
    /* Page Background */
    body, .body {
        background-color: green !important
    }
    
    /* Other Style Overrides */
    ...
    
  6. You can download a basic embed example here:
    Client-Side Sample
  7. You will now have a powerful data and payments collection platform white-label embedded within your own platform!
    If your team is stuck on anything, please reach out to our support team anytime and we will help out.