Vtex

You can set up the integration with VTEX following these steps:

Step 1: Create the VTEX integration in gopersonal platform.

Check the Integrations section in order to create a new integration. You will need the URL, App Key and App Token.

Also, you can configure the synchronization times for products and customers.

Step 2: Create the gopersonal Auth SDK integration.

Also in the Integrations section create a new integration for gopersonal Auth Web. Complete the domain with your ecommerce domain.

Step 3: Install the gopersonal VTEX app

Check the VTEX IO documentation here. Step 4: Add your clientId in the VTEX app configurations You can get your clientId in the integration panel once created.

In your VTEX admin in the App Management section go to gopersonal App.

Open the app settings, paste the clientId and click save.

Step 4: Setup in the checkout page

Open your admin in the Checkout section in the checkout6-custom.js:

https://ACCOUNT.myvtex.com/admin/portal/#/sites/default/code/files/checkout6-custom.js

Add the following snippet in the file and replace "REPLACE_ME_CLIENT_ID" with your clientId:

Copy

async function initializeGSSDK() {
    window.gsSDK = await new window.GSSDK.default('REPLACE_ME_CLIENT_ID', {
        provider: 'Vtex',
        context: {pageType: 'checkout'}
    });
}
var gsSDKScript = document.createElement('script');
gsSDKScript.src = 'https://sdk.gopersonal.ai/gs-sdk.js';
gsSDKScript.onload = initializeGSSDK;
document.head.appendChild(gsSDKScript);

Web Push Channel Setup

To create the Service Worker script, follow the step-by-step instructions below:

  1. In the VTEX Admin, go to Store Settings > Storefront > Checkout, or type Checkout in the search bar at the top of the page.

  2. Click the icon of the desired site.

  3. In the Code tab, click the New buttton.

  4. Then click on File.

  5. Fill in the file name exactly like: gp-firebase.js.

  6. Click the Create button.

  7. Add this code to the script:

Copy

"function" === typeof importScripts && importScripts("https://sdk.gopersonal.ai/libs/firebase-messaging-sw.js");
  1. Click the Save button.

Last updated