InCountry logoDocs
mobile-nav
  • Product
    • Overview
    • How it Works
    • SaaS Solutions
    • Internal App Solutions
    • Compliance and Security
  • Integrations
    • Intertrust
    • Mambu
    • Okta
    • Salesforce
    • Segment
    • ServiceNow
    • Twilio
  • Resources
    • Documentation
    • Research
    • Pricing
    • Partners
    • FAQ
    • Developers
    • ROI calculator
  • About Us
    • Leadership
    • Contact Us
    • News and Blog
    • Careers
  • Login
  • Schedule a Demo

›Documentation

Home
  • Introduction
Portal
  • Getting Started
  • Documentation
    • Dashboard
    • Managing Environments
    • Managing Clients and Integrations
    • Managing Serverless Scripts
    • Managing Profile and Organization
    • Managing Users
    • Managing Secret Keys
    • Managing Recommendation Modules
    • Managing Plans
  • Release Notes
Border
  • Documentation
  • Release Notes
REST API
  • Documentation
  • Release Notes
Serverless
  • Documentation
SDK
  • Overview
  • Python
    • Documentation
    • Release Notes
  • Node.js
    • Documentation
    • Release Notes
  • Java
    • Documentation
    • Release Notes
Salesforce
  • Getting Started
  • Documentation
    • Configuring Data Regulation Policies
    • Configuring the PROTECTED Fields
    • Registering custom objects
    • Replacing the Salesforce Standard Elements
    • Regulated Field Protection
    • Configuring the Record Search
    • Viewing Serverless Functions
    • Apex SDK
Payment Gateway
  • Documentation
BYOK
  • Documentation
FAQ
  • How Tos
  • Integration Options
  • Data Regulation Models
  • Limits and Quotas

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. The Upload certificate and private key form opens.

    The Upload certificate and private key form

  2. In the Upload certificate and private key form, upload the certificate and the private key you got when you created a serverless integration.

    Upload the certificate and the private key

  3. The Serverless page opens.

The Serverless page

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.

Publishing a new serverless script

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

    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.

      Script body

  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.

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.

    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.

    Execute

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

    the plus icon

  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.

    the Delete icon

  6. When complete, click Execute.

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.

Changing integration keys

You may need to switch between serverless scripts that are mapped to different certificates and private keys to edit them and re-publish their modified versions.

  1. On the Serverless page, click the Change integration keys icon.

    Change integration keys

  2. You will be prompted to load the certificate and the private key.

    Load the certificate and the private key

← Managing Clients and IntegrationsManaging Profile and Organization →
  • When to use serverless scripts
  • Viewing serverless scripts
  • Publishing a new serverless script
  • Republishing the serverless script
  • Executing the serverless script
  • Changing integration keys

PRODUCT

OverviewHow it WorksSaaS SolutionsInternal App SolutionsCompliance and Security

RESOURCES

DocumentationResearchPricingFAQDevelopersPartnersROI calculator

INTEGRATIONS

IntertrustMambuSalesforceSegmentServiceNowTwilio

ABOUT US

LeadershipContact UsNews and BlogCareers
InCountry
© InCountry 2021 . All rights reserved. InCountry, Inc.