Skip to main content

I am creating a utility which uses the Gainsight APIs to copy CSQLs from Gainsight to Dynamics since we use Dynamics CRM instead of Salesforce.

I can use the API to get the CSQLs through (somewhat) documented API calls:

POST xyz.us2.gainsightclud.com/v1/data/objects/query/gs_lead  → gets me all the CSQLs in the system.

However, when I try to update the Gainsight CSQL as to whether the Dynamics Opportunity was Won or Lost (or make any other changes to a Gainsight CSQL) using:

PUT xyz.us2.gainsightclud.com/v1/data/objects/query/gs_lead?keys=GSID

I am getting the error “Wrong api called, Transactional Data Load not supported for this object. Please check Gainsight Documentation”

What is the correct API to use? Or does one exist? Since Gainsight has a Salesforce connector that does the same thing, this must be doable.

I am following up on this since I did find a solution.

Ankita pointed out to me that leads can be modified through the rules engine, and so I was able to solve this using that technique. First, I created a custom object named LeadUpdate which contained the fields I needed to update in the leads. I then created a rule that updates the leads using the data from my custom LeadUpdate table.
In my utility when I need to update a lead, I do the following three step process:

  1. Clear the LeadUpdate table of any prior entries.
  2. Any changes I need to make to a lead are added to the LeadUpdate table using the Custom Object API.
  3. The utility then triggers the rules engine to run my new rule which copies from the LeadUpdate table to the leads table. The Curl command to do this triggering can be found on the Scheduling page when editing a rule. If you chose to use Event-based scheduling, a Show Curl Command button appears that will generate the Curl needed to test this in Postman, which I then added to my utility. The rules engine takes 1-2 minutes to run, so I have to make sure I don’t run this 3 step process too often or step 1 will remove the data before it is written to the leads table by the rules engine.

Reply