Delivery API and global mbox | Community
Skip to main content
Level 3
December 14, 2023
Solved

Delivery API and global mbox

  • December 14, 2023
  • 1 reply
  • 4452 views

Hello!

I need to implement the Delivery API using global mbox.

It seems that is not possible since I am receiving this error message as a response:

"status": 400, "message": "Errors: field - [execute.mboxes] - global mbox is not allowed in mboxes.;"

I found that another user fixed this by using "['execute']['pageLoad']" instead of "['execute']['mboxes']", however I don't understand how to implement this change since the API docs are not very clear.

In short, I need to get all the activities that are using the global mbox.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by PedroFi

Hello again @rajneesh_gautam_:

"evaluateAsTrueAudienceIds" under qaMode works for me when I test with a local mbox. However, global mbox is still not working on the QA mode. What am I possibly missing?

 

Could you also explain the meaning of these parameters? What do "a=1" and "b=2" represent exactly?

"execute": { "pageLoad" : { "parameters": { "a": 1, "b": 2 } }

We finally found a solution to this issue. 

The following element was missing from the request:

$data['context']['address']['url'] = [URL]

Thank you @rajneesh_gautam_ for your support, kind attention, and professionalism.

1 reply

PedroFiAuthor
Level 3
December 14, 2023

I have also tried to use "__view__" as the mbox name (since the global mbox is the "__view__" scope according to this docs) but it did not work.

Rajneesh_Gautam_
Community Advisor
Community Advisor
December 14, 2023

hi @pedrofi  - you are right, the documentation requires updates.

 

In the meantime, here's how you can use global-mbox. You need not mention the name of the mbox. Hope it helps

"execute": { "pageLoad" : { "parameters": { "a": 1, "b": 2 } } }

 

Rajneesh_Gautam_
Community Advisor
Community Advisor
December 14, 2023

The request body is the same that I shared in my previous comment: https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/delivery-api-and-global-mbox/m-p/639414/highlight/true#M9937

 

And this is the response, as you can see "pageLoad" is empty:

Array ( [status] => 200 [requestId] => ID [client] => CLIENT [id] => Array ( [tntId] => TNT_ID ) [edgeHost] => HOST [telemetryServerToken] => TOKEN [execute] => Array ( [pageLoad] => Array ( ) ) )

 


Hello @pedrofi  - used an online tool to convert JSON object for the request-body, that works for me, into a PHP array and here's the result. Please check 

 

array(
"context" => array(
"channel" => "web"
),
"id" => array(
"tntId" => "-------"
),
"experienceCloud" => array(
"analytics" => array(
"logging" => "client_side"
)
),
"execute" => array(
"pageLoad" => array(
"parameters" => array(
"a" => 1,
"b" => 2
)
)
)
);