InCountry logo
mobile-nav
Search
  • Products
    • Platform
      • Overview
      • Compliance and security
      • How it works
      • For SaaS
      • For internal apps
    • Gateways
      • Email
      • HTML
      • Payments
      • Web Forms
  • Solutions
    • Energy
    • Financial services
    • Healthcare
    • Retail
    • Technology
  • Integrations
    • SaaS
      • Cegid
      • Intertrust
      • Mambu
      • PayPal
      • Salesforce
      • Segment
      • ServiceNow
      • Stripe
      • Twilio
      • Veeva Systems
    • IAAS
      • InCountry on Alibaba Cloud
      • InCountry on Yandex.Cloud
  • Resources
    • Country compliance
    • Documentation
    • Library
    • Partners
    • Pricing
  • About
    • Blog
    • Careers
    • Contact Us
    • FAQ
    • Leadership
  • Login
  • Schedule a Demo

›Documentation

Home
  • InCountry Platform
Portal
  • Getting started
  • Documentation
    • Dashboard
    • Managing environments
    • Managing clients and integrations
    • Managing Border configuration
    • Managing payment vaults
    • Managing email gateways
    • Managing serverless scripts
    • Managing file imports
    • Managing profile and organization
    • Managing users
    • Managing secret keys
    • Managing recommendation modules
    • Managing subscription
  • Release notes
Border
  • Documentation
  • Release notes
REST API
  • Documentation
  • How to test CRUD requests through REST API
  • Release notes
Serverless
  • Documentation
Salesforce
  • About
  • Overview
  • Quick start guide for three-model package
  • Quick start guide for legacy package
  • Administrator's guide
    • Managing the package
    • Managing permissions
    • Managing OAuth2 authentication and authorization
    • Managing certificates
    • Registering CSP Trusted Sites
    • Managing InCountry Endpoints
    • Managing REST endpoints
    • Managing InCountry flags
    • Loading the application
    • Managing data regulation policies
    • Managing protected fields
    • Hashing the UserName field
    • Managing custom objects
    • Replacing standard elements
    • Configuring record search
    • Managing components
    • Setting up Salesforce Experience Cloud
    • Managing serverless functions
    • Managing InCountry cache
    • Managing Apex triggers
    • Managing record synchronization
    • Using Email-to-Case feature
    • Debugging
    • Migrating data from one Salesforce organization to another
  • Developer’s guide
    • Apex SDK
    • JavaScript API
    • Retrieving record statistics
    • Tracking field history
  • User's guide
    • Working with protected fields
    • Sending compliant email messages
    • Importing data into Salesforce
    • Migrating records
    • Managing audit reports
    • Converting leads
    • Managing reports
    • FAQ
    • Release notes
Payment Vault
  • Documentation
BYOK
  • Documentation
FAQ
  • Get started with the platform
  • Integration options
  • Data regulation models
  • Limits and quotas
  • Video tutorials
Service Status
  • Status

Managing serverless scripts

A serverless script is a script (program code) which allows you to perform some operations on regulated data without its leaving the origin country, so that you do not violate any local requirements on handling personal data.

You can perform the following operations on serverless scripts:

  • publishing new serverless scripts

  • re-publishing the existing serverless scripts

  • executing the published serverless scripts

note

The general requirements for a serverless script:

  1. The script should be written in JavaScript.

  2. The script should define a function which performs some business logic on regulated data.

When to use serverless scripts

You need to use serverless scripts for implementing custom scenarios for the redaction and restrictions data regulation models. If you are using the replication data regulation model, you do not need to use serverless scripts .

Primary use cases for serverless scripts are the following:

  • validation of record uniqueness by full name and/or email address

  • custom calculations of values for specific profiles

Serverless scripts allow you to execute custom operations on regulated data within the Point-of-Presence where it is originally stored and do not transfer it to your application server, which may automatically cause violation of the local compliance requirements and regulations.

Viewing serverless scripts

note

