For the managed package runtime, to request JSON data from an Integration Procedure, issue a GET call. With a GET call, you can specify inline values in the URL path and append query parameters to the URL. You can't pass data with a JSON request body.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Use a URL formatted like this:
/services/apexrest/{namespace}/v1/integrationprocedure/{Type}_{SubType}/
The namespace is omnistudio,
vlocity_ins,
vlocity_cmt, or
or vlocity_ps. Specify the Type and SubType of the
Integration Procedure.
To pass input data in a GET call, you can specify inline URL path parameters or append query parameters. If you must specify a JSON request body, use a POST call instead.
When using an Integration Procedure with a REST API, follow these guidelines:
- In JSON notation, curly braces are literal. They delimit JSON objects.
- In REST URL notation, curly braces surround variable values that you must replace. Don't include the braces in an actual request.
- Treat all parts of the REST URL as case-sensitive.
In this example, an Integration Procedure that creates cases requires a Contact name and
returns the Id of the newly created case. The Contact name is appended to the URL as a
query parameter. The value %20 is the URL-encoded
space between the first and last names.
-
GET URL:
/services/apexrest/vlocity_ins/v1/integrationprocedure/Create_Cases/?Contact=Dennis%20Reynolds -
Result:
{ "Case": { "Id": "0036100001HDn3QAAT" } }
You can pass parameters to an Integration Procedure as part of the URL in two ways:
-
Inline values in the URL path
-
Appended query parameter=value pairs
For example, the syntax of a URL looks like this:
/services/apexrest/{namespace}/v1/integrationprocedure/{Type}_{SubType}/{inlinevalue1}/{inlinevalue2}/?{Param1}={Value1}
You can call the URL with these values:
/services/apexrest/vlocity_cmt/v1/integrationprocedure/IP_Rest/Apple/Phones/?product=iPhoneX
The GET call sends this input to the Integration Procedure. Values passed in the URL path
are added under the options node of the JSON, with keys
named PathN.
{
"options": {
"Path1": "Apple",
"Path2": "Phones",
"product": "iPhoneX",
"isDebug": "true"
}
}
You can also set Integration Procedure options such as chainable
or queueableChainable as query parameters with a REST call:
/services/apexrest/vlocity_ins/v1/integrationprocedure/Create_Cases/?queueableChainable=true