Gainsight support provided the following (which worked for our team):
Here are some more details regarding a Lightning URL. The parameters in a lightning URL are base64 encoded. Let's take the following Lightning URL as an example:
https://nearpod.lightning.force.com/one/one.app#eyJjb21wb25lbnREZWYiOiJvbmU6YWxvaGFQYWdlIiwiYXR0cmlidXRlcyI6eyJhZGRyZXNzIjoiaHR0cHM6Ly9uZWFycG9kLS1qYmN4bS52Zi5mb3JjZS5jb20vYXBleC9HYWluc2lnaHROWFQjY3VzdG9tZXJzdWNjZXNzMzYwJTNGY2lkJTNEMVAwMjUzR0NISU5XWjBLSU9aMjdBMlFDQkhYTTE5RVRJOVZFIn0sInN0YXRlIjp7fX0%3D
In this URL, the base URL is "https://nearpod.lightning.force.com/one/one.app". Everything following this (excluding the is the URL parameter, and it is base64 encoded.
If you decode the following encoded parameter value
eyJjb21wb25lbnREZWYiOiJvbmU6YWxvaGFQYWdlIiwiYXR0cmlidXRlcyI6eyJhZGRyZXNzIjoiaHR0cHM6Ly9uZWFycG9kLS1qYmN4bS52Zi5mb3JjZS5jb20vYXBleC9HYWluc2lnaHROWFQjY3VzdG9tZXJzdWNjZXNzMzYwJTNGY2lkJTNEMVAwMjUzR0NISU5XWjBLSU9aMjdBMlFDQkhYTTE5RVRJOVZFIn0sInN0YXRlIjp7fX0%3D
You would get the following json:
{"componentDef":"one:alohaPage","attributes":{"address":"https://nearpod--jbcxm.vf.force.com/apex/GainsightNXT#customersuccess360?cid=1P0253GCHINWZ0KIOZ27A2QCBHXM19ETI9VE"},"state":{}}
In this JSON, the "address" part represents the same address that you generated using the formula field.
To populate the Lightning URL into a text field in Salesforce using Apex, you can use the following sample code:
List<Account> lAccounts = tSelect Id, Company_GSID__c, Name From Account limit 2000];
Map<Id,Account> AccountWithUrl = new Map<Id,Account>(lAccounts);
for(Account acc : lAccounts){
String base = 'https://nearpod.lightning.force.com/one/one.app#';
String pageJson = '{"componentDef":"one:alohaPage","attributes":{"address":"https://nearpod--jbcxm.vf.force.com/apex/GainsightNXT#customersuccess360%3Fcid%3D'+acc.Company_GSID__c+'"},"state":{}}';
//Blob encoded = EncodingUtil.base64Encode(pageJson);
acc.NewURLField__c = base + EncodingUtil.base64Encode(Blob.valueOf(pageJson));
AccountWithUrl.put(acc.Id, acc);
}
update AccountWithUrl.values();
Please note that this is just a sample script to demonstrate how to create and update the URL.
@manda.edmonds I’m assuming you do not want to direct users to the standalone login of NXT?
@gunjanm We try to keep our users within the Salesforce environment, and the above solution worked brilliantly!
Spoke with Support about this and they gave us these links for the C/R360s.
For Relationship 360 - https://yourdomain--jbcxm.visualforce.com/apex/GainsightNXT#Relationship360%3FrId%3D<Replace this with Relationship GSID>
For Company 360-
https://yourdomain--jbcxm.visualforce.com/apex/GainsightNXT#customersuccess360%3Fcid%3D<Replace this with Company GSID>