Email - Generate Transaction Email
post
/rest/v16/commerceDocuments{ProcessVarName}{MainDocVarName}/{id}/actions/_action_process_email_print
Use this endpoint to retrieve the objects required to send a transaction email.
Request
Supported Media Types
- application/json
Path Parameters
-
MainDocVarName(required): string
The variable name of the main document, note the first letter must be capitalized.
-
ProcessVarName(required): string
The variable name of the commerce process, note the first letter must be capitalized.
-
id(required): integer
Current unique user-side ID. This is the internal identifier for a transaction within a CPQ site.
Root Schema : Transaction-EmailPrintRequest
Type:
Show Source
object
-
cacheInstanceId:
string
Title:
Cache Instance Id
The unique identifier for the entry of transaction data stored in the cache. This typically is obtained from first createTransaction or OpenTransaction action and passed along in subsequent Modify/Interact action to avoid reload transaction data from db. -
criteria:
object Query Definition
Title:
Query Definition
Captures the query definition for the current resource request. -
delta:
boolean
Title:
Delta
The boolean parameter to request a delta response for data as well as state in the context of current criteria. -
langAttributeValue:
integer
Title:
Language Attribute Value
Language attribute value for the print document -
languagePreference:
string
Title:
Language Attribute Value
Language attribute value for the print document -
revisionId:
string
Title:
Revision Id
The string parameter that contains the revision information.
Nested Schema : Query Definition
Type:
object
Title:
Query Definition
Captures the query definition for the current resource request.
Show Source
-
actions:
array actions
Array of actions names, whose state is requested in the state object response.
-
childDefs:
array childDefs
-
expand:
array expand
Array of child resource names that you want to expand so that the contents return with the parent in the same request.
-
expandedDomains:
array expandedDomains
Array of field names, whose expanded domains are requested in the state object response.
-
fields:
array fields
Array of field names that you wanted returned in a request.
-
state:
boolean
Boolean value that specifies whether to calculate the state property. By default, this value is set to false indicating that state is not calculated.
Nested Schema : actions
Type:
array
Array of actions names, whose state is requested in the state object response.
Show Source
Nested Schema : childDefs
Type:
Show Source
array
-
Array of:
object Child query criteria.
Title:
Child query criteria.
Captures the query criteria for the child resource.
Nested Schema : expand
Type:
array
Array of child resource names that you want to expand so that the contents return with the parent in the same request.
Show Source
Nested Schema : expandedDomains
Type:
array
Array of field names, whose expanded domains are requested in the state object response.
Show Source
Nested Schema : fields
Type:
array
Array of field names that you wanted returned in a request.
Show Source
Nested Schema : Child query criteria.
Type:
object
Title:
Child query criteria.
Captures the query criteria for the child resource.
Show Source
-
name:
string
Rest alias name of the child resource this query belongs to.
-
queryDef:
object Query Definition
Title:
Query Definition
Captures the query definition for the current resource request. -
recursive:
boolean
Boolean value that specifies whether this query is a recursive expand on the current child resource query.
Response
Supported Media Types
- application/json
Default Response
Root Schema : Transaction-EmailPrintResponse
Type:
Show Source
object
-
attachments:
array Attachments available
Title:
Attachments available
List of attachments available for email action. -
availableAttachmentsForMerge:
array Attachments available for merge.
Title:
Attachments available for merge.
List of attachments available to merge for an email or print action. -
bccEmail:
string
Title:
Bcc Email
The bcc email address(es) -
cacheInstanceId:
string
Title:
Cache Instance Id
The unique identifier for the entry of transaction data stored in the cache. This typically is obtained from first createTransaction or OpenTransaction action and passed along in subsequent Modify/Interact action to avoid reload transaction data from db. -
ccEmail:
string
Title:
Cc Email
The cc email address(es) -
comments:
string
Title:
Comments
The comments to be sent in the email body -
fromEmail:
string
Title:
From Email
The sender's email address -
fromName:
string
Title:
From Name
The sender's name -
generatedProposalAttachmentForMerge:
array Attachments Selected by Default.
Title:
Attachments Selected by Default.
Default selected attachment for an email or print action. -
revisionId:
string
Title:
Revision Id
The string parameter that contains the revision information. -
subject:
string
Title:
Subject
The email subject line -
toEmail:
string
Title:
To Email
The recipient's email address(es) -
toName:
string
Title:
To Name
The recipient's name -
warnings:
object warnings
Title:
warnings
warning messages -
xslViews:
array XslViews
Title:
XslViews
Captures the array of XslViews available in Process Action
Nested Schema : Attachments available
Type:
array
Title:
Attachments available
List of attachments available for email action.
Show Source
-
Array of:
object Attachment properties
Title:
Attachment properties
Captures the id and name of the attachment
Nested Schema : Attachments available for merge.
Type:
array
Title:
Attachments available for merge.
List of attachments available to merge for an email or print action.
Show Source
-
Array of:
object Attachment properties
Title:
Attachment properties
Captures the id and name of the attachment
Nested Schema : Attachments Selected by Default.
Type:
array
Title:
Attachments Selected by Default.
Default selected attachment for an email or print action.
Show Source
-
Array of:
object Attachment properties
Title:
Attachment properties
Captures the id and name of the attachment
Nested Schema : warnings
Type:
object
Title:
warnings
warning messages
Show Source
-
messages:
array Messages
Title:
Messages
Array of messages that have been generated for a specific object.
Nested Schema : XslViews
Type:
array
Title:
XslViews
Captures the array of XslViews available in Process Action
Show Source
-
Array of:
object XslViewDef
Title:
XslViewDef
Captures the XslView available in Process Action
Nested Schema : Attachment properties
Type:
object
Title:
Attachment properties
Captures the id and name of the attachment
Show Source
-
id:
integer
ID for the attachment.
-
name:
string
Name for the attachment.
Nested Schema : Messages
Type:
array
Title:
Messages
Array of messages that have been generated for a specific object.
Show Source
-
Array of:
string
warning message.
Nested Schema : XslViewDef
Type:
object
Title:
XslViewDef
Captures the XslView available in Process Action
Show Source
-
id:
integer
ID for the attachment.
-
isMergeAttachmentSupported:
string
Is Merge Attachment supported for given XslView
-
name:
string
Name for the attachment.
Examples
The following example shows how to retrieve the objects required to send a transaction email by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X POST -i -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" -H "Accept: application/json" https://sitename.oracle.com/rest/v16/commerceDocumentsOraclecpqoTransaction/18498612/actions/_action_process_email_print
Response Body Sample
{ "comments": "", "attachments": null, "ccEmail": "", "availableAttachmentsForMerge": [{ "id": 3023140360, "name": "Attachment 1.pdf (Transaction - attachment 1)" } ], "subject": "", "warnings": {}, "fromEmail": "myemail@sitename.com", "xslViews": [{ "id": 3023140083, "name": "english tempalte pdf output(Printer Friendly/History)", "isMergeAttachmentSupported": true }, { "id": 3023140134, "name": "English Document DOCX Ouput(Printer Friendly/History)", "isMergeAttachmentSupported": false } ], "revisionId": "46,0", "bccEmail": "", "generatedProposalAttachmentForMerge": [{ "id": -2, "name": "GENERATED PROPOSAL" } ], "toName": null, "fromName": null, "toEmail": "" }