2 Replies Latest reply on Jul 10, 2018 8:50 PM by 3723925

    Setting Eloqua "From Email" address using the Rest API

    31b7530a-1be1-4ab9-8395-1e023f90eb73

      Hi Support Team,

       

      I'm trying to send an email to an Eloqua contact via the REST API. I'm calling 'api/REST/2.0/assets/email/deployment ' with a POST request method.

      The problem: The email is actually sent to the contact but how can I modify the email address it is sent from? I.e the 'Sent From' email address?

       

      I have added 'sendFromUserID' to the request parameters in the CURL POST, which is in accordance with the API documentation.

       

      https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAC/op-api-rest-2.0-assets-email-deployment-post.html

       

      I have assigned the ID of a dummy contact in Eloqua to this parameter (sendFromUserID)  but still fails to modify the

      'From' email address as expected.

       

      Is there a certain type of ID that can be passed to this parameter as only the API user ID seems to work?

       

      Any hint on how this issue can be resolved will be appreciated.

       

      Many thanks in advance.

       

      David.

        • 1. Re: Setting Eloqua "From Email" address using the Rest API
          3723925

          Hi, David,

           

          I'm no Eloqua expert, and I stumbled across your question yesterday, looking for a solution to the same problem.  I think I've found a solution, at least in the case of the EmailInlineDeployment deployment.

           

          In your question, you don't specify what type of EmailDeployment you're trying to create with your POST request.  If you're creating the "EmailInlineDeployment" type, I found that I can specify the replyTo and sender by adding them to the "email" object inside the "EmailInlineDeployment" object (which you post as the body of your POST request).  The "sendFromUserId" also needs to be set, but that id doesn't need to correspond to the replyTo or sender information.  Something like this:

           

          {

            "clickthroughCount": null,

            "contacts": [

              {

                "id": 1

                "emailAddress": "recipient@somewhere.com",

              }

            ],

            "openCount": null,

            "sendFromUserId": 1,

            "email": {

              ... other stuff here (including the htmlContent), omitted for clarity ...

              "subject": "My Test",

              "replyToEmail":"someone@somewhere.com",

              "replyToName":"The reply-to name",

              "senderEmail":"someone-else@somewhere.com",

              "senderName":"The sender's name"

            },

              "sendOptions": {

                  "allowResend": "true",

                  "allowSendToUnsubscribe": "false"

              }

          }

           

          I haven't been able to get this to work with the "EmailTestDeployment" type of deployment.  I would imagine that since the email already exists in Eloqua, Eloqua expects you to have the correct ReplyTo and Sender set on the email object itself, prior to deploying the email.  But that's only a guess on my part.

           

          I hope this helps.  If you can't get it to work, let me know.

           

          Jeff

          • 2. Re: Setting Eloqua "From Email" address using the Rest API
            Chris M. Crowe

            Hi David,

             

            The email sender name and address are contained within the Email Asset object (https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAC/op-api-rest-2.0-assets-email-post.html). You'll have to create or modify the sender details within that object prior to accessing the Email Deployment object. Hope this helps!

             

            Chris