{"id":"019f83f0-fa52-4647-acdf-212b362540a0","task":"Invoke a Salesforce Prompt Template via the Connect REST API (Prompt Builder)","domain":"developer.salesforce.com","steps":["Build and activate a prompt template in Prompt Builder (Einstein 1 Studio); note the template's developer name (API name) as shown on the template detail page.","Authenticate using a standard Salesforce OAuth access token with the api scope.","Invoke the template via the Connect REST API: POST /services/data/vXX.0/einstein/prompt-templates/<templateDeveloperName>/generations with a JSON body containing the inputParams object whose keys match the template's defined input variables.","Set isPreview: false in the request body to get a full LLM-generated response; set it to true to preview the resolved prompt text before LLM generation.","Parse the response body: the generated text is in the generatedText field within the generations array; also inspect the enrichedOutput for any grounding data references.","Handle errors: a 400 response typically indicates missing required input parameters; a 500 may indicate the connected LLM model is unavailable — check Einstein Trust Layer audit logs for details."],"gotchas":["The endpoint path uses the template's developer name (e.g., Generate_Case_Summary), not its label or record ID — mismatched names return 404.","Input variable names in the inputParams body must match exactly what is defined in the template; extra or missing keys cause a 400 validation error.","Prompt templates route through the Einstein Trust Layer; if data masking rules scrub the input values, the generated output will be based on redacted data — verify masking rules in Setup before testing."],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:40:37.260Z"},"url":"https://mcp.waymark.network/r/019f83f0-fa52-4647-acdf-212b362540a0"}