Create a smart text

post

/crmRestApi/resources/11.13.18.05/smartTexts

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.
  • 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
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
  • The unique identifier of the business unit that primarily uses the smart text.
  • Maximum Length: 30
    The domain or category to which the smart text belongs to, such as ORA_GENERIC.
  • Maximum Length: 1
    Default Value: true
    Indicates whether the standard text is enabled for use.
  • The date when the use of the smart text expires.
  • The unique identifier of the folder to which the standard text is assigned.
  • 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.
  • Maximum Length: 4
    Indicates the code of the language into which the contents of the translatable columns are translated.
  • Maximum Length: 150
    The primary object for which the smart text is used for, such as ServiceRequest.
  • 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.
  • The date when the use of the smart text begins.
  • Maximum Length: 50
    A short description of the standard text.
  • Maximum Length: 30
    Indicates the stripe to which the smart text belongs to, such as ORA_SVC_CRM or ORA_SVC_HCM.
  • The language dependent and translatable standard text that forms the smart text.
  • Maximum Length: 30
    The unique identifier of the row.
  • The user who can access the smart text, when the Scope of the smart text is set to ORA_SVC_USER.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • 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.
Body ()
Root Schema : smartTexts-item-response
Type: object
Show Source
  • The unique identifier of the business unit that primarily uses the smart text.
  • Read Only: true
    Maximum Length: 64
    The user who created the smart text.
  • Read Only: true
    The date and time when the smart text was created.
  • Maximum Length: 30
    The domain or category to which the smart text belongs to, such as ORA_GENERIC.
  • Maximum Length: 1
    Default Value: true
    Indicates whether the standard text is enabled for use.
  • The date when the use of the smart text expires.
  • The unique identifier of the folder to which the standard text is assigned.
  • 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.
  • Maximum Length: 4
    Indicates the code of the language into which the contents of the translatable columns are translated.
  • Read Only: true
    The date when the smart text was last updated.
  • Read Only: true
    Maximum Length: 64
    The user who last updated the smart text.
  • Read Only: true
    Maximum Length: 32
    The login of the user who last updated the smart text.
  • Links
  • Maximum Length: 150
    The primary object for which the smart text is used for, such as ServiceRequest.
  • 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.
  • Read Only: true
    The unique identifier of the smart text translation entity along with the language.
  • The date when the use of the smart text begins.
  • Read Only: true
    The unique identifier of the smart text. You can use this to retrieve a smart text.
  • Maximum Length: 50
    A short description of the standard text.
  • Maximum Length: 30
    Indicates the stripe to which the smart text belongs to, such as ORA_SVC_CRM or ORA_SVC_HCM.
  • The language dependent and translatable standard text that forms the smart text.
  • Read Only: true
    Maximum Length: 4000
    Tooltip text derived from text value.
  • Maximum Length: 30
    The unique identifier of the row.
  • The user who can access the smart text, when the Scope of the smart text is set to ORA_SVC_USER.
Back to Top

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"
        }
    ]
}
Back to Top