If you have no published scripts, the system will transition you to the page for publishing a new serverless script at the first opening of the Serverless section.

  1. On the sidebar, select Serverless.

  2. On the Serverless page, click the Edit icon.

    Click Edit

  3. Enter the Client ID and Client Secret that pertain to the integration of the Serverless type.

    Enter the Client ID and Client Secret

  4. Click the Apply icon.

  5. The Serverless page opens. It will list serverless scripts that attribute to the serverless integration which Client ID and Client Secret you entered. Here you can view the following information about the available serverless scripts:

AttributeDescription
Script NameName of a serverless script.
UpdatedDate and time of the latest serverless script update.
PublishedDate and time of the serverless script publication.

Serverless

Publishing a new serverless script

  1. On the Serverless page, click Publish a new script.

    click Publish a new script

  2. On the opened page, specify the following information:

    • Script Name - name of a serverless script.

    • Country - select the country which a serverless script will be published to.

    • Rewrite existing script - check the box if you want to rewrite the already published script having the same name. If you are publishing a new script, leave this checkbox as is.

    • Script body - enter the serverless script.

      Enter the serverless script

  3. When complete, click Publish.

  4. Once you have published the script, within the breadcrumbs click Serverless. You will return to the list of published serverless scripts.

You can switch to another integration of the serverless type by clicking the Edit icon and entering a different Client ID and Client Secret.

note

When you publish a serverless script, it is saved on InCountry Portal, then passed to REST API which saves it further to PoP API on the Point-of-Presence.

Republishing the serverless script

  1. On the Serverless page, locate the serverless script you want to republish.

  2. Click the Republish icon.

    Click Republish

  3. On the opened page, update the serverless script and check the Rewrite existing script box.

    Rewrite existing script

  4. When complete, click Publish.

Executing the serverless script

  1. On the Serverless page, locate the serverless script you want to execute.

  2. Click the Execute icon.

    Click Execute

  3. On the opened page, add the parameters required for execution of the serverless script by clicking the plus icon.

    Add parameters

  4. For each added parameter, specify the following information:

    • Name - name of the parameter.

    • Value - value of the parameter.

  5. If you have added some parameter by mistake, delete it by clicking the Delete icon.

    click Delete

  6. When complete, click Execute.

    click Execute

note

When you execute a serverless script, REST API fetches the required serverless script by its name from PoP API and executes its code.

Switching to another serverless integration

You may need to switch between integrations of the serverless type to execute serverless scripts or publish new ones.

  1. On the Serverless page, click the Edit icon.

    Click Edit

  2. Enter the Client ID and Client Secret of another integration of the serverless type.

    Enter the Client ID and Client Secret

  3. Click the Apply icon. InCountry Portal will load serverless scripts that attribute to the newly defined intgeration.

← Managing email gatewaysManaging file imports →
  • When to use serverless scripts
  • Viewing serverless scripts
  • Publishing a new serverless script
  • Republishing the serverless script
  • Executing the serverless script
  • Switching to another serverless integration
InCountry logo blue
© InCountry 2022.
All rights reserved. InCountry, Inc
  • PRIVACY POLICY
  • TERMS OF SERVICE
  • Social share
    • YouTube logo
    • Facebook logo
    • Twitter logo
    • LinkedIn
  • Column 1
    • Products
      • Platform
        • Overview
        • Compliance and security
        • How it works
        • For SaaS
        • For internal apps
      • Gateways & Vaults
        • Email
        • HTML
        • Payments
        • Web Forms
    • Solutions
      • Energy
      • Financial services
      • Healthcare
      • Retail
      • Technology
  • Column 2
    • Integrations
      • SaaS
        • Cegid
        • Intertrust
        • Mambu
        • PayPal
        • Salesforce
        • Segment
        • ServiceNow
        • Stripe
        • Twilio
        • Veeva Systems
      • IAAS
        • InCountry on Alibaba Cloud
        • InCountry on Yandex.Cloud
  • Column 3
    • Resources
      • Country compliance
      • Documentation
      • Library
      • Partners
      • Pricing
    • About
      • Blog
      • Careers
      • Contact Us
      • FAQ
      • Leadership