Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Adobe Launch API - Create Rule and Rule Component

Avatar

Level 1

Hi I am trying to create Adobe Launch rules using Reactor API + Python Script, I am able to create the RULE but unable to create the component, the Sample API request available in the documentation is not so helping, I am need help on the sample API request for different Rule component request. Any Help is appreciated.

3 Replies

Avatar

Level 3

Hi @GaneshSi 

You can create Rule components using the Adobe Launch API. Could you please elaborate on where you need help? Because, I have followed the same documentation to complete the integration.

Avatar

Level 1

Thanks for replying :Elanchezhiyan )

 

What I am trying to accomplish is create Adobe Rules with all its component, end to end how we do it from Adobe Launch, I know it is possible via Reactor API, but while creating via python script, I am getting following error, I belive the constructed API does not follows proper JSON Key:values as define by adobe, any pointer to the exact components Key value pair to construct a proper request would help, if this is still not clear, I try explaining better.
https://experienceleague.adobe.com/en/docs/experience-platform/tags/api/endpoints/rule-components

Condition creation error: 409 {"errors":[{"id":"","code":"invalid-settings","title":"Invalid settings","detail":"The property 'leftOperand' of type string did not match any of the required schemas","meta":{"request_id":""},"source":{"pointer":"/data/attributes/settings"}},{"id":"","code":"invalid-settings","title":"Invalid settings","detail":"The property 'comparison/operator' of type string did not match any of the required schemas","meta":{"request_id":""},"source":{"pointer":"/data/attributes/settings"}},{"id":"","code":"invalid-settings","title":"Invalid settings","detail":"The property 'rightOperand' of type string did not match any of the required schemas","meta":{"request_id":""},"source":{"pointer":"/data/attributes/settings"}}]}

Avatar

Level 3

Hi @GaneshSi,

I think the error is related to the component settings. Please correct me if I'm wrong.

For every event and condition related to an extension, there is a delegate descriptor id (mandatory) and settings(if required) when you intend to create an rule component for any rules.

For example, if you need to create a page load Event using window loaded and specify the domain in the condition, the settings would look like this, 

Event:

{

   "delegate_descriptor_id": "core::events::library-loaded"
}
Condition: 
"attributes": {
            "delegate_descriptor_id": "core::conditions::domain",
            "name": "domain",
            "settings": "{\"domains\":[\"demo.test.com\"]}"
}
so the best way to accomplish this would be first, create all the components in the Launch UI, then use postman to retrieve all the events and conditions settings. After that, you will be able to complete the setup.
I hope it helps, let me know if you need further assistance or sample python code to do this.
 
Good luck.