Duplicate and edit a code studio event actions


one of our Netcall project team created a code studio event action for our build. The original event action was based on inbound email, and I need to replicate this for inbound SMS. Can anyone advise on the best course of action please? I know it is possible to duplicate an event action, but is it advisable? How can I swap out the references to email and replace them with ones relevant to SMS instead?

I see that Adam Mills did a webinar on event actions so I will watch that to get me up to speed on basic background and functionality, but any advice specific to this scenario would be appreciated.

Thanks in advance,

Morning Jane,

I wouldn’t hesitate to duplicate an event action as long as you understand what each part of it is doing.

As you suggested, you will need to create a new reference to the sms object and individual references for the field paths as well as any subsets etc.

You can learn a lot from just making an attempt.

Be sure to make good use of the detective and log out values along the way using cs log.
cs.log('Value: ’ + value);

I look forward to hearing of your success.

Hi Adam,

thanks for the prompt reply. I have no experience of code studio so unfortunately do not currently understand what each part is doing. Will I get that understanding from watching your webinar? If not, can you point me in the direction of resources that might help please?


Afternoon Jane,

I would definitely recommend you watch the webinar and take the Code Studio course on eLearning.

My webinar focuses on what Event Actions are and how to fire them and will hopefully give some confidence to proceed.

The best approach I can offer is for you to outline each activity the event action needs to perform in English as comments first ( // Get Record ID //Fetch Record //If a = b then //Send SMS etc. ) we call this pseudocode. You may benefit from attempting to annotate the existing action where necessary first.

Add an event to fire your rule that will run your event action and put it somewhere so you can test it on the fly.

Open the detective windows and activate logging.

Start with your first action, use your existing action as reference and refer to our docs.

Log out to cs.log() for everything you do.

Move on to the next action when you have the first action working.

Even the most seasoned developers will find themselves referring to google for the simplest of things, so don’ be afraid to take the time to experiment.

Event Actions are self contained and you are developing within the build environment, it’s very difficult to break anything so get stuck in.

If you find yourself stuck on anything for more than 45 minutes, feel free to come back here for assistance.

1 Like