Discussions

Adjusting the subject line in an Email Deployment using the API

kevincassidy313kevincassidy313 Posts: 36 Bronze Badge
edited September 15 in Developer Tools

Hi,

We have an internal tool that stakeholders use to build their emails in a drag-and-drop WYSIWYG interface.

One of the features of this tool is that it allows users to send themselves a test email (just like you would from within Eloqua itself).

When the API call is fired, the test email is sent successfully. It shows the actual subject line. What I would like to do is, mimic Eloqua's functionality where they put *TEST* before and after the subject line.

Does anybody know how to do this with the API?

Current state: Subject line is This is a test email

Ideal state: Subject line is * TEST * This is a test email * TEST *

This is the API endpoint I'm using: https://docs.oracle.com/en/cloud/saas/marketing/eloqua-rest-api/op-api-rest-2.0-assets-email-deployment-post.html 

And this is the body of my call:

var json = {

        "type": "EmailTestDeployment",

        "name": "Email Editor",

        "contactId": contactID,

        "email": {

          "type": "Email",

          "id": emailID,

          "name": emailName

        },

        "sendOptions": {

          "allowResend": "true",

          "allowSendToUnsubscribe": "true",

          "allowSendToGroupUnsubscribe": "true"

        }

      }

I've tried putting the parameter 'subject' inside the 'email' object but that didn't work. I also tried using the parameter 'sentSubject' but again, no effect - in both cases the original subject line was sent.

Any help would be greatly appreciated.

Thanks,
Kevin

Post edited by Unknown User on

Best Answer

  • Lou PatrickLou Patrick Posts: 343 Gold Badge
    edited September 14 Accepted Answer

    The TEST added by Eloqua only occurs via the test send in the Eloqua UI.

    Via the Email Deployment endpoint you are actually sending the email, and it's not possible to send a test email like you can in Eloqua, nor is it possible to adjust the subject line in this request, the subject line set on the email will always be used. If you want to add TEST to the subject line, you'd have to update the actual subject line on the email, which can be done via the Update an email API endpoint, before sending via the Email Deployment endpoint.

Answers

  • kevincassidy313kevincassidy313 Posts: 36 Bronze Badge
    edited September 15

    Thanks Lou. I appreciate the response.

    Do you know if this functionality will be added in the future - I assume the old 'Send Test Email' is eventually going to be upgraded to the Eloqua 10 interface?

    Thanks,

    Kevin

  • Lou PatrickLou Patrick Posts: 343 Gold Badge
    edited September 15

    Looping in the product manager for this area, @Wren Ludlow-Oracle, to comment on any future plans for the Test Email feature.

Sign In or Register to comment.