Process smart text variable substitution
post
/crmRestApi/resources/11.13.18.05/smartTexts/{smartTextsUniqID}/action/processSmartText
This action accepts a jsonString with the primary keys of the smart text and the referenced object. The action then substitutes the variables in the smart text with the data obtained from the referenced object. Alternatively, you can use the PUID instead of the primary key to reference the smart text.
Request
Path Parameters
-
smartTextsUniqID(required): string
This is the hash key of the attributes which make up the composite key--- StdTxtId, Language and StandardTextId ---for the Smart Texts resource and used to uniquely identify an instance of Smart Texts. The client should not generate the hash key value. Instead, the client should query on the Smart Texts collection resource with a filter on the primary key values in order to navigate to a specific instance of Smart Texts.
For example: smartTexts?q=StdTxtId=<value1>;Language=<value2>;StandardTextId=<value3>
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
- application/vnd.oracle.adf.action+json
Root Schema : schema
Type:
Show Source
object
-
paramsValuesJson: string
A JSON Object represented as a string that provides necessary information to do the variable substitution including those needed for deriving values for the referenced object and any variable values for the purpose of overriding derived values.
Response
Supported Media Types
- application/json
- application/vnd.oracle.adf.actionresult+json
Default Response
The following table describes the default response for this task.
Root Schema : schema
Type:
Show Source
object
-
result(required): string
A JSON Object repesented as a string value that provides the smart text with the variables values substituted. Also returns the variables that could not be substituted for prompting on the user interface.
Examples
The following example shows how to process smart text variable substitution by submitting a post request on the REST resource using cURL.
cURL Command
curl -u <username:password> \ -X POST -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/smartTexts/00020000000255530000000EACED00057708000110F09A830876
Example of Request Body
The following shows an example of the request body in JSON format.
{ "name": "processSmartText", "parameters": [ { "paramsValuesJson": "{primaryKey: 300100547166949}" } ] }
Example of Response Body
The following shows an example of the response body in JSON format.
{ "result": "{\"status\":\"Success\",\"smartText\":\"Dear FirstName_a6c87992392 LastName_a6c87992392:br
br
Your code request Number SR0000128147 is being attended.br
br
Regards,\"}" }