Custom connector
Define a destination contract before attaching a custom connection to a flow.
On this page
Define the destination request
Agree the destination operation, required fields, response shape and authorization with the owner of the receiving system. Specify the stable business identifier used to recognize a repeated call.
Create the connection
Register the destination with category custom and its credentialRef. Put the returned connection identifier in the call step’s connectionId and select the agreed destination operation in action. Map only the fields the destination accepts. Keep transport errors distinct from a business rejection returned by the destination.
curl
curl -X POST "$RDC_BASE_URL/integrations/v1/connections" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/connections`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/integrations/v1/connections',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'name': 'ERP',
'category': 'erp',
'credentialRef': 'credential-erp',
'operationId': '33a22ec0-f0af-4498-a388-123456789abc',
'expectedRevision': 0,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/connections');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/connections");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"name": "ERP",
"category": "erp",
"credentialRef": "credential-erp",
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"expectedRevision": 0
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"status": "accepted",
"aggregateRevision": 1,
"aggregateId": "connection-erp"
} Verify recovery behavior
Test a successful call, a rejected payload and a lost response after the destination writes the record. Confirm that retrying the stable identifier returns the same business outcome without creating a second record.