Overview
The “Response” panel returns a JSON object from a Logic+ flow when the flow is invoked through the /execute API endpoint. It is the bridge between a Logic+ flow and any external system that calls it (CRM, custom UI, agent desktop integration, ElevenLabs Conversational AI tool, Workato recipe, etc.).
Properties
-
Name
Enter a unique, descriptive name to identify the panel.
-
Description
Enter any notes about the panel for reference. This field is collapsed by default; select the down arrow to expand it.
-
Initiates Flow
Designates this panel as the starting point of the Logic flow. When selected, this panel will be the first to execute when the flow is triggered. This can only be removed by setting a different panel as the flow initiator.
-
Redact Data in Logging
Disables data logging for this panel to support data redaction requirements. This feature is available upon request and is subject to change.
Fields
Response
The Response field can be edited two ways:
-
Plain text (raw JSON)
Paste a complete JSON object as a string. Useful when you have a known shape from a downstream consumer's contract.
-
JSON editor
Build the response visually using the Add Property, Add Object, and Add Array buttons. Useful when iterating on a new shape or when you want to avoid syntax errors.
Variable substitution
Reference any variable populated earlier in the flow using $(variableName).
{
"data": {
"customer": {
"CustomerId": "$(CustomerId)",
"CustomerName": "$(CustomerName)"
}
}
}Variables that were never populated upstream will resolve to an empty string.
Worked example: Customer Account Lookup
This example builds a simple Logic+ flow that:
Accepts a
customerIdfrom the API caller.Calls a CRM endpoint to fetch the customer record.
Extracts individual fields into named variables.
Returns the customer record in a structured JSON shape.
Flow shape
[Integration Panel] → [Extract Customer Fields] → [Response Panel]Response panel JSON
{
"data": {
"customer": {
"CustomerId": "$(CustomerId)",
"CustomerName": "$(CustomerName)",
"CustomerEmail": "$(CustomerEmail)",
"CustomerPhone": "$(CustomerPhone)",
"AccountTier": "$(AccountTier)",
"AccountStatus": "$(AccountStatus)",
"LifetimeValue": "$(LifetimeValue)",
"LastContactDate": "$(LastContactDate)",
"AccountManagerName": "$(AccountManagerName)",
"AccountManagerEmail": "$(AccountManagerEmail)"
}
}
}Sample API response payload
When the flow is called successfully, the consumer receives the following:
{
"logicId": "021xxxxxxxxxxxxxxx",
"interactionId": "016xxxxxxxxxxxxxxx",
"logicInstanceId": "00000000-0000-0000-0000-000000000000",
"logicType": "custom",
"response": {
"data": {
"customer": {
"CustomerId": "C-44218",
"CustomerName": "Jordan Rivera",
"CustomerEmail": "jordan.rivera@example.com",
"CustomerPhone": "5125550199",
"AccountTier": "Gold",
"AccountStatus": "Active",
"LifetimeValue": "$48,275.00",
"LastContactDate": "2026-05-14",
"AccountManagerName": "Priya Shah",
"AccountManagerEmail": "pshah@example.com"
}
}
}
}The logicId, interactionId, logicInstanceId, and logicType fields are added automatically by the platform — you do not need to define them in the Response panel. Only the contents of response are configurable.
Calling the flow via API
Logic+ flows are invoked by POSTing to:
POST https://api-gateway.<iz>.sharpencx.com/v1/logics/<logicId>/execute
Critical: "sync": true
By default the /execute endpoint returns immediately and runs the flow asynchronously in the background. In that mode, the API caller does not receive the Response panel output; they get an acknowledgment that the flow started, with no response field populated.
To receive the Response panel payload, the request body must include "sync": true. With sync: true, the API call blocks until the flow completes and returns the Response panel's JSON.
If your API call is returning empty values for every field, check that "sync": true is set on the request body. This is the most common cause of "the variables are populated correctly upstream but the response is blank."
Request body shape
{
"sync": true,
"customVariables": {
"interactionId": "1111111",
"customerId": "C-44218"
}
}customVariables is the entry point for any input the flow needs. Each key/value pair becomes a Logic+ variable available to the flow as $(keyName).
Required headers
Header |
Value |
|---|---|
|
Your Sharpen API key |
|
Your Sharpen API secret |
|
|
Example: PHP cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-gateway.iz1.sharpencx.com/v1/logics/<logicId>/execute',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"sync": true,
"customVariables": {
"interactionId": "1111111",
"customerId": "C-44218"
}
}',
CURLOPT_HTTPHEADER => array(
'x-api-key: <your-api-key>',
'x-api-secret: <your-api-secret>',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;Example: cURL (command line)
curl --location 'https://api-gateway.iz1.sharpencx.com/v1/logics/<logicId>/execute' \
--header 'x-api-key: <your-api-key>' \
--header 'x-api-secret: <your-api-secret>' \
--header 'Content-Type: application/json' \
--data '{
"sync": true,
"customVariables": {
"interactionId": "1g2cdfsd3vc432",
"customerId": "C-44218"
}
}'Troubleshooting
Symptom |
Likely cause |
Fix |
|---|---|---|
API returns |
|
Add |
|
Upstream variables were never populated, or the upstream panel failed silently |
Check the flow execution log; verify that the panels feeding the variables ran successfully and produced the expected output |
-
The response contains
nullwhere a field value is expected
This is expected behavior—Logic+ stringifies null values returned from source APIs. If you need a different output, add asetVariablepanel before the Response panel to convert[null]to""or"N/A"before it reaches the response.
-
A variable is rendering as literal
$(variableName)text instead of its value
The variable name in the Response panel does not match the name set upstream. Variable names are case-sensitive—verify the exact spelling and casing against the upstreamsetVariablepanel.
-
The flow times out before returning a response
An upstream integration is taking longer than the API gateway's timeout window allows. To resolve this, reduce the work being done upstream, increase the
timeoutvalue on the integration panel, or move long-running operations to an async pattern that does not usesync.
Best practices
Always test with
"sync": trueduring development. Without it, you cannot validate the response shape from the calling side.Wire the Response panel last in the flow. Any panel after it will not contribute to the returned payload.
Match field names to your downstream consumer's contract. Coordinate with the team building the caller (CRM screen, agent desktop widget, voice agent tool) before finalizing the shape.
Enable Redact Data in Logging for any flow that returns customer PII, payment data, account numbers, or credentials.
Use a consistent envelope. Wrapping payloads in
{ "data": { "<entity>": { ... } } }keeps room to add metadata fields (status,errors,meta) later without breaking consumers.Document the Response shape in the panel description. Future maintainers will thank you when they're tracing why a downstream consumer broke.
Related panels
-
Integration panel
Fetches data from external APIs that the Response panel will return.
-
Set Variable panel
Extracts and shapes data into named variables ready for the Response panel.
-
Send Email panel
Useful as a parallel debugging output during development to confirm variable values mid-flow.
Related Articles
This article is part of a series on Admin Configuration topics.