Skip to main content

Hi! I’m looking for help with my JSON on a Success Plan Creation API external action. I am attempting to create a Success Plan that is linked to a Relationship and where I populate a lookup field to a custom object. I am receiving an error attempting to create that says,

 

“Please enter valid JSON and char limit should not exceed 10,000.”

 

I know I have not exceeded the char limit. I copied/pasted the original JSON template from the Support website, made edits in Notepad++, and then copied/pasted back into the Payload for an external action. When I put this into a JSON validator website, it is showing many errors, but none that would help in fixing the issues.

 

My JSON is as follows:

{
"requests": q
{
"record": {
"referenceId": "1",
"Name": "{{SPName}}",
"SFDCID": "{{CompanySFDCID}}",
"OwnerEmail": "{{SPOwnerEmail}}",
"DueDate": "{{SPDueDate}}",
"SuccessPlanType": "Digital Solution Onboarding",
"status": "Active",
"Templates": p
"Phase 1: Digital Solution Sale"
],
"RelationshipID": "{{SPRelationshipID}}",
"Onboarding_Data_Entry_Record__gc": "{{DODEGSID}},
}
}
],
"lookups": {
"OwnerId": {
"fields": {
"OwnerEmail": "Email"
},
"lookupField": "Gsid",
"objectName": "gsuser",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"CompanyId": {
"fields": {
"SFDCID": "SfdcAccountId"
},
"lookupField": "Gsid",
"objectName": "company",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"RelationshipId": {
"fields": {
"RelationshipID": "Gsid"
},
"lookupField": "Gsid",
"objectName": "Relationship",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"Onboarding_Data_Entry_Record__gc": {
"fields": {
"DODEGSID": "Gsid"
},
"lookupField": "Gsid",
"objectName": "Digital_Onboarding_Data_Entry__gc",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
}

Please help if you can!

 

Thanks,

David Person

I’ve been told by someone that a @peter_robson may be able to help? Thanks in advance if you are able! I’m very much an API/JSON newb.


Hi David,

Your JSON is almost correct. There were a couple of syntax errors. I also find that when the “Templates” attribute is used, it needs to be added as the last item in the list. Please try this …

{
"requests": s
{
"record": {
"referenceId": "1",
"Name": "{{SPName}}",
"SFDCID": "{{CompanySFDCID}}",
"OwnerEmail": "{{SPOwnerEmail}}",
"DueDate": "{{SPDueDate}}",
"SuccessPlanType": "Digital Solution Onboarding",
"status": "Active",
"RelationshipID": "{{SPRelationshipID}}",
"Onboarding_Data_Entry_Record__gc": "{{DODEGSID}}",
"Templates": t
"Phase 1: Digital Solution Sale"
]
}
}
],
"lookups": {
"OwnerId": {
"fields": {
"OwnerEmail": "Email"
},
"lookupField": "Gsid",
"objectName": "gsuser",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"CompanyId": {
"fields": {
"SFDCID": "SfdcAccountId"
},
"lookupField": "Gsid",
"objectName": "company",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"RelationshipId": {
"fields": {
"RelationshipID": "Gsid"
},
"lookupField": "Gsid",
"objectName": "Relationship",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"Onboarding_Data_Entry_Record__gc": {
"fields": {
"DODEGSID": "Gsid"
},
"lookupField": "Gsid",
"objectName": "Digital_Onboarding_Data_Entry__gc",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
}
}
}

 


Hi @peter_robson ,

I finally got around to testing this as an External Action, but I have received the following error:

{
"result": false,
"errorCode": "COCKPIT_9703",
"errorDesc": "Following lookup field(s) have invalid filter configuration to resolve - RelationshipId -> Relationship : Gsid, Onboarding_Data_Entry_Record__gc -> Digital_Onboarding_Data_Entry__gc : Gsid",
"requestId": "78a9cc7e-83d0-4f68-b82d-6627d2a8ab48",
"data": {},
"message": null
}

Any thoughts on how to resolve this?

Once again, thanks in advance.

 

Thanks,

David


Hi David,

Your mappings are incorrect. 

You can’t use the actual field names in your “record” fields when using a lookup ... They need to be aliases. The “RelationshipID" and "Onboarding_Data_Entry_Record__gc" values are incorrect. Try this in your config. Admittedly, I don’t know your schema, so I am guessing the config for your “DODEGSID” mapping.

{
"requests": >
{
"record": {
"referenceId": "1",
"Name": "{{SPName}}",
"SFDCID": "{{CompanySFDCID}}",
"OwnerEmail": "{{SPOwnerEmail}}",
"DueDate": "{{SPDueDate}}",
"SuccessPlanType": "Digital Solution Onboarding",
"status": "Active",
"RelID": "{{SPRelationshipID}}",
"DODEGSID": "{{DODEGSID}}",
"Templates":
"Phase 1: Digital Solution Sale"
]
}
}
],
"lookups": {
"OwnerId": {
"fields": {
"OwnerEmail": "Email"
},
"lookupField": "Gsid",
"objectName": "gsuser",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"CompanyId": {
"fields": {
"SFDCID": "SfdcAccountId"
},
"lookupField": "Gsid",
"objectName": "company",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"RelationshipId": {
"fields": {
"RelID": "Gsid"
},
"lookupField": "Gsid",
"objectName": "Relationship",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
},
"Onboarding_Data_Entry_Record__gc": {
"fields": {
"DODEGSID": "Gsid"
},
"lookupField": "Gsid",
"objectName": "Digital_Onboarding_Data_Entry__gc",
"multiMatchOption": "FIRSTMATCH",
"onNoMatch": "ERROR"
}
}
}

 


@bytor104 Can you please guide on the end point url used !!I am receiving unauthorized error on testing the connection in actions

 


They list out Endpoint URLs on this page.

 

 

https://support.gainsight.com/gainsight_nxt/Success_Plans/Success_Plan_API_Documentation/Success_Plan_APIs


Reply