Adobe Launch API - Custom Code Action Config

ethang12121749

22-10-2019

We upgraded automatically from Adobe DTM to Adobe Launch, and we have a rule which has a THEN action (action type is Set Variables) that only runs a bunch of our custom code (at the bottom of the action configuration page you click </> Open Editor to edit our custom code which controls our events' handling. Is it possible with the Launch API to update this custom code on the rule action? I can't really tell from the API docs if it's possible or not - Adobe Experience Platform Launch . The custom code is fairly lengthy, at 957 lines of code, which is a lot to send over the API every time we update.

Accepted Solutions (1)

Accepted Solutions (1)

thebenrobb

Employee

23-10-2019

If you can do it through the UI, then you can do it through the API.  The only thing the UI does is call the API on your behalf.  I'm assuming that you've already done this through the UI, so that means the API can handle it.

Extensions can provide different functionality to Launch.  This functionality usually comes in the form of data elements and rule components (rule components can be events, conditions, or actions).  On the Launch team, we refer to data elements and rule components as delegates.  The extension developer defines a schema for each delegate that the extension provides.  When a Launch user saves that delegate, Launch attempts to validate the user-provided settings against the developer-provided schema.

When I said schema, I was referring to this developer-provided schema.  But at the moment, I'm not aware of how you as a user would go about looking at that schema, so my suggestion is for you to perform the action you are interested in through the UI.  But as you do this, you can open the developer tools for your browser (Chrome is most common), go to the network tab, and inspect the XHR request that the UI makes when you hit "Save".  Assuming that you don't get a validation error when you save, then that XHR request will be a valid API call that passes the developer-provided schema for that delegate.

Then you'll know exactly what the API call should look like for you to make it directly against the API.

That all make sense?

Answers (2)

Answers (2)

thebenrobb

Employee

22-10-2019

You can update it through the API, but your PATCH call would need to pass validation against the same schema that happens when you update it through the UI.  The simplest way to see the appropriate format would be to use your developer tools, and examine the XHR request when you save the rule in the UI.

ethang12121749

22-10-2019

I'm not sure which call in the UI you're talking about, I didn't see anything that quite looked like what you're describing. Do you mean schema in terms of the attributes at the top of the https://developer.adobelaunch.com/api/reference/1.0/rule_components/update/#​ page? I assume the custom code would go in the settings JSON string. is there reference on that schema? also, turns out that one of our properties has custom code reaching 2500 lines of code. is that not too much for the API to handle?