Create a smart text
post
/crmRestApi/resources/11.13.18.05/smartTexts
Request
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.
-
Upsert-Mode:
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
BuOrgId: integer
(int64)
The unique identifier of the business unit that primarily uses the smart text.
-
Domain: string
Maximum Length:
30
The domain or category to which the smart text belongs to, such as ORA_GENERIC. -
EnabledFlag: boolean
Maximum Length:
1
Default Value:true
Indicates whether the standard text is enabled for use. -
EndDate: string
(date)
The date when the use of the smart text expires.
-
FolderId: integer
(int64)
The unique identifier of the folder to which the standard text is assigned.
-
HtmlFlag: boolean
Maximum Length:
20
Default Value:false
Indicates if the standard text is rich text or plain text. Possible values are Yes and No. If the values is Yes, then the standard text is in rich text format. -
Language: string
Maximum Length:
4
Indicates the code of the language into which the contents of the translatable columns are translated. -
Object: string
Maximum Length:
150
The primary object for which the smart text is used for, such as ServiceRequest. -
Scope: string
Maximum Length:
20
Default Value:ORA_SVC_USER
Indicates if the smart text is accessible globally or to a specific user. The possible values are ORA_SVC_GLOBAL and ORA_SVC_USER. If the value is ORA_SVC_USER, then the smart text is accessible to a specific user. The user's party Id is set in the USER_PARTY_ID attribute. -
StartDate: string
(date)
The date when the use of the smart text begins.
-
StdtxtName: string
Maximum Length:
50
A short description of the standard text. -
StripeCd: string
Maximum Length:
30
Indicates the stripe to which the smart text belongs to, such as ORA_SVC_CRM or ORA_SVC_HCM. -
Text: string
(byte)
The language dependent and translatable standard text that forms the smart text.
-
UniqueNumber: string
Maximum Length:
30
The unique identifier of the row. -
UserPartyId: integer
(int64)
The user who can access the smart text, when the Scope of the smart text is set to ORA_SVC_USER.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
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.
Root Schema : smartTexts-item-response
Type:
Show Source
object
-
BuOrgId: integer
(int64)
The unique identifier of the business unit that primarily uses the smart text.
-
CreatedBy: string
Read Only:
true
Maximum Length:64
The user who created the smart text. -
CreationDate: string
(date-time)
Read Only:
true
The date and time when the smart text was created. -
Domain: string
Maximum Length:
30
The domain or category to which the smart text belongs to, such as ORA_GENERIC. -
EnabledFlag: boolean
Maximum Length:
1
Default Value:true
Indicates whether the standard text is enabled for use. -
EndDate: string
(date)
The date when the use of the smart text expires.
-
FolderId: integer
(int64)
The unique identifier of the folder to which the standard text is assigned.
-
HtmlFlag: boolean
Maximum Length:
20
Default Value:false
Indicates if the standard text is rich text or plain text. Possible values are Yes and No. If the values is Yes, then the standard text is in rich text format. -
Language: string
Maximum Length:
4
Indicates the code of the language into which the contents of the translatable columns are translated. -
LastUpdateDate: string
(date-time)
Read Only:
true
The date when the smart text was last updated. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
The user who last updated the smart text. -
LastUpdateLogin: string
Read Only:
true
Maximum Length:32
The login of the user who last updated the smart text. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
Object: string
Maximum Length:
150
The primary object for which the smart text is used for, such as ServiceRequest. -
Scope: string
Maximum Length:
20
Default Value:ORA_SVC_USER
Indicates if the smart text is accessible globally or to a specific user. The possible values are ORA_SVC_GLOBAL and ORA_SVC_USER. If the value is ORA_SVC_USER, then the smart text is accessible to a specific user. The user's party Id is set in the USER_PARTY_ID attribute. -
StandardTextId: integer
(int64)
Read Only:
true
The unique identifier of the smart text translation entity along with the language. -
StartDate: string
(date)
The date when the use of the smart text begins.
-
StdTxtId: integer
(int64)
Read Only:
true
The unique identifier of the smart text. You can use this to retrieve a smart text. -
StdtxtName: string
Maximum Length:
50
A short description of the standard text. -
StripeCd: string
Maximum Length:
30
Indicates the stripe to which the smart text belongs to, such as ORA_SVC_CRM or ORA_SVC_HCM. -
Text: string
(byte)
The language dependent and translatable standard text that forms the smart text.
-
Tooltip: string
Read Only:
true
Maximum Length:4000
Tooltip text derived from text value. -
UniqueNumber: string
Maximum Length:
30
The unique identifier of the row. -
UserPartyId: integer
(int64)
The user who can access the smart text, when the Scope of the smart text is set to ORA_SVC_USER.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Links
- processSmartText
-
Parameters:
- smartTextsUniqID:
$request.path.smartTextsUniqID
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. - smartTextsUniqID:
Examples
The following example shows how to create a smart text 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
Example of Request Body
The following shows an example of the request body in JSON format.
{ "StdtxtName": "Customer Smarttext UseCase", "UniqueNumber":"CUST_0001", "HtmlFlag": "Y", "Scope": "ORA_SVC_GLOBAL", "FolderId": 300100543139872, "Object": "ServiceRequestVO", "BuOrgId": 204, "Text": "RGVhciBbW1NlcnZpY2VSZXF1ZXN0Vk8uUHJpbWFyeUNvbnRhY3RQYXJ0eU5hbWVdXTo8YnIgLz48YnIgLz5Zb3VyIGNvZGUgcmVxdWVzdCBOdW1iZXIgW1tTZXJ2aWNlUmVxdWVzdFZPLlNyTnVtYmVyXV0gaXMgYmVpbmcgYXR0ZW5kZWQuPGJyIC8+PGJyIC8+UmVnYXJkcyw=", "Language": "US" }
Example of Response Body
The following shows an example of the response body in JSON format.
{ "StdTxtId": 300100547184758, "CreatedBy": "SALES_ADMIN", "CreationDate": "2021-05-06T15:01:35+00:00", "LastUpdatedBy": "SALES_ADMIN", "LastUpdateDate": "2021-05-06T15:01:35.040+00:00", "LastUpdateLogin": "C1790815EA079FCAE053773AF80ABE96", "StdtxtName": "Customer Smarttext Example", "HtmlFlag": true, "FolderId": 300100543810122, "Scope": "ORA_SVC_GLOBAL", "UserPartyId": null, "EnabledFlag": true, "StartDate": "2021-05-06", "EndDate": null, "Domain": "ORA_GENERIC", "Object": "ServiceRequestVO", "StripeCd": "ORA_SVC_CRM", "BuOrgId": 204, "Language": "US", "StandardTextId": null, "UniqueNumber": "CUST_0001", "links": [ { "rel": "self", "href": "https:/myapplicationdomain.com:port/crmRestApi/resources/11.13.18.05/smartTexts/00020000000255530000000EACED00057708000110F09A830876", "name": "smartTexts", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https:/myapplicationdomain.com:port/crmRestApi/resources/11.13.18.05/smartTexts/00020000000255530000000EACED00057708000110F09A830876", "name": "smartTexts", "kind": "item" }, { "rel": "action", "href": "https:/myapplicationdomain.com:port/crmRestApi/resources/11.13.18.05/smartTexts/00020000000255530000000EACED00057708000110F09A830876/action/processSmartText", "name": "processSmartText", "kind": "other" }, { "rel": "enclosure", "href": "https:/myapplicationdomain.com:port/crmRestApi/resources/11.13.18.05/smartTexts/00020000000255530000000EACED00057708000110F09A830876/enclosure/Text", "name": "Text", "kind": "other" } ] }