Which API does provide us the order of the "Smart Campaign"?

Anonymous
Not applicable

Hi Guys,

I have a question about Marketo API.

As you can know, There are the "Program" in the "Assets".

Which API does provide us the order of the "Smart Campaign"?

Could you tell me your thought?

Kind Regards,

10 REPLIES 10
Anonymous
Not applicable

Thanks!

Certainly, it 's a little inconvenient.

I guess I like PLanB.

But it is not a perfect solution.

I think to try to analyze the source...

Anonymous
Not applicable

Hi Hiroaki

You can get the order of SC via Get Folder Contents » Marketo Developers

For example

I created Z,M,A and Y SC.

Screen Shot 2016-02-01 at 14.21.26.png

The order in Assets tab as you want is below.

It seems this order is the order of SC ID's.

Screen Shot 2016-02-01 at 14.21.46.png

Now I got SC's under this PG via Get Folder Contents » Marketo Developers .

REQUEST

999-XXX-999.mktorest.com/rest/asset/v1/folder/1234/content.json?type=Program&access_token=xxxxxxxxxxxxxx

RESPONSE

{"success":true,"warnings":[],"errors":[],"requestId":"afd9#1529b455e95","result":[

{"type":"Smart Campaign","id":2074}, <====Z SC

{"type":"Smart Campaign","id":2075}, <====M SC

{"type":"Smart Campaign","id":2076}, <====A SC

{"type":"Smart Campaign","id":2077}  <====Y SC

]}

Good luck

Anonymous
Not applicable

Hi. Masaki.

Thanks for the answer.

"SC ID" is huh creation order of the SC.

When sorted by drag-and-drop, "SC ID" will change?

Anonymous
Not applicable

It's a good question!

SC ID is assigned when SC is created.

You can see at Marketo SC URL.

For example, "SC Z" is app-xx99.marketo.com/#SC2074A1

Also, I tried to call Get Folder Contents » Marketo Developers  after Drag&Drop operation.

It was still the order of ID's.

Unfortunately, we can not get the order of visual.

Anonymous
Not applicable

For now, it seems there is no way.

Unfortunately. consider the other way.

Thank you for a good answer.

Anonymous
Not applicable

If you never give up, i have better plans.

Plan A

- You make SC name convention for visual order.

  For Example, SC1,SC2,SC3

- So you need SC names, you make a call Get Multiple Campaigns » Marketo Developers after Get Folder Contents » Marketo Developers

- You sort SC by names in your code.

done.

Plan B

- You set visual SC order into my token.

  For Example  text token my.order = 2076,2075,2077,2074

- You make call Get Tokens by Folder Id » Marketo Developers

- You sort SC by my.order in your code.

done.

Of course these are a little inconvenience.

Anonymous
Not applicable

oh sorry.

The wrong reply.

Thanks!

Certainly, it 's a little inconvenient.

I guess I like PLanB.

But it is not a perfect solution.

I think to try to analyze the source...

Grégoire_Miche2
Level 10

Hi Hiroaki,

What do you mean by the "order" of smart campaigns ?

-Greg

Anonymous
Not applicable

Hi Greg.

The "Order", is that of " sequence " .

In asset of smart campaign , I want to get the API to " sequence " .

20160201.jpg

Grégoire_Miche2
Level 10

Hi Hiroaki,

I do not think this information can be retrieved.

-Greg