Process smart text variable substitution by the unique identifier

post

/crmRestApi/resources/11.13.18.05/smartTexts/action/processSmartTextById

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

Header Parameters
  • 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".
  • 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
Request Body - application/vnd.oracle.adf.action+json ()
Root Schema : schema
Type: object
Show Source
  • A JSON Object represented as a string that provides necessary information to do the variable substitution including the smart text unique identifier, those needed for deriving values for the referenced object and any variable values for the purpose of overriding derived values.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Body ()
Root Schema : schema
Type: object
Show Source
  • 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.
Back to Top

Examples

The following example shows how to process smart text variable substitution by the unique identifier 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": "{puid: SR0000128147}"
        }
    ]
}

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:brbrYour code request Number SR0000128147 is being attended.brbrRegards,\"}"
}
Back to Top