Expand my Community achievements bar.

SOLVED

Adobe API capabilities

Avatar

Level 4

Does anyone know which Adobe API method or function to use to create a campaign? thoughts

 

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @Ramaswami  you can use CreateOperationFromModel : https://docs.adobe.com/content/help/en/campaign-classic/technicalresources/api/sm-operation-CreateOp...

Its a fairly complex XML structure to create the Operation and Workflow, so I would try to use the UI in conjunction with a web services capture utility like Fiddler to capture some example requests so you can see how the UI creates a campaign from scratch: https://helpx.adobe.com/campaign/kb/soap-traffic-fiddler.html

Cheers Darren

View solution in original post

8 Replies

Avatar

Correct answer by
Level 9

Hi @Ramaswami  you can use CreateOperationFromModel : https://docs.adobe.com/content/help/en/campaign-classic/technicalresources/api/sm-operation-CreateOp...

Its a fairly complex XML structure to create the Operation and Workflow, so I would try to use the UI in conjunction with a web services capture utility like Fiddler to capture some example requests so you can see how the UI creates a campaign from scratch: https://helpx.adobe.com/campaign/kb/soap-traffic-fiddler.html

Cheers Darren

Avatar

Level 4

Hi Darren,

Thanks for the suggestion.

 

what i understood is to use the function "CreateOperationFromModel" and inside the function we need to provide xml and that xml should be taken from fiddler.

 

Our Adobe instance is hosted in cloud.

instance url: https://rXXXXXx.com

my ip : XX.XX.XX.XX

I tried using fiddler.I configured this in fiddler using the above details:

if (oSession.HostnameIs("https://XXX.com")) { oSession.host = "XX.XX.XX"}

and i have created a campaign in back end tool using create a campaign through UI but i can't able to see the related soap messages in fiddler while i am creating a campaign at back end. Maybe i am doing some mistake in configuring the fiddler. Can you please help.

Avatar

Level 4
Hi Darren, Can you please give me an example of the configuration and xml.

Avatar

Level 9
Hi @Ramaswami you should use the IP address of the server host, not your IP address. Just ping the server hostname and you should see the IP address. The example was for a locally installed version of Campaign. I also wouldn't recommend posting your server details and your local IP address here as well - probabaly best to edit those out

Avatar

Level 4
Hi Darren, yes! did that. Our Adobe campaign is hosted in cloud so this idea won't work if it's hosted in cloud? Is there any other alternative to create a campaign through APIs if Adobe is hosted on cloud.

Avatar

Level 9
You shouldn't have any issues capturing requests using Fiddler if your instance is cloud hosted. Ours is hosted and I have used Fiddler before to capture traffic. You also shouldnt have any issues creating Campaigns remotely. Just make sure you secure the external user account to API use only and set a good password on it. I would reccomend using SoapUI to set up the WSDL files and test the services you have captured in Fiddler.

Avatar

Level 4

Hi Darren,

i am capturing xml through edit> edit source xml and using this xml in the API method.

But our campaign workflow has a script which ties campaigns to delivery so when i am running the method i am getting an error in the javascript which is there in script tag.

 

Ramaswami_0-1593527816685.png

 

this is the script tag: 

 

Ramaswami_1-1593527974932.png

 

Error i am getting : 

 

Ramaswami_2-1593528027162.png

 

Can't we add a javascript in the script tag while creating a campaign through API method. The same javascript is added to workflow when we normally create a campaign manually.

Note: if i remove this javascript i can able to create a campaign without any issues. 

 

 

 

Avatar

Level 9
That is one way to do it I suppose. If all you are doing is duplicating an existing Campaign and all its assets you might be better off looking for a Duplicate object API instead. I'm unsure of what your use case is here so its hard to tell what you are trying to achieve by creating a Campaign purely from API