Suggested code for runActionSequence

Jan 3, 2012 at 11:26 PM

According to the current API (not sure what the version is because I can't find it anywhere in the documentation), the signature of the method is runActionSequence(string key, int contactId, int actionSetId). So I updated my local version of the ISDN code and it seems to work.

 

//InfusionSoftApiInterfaces

[XmlRpcMethod("ContactService.runActionSequence")]

XmlRpcStruct[] runActionSequence(string key, int contactId, int actionSetId);

 

//isdnAPI.cs

        public static XmlRpcStruct[] runActionSequence(int contactId, int actionSetId)
        {
            XmlRpcStruct[] ret_value = null;
            _LastException = null;

            try
            {
                InfusionSoftApiInterfaces api = XmlRpcProxyGen.Create<InfusionSoftApiInterfaces>();
                api.Url = _ApiURL;
                ret_value = api.runActionSequence(_ApiKey, contactId, actionSetId);
            }
            catch (Exception ex)
            {
                _LastException = ex;
            }
            return ret_value;
        }

 

Each XmlRpcStruct in the array has 3 keys:

- ret_value[0]["Action"]

- ret_value[0]["Message"]

- ret_value[0]["IsError"]

 

Hope this helps someone.

Nov 29, 2012 at 3:27 PM

Perfect!  Just what I was looking for. Thanks.

Feb 27, 2013 at 10:00 PM
I just recompiled the source to include that method. Thank you nthpixel.

mjg, can you include this into the main code so we don't have to keep adding it each time we get latest source code? Ill see about uploading a patch, but it's all there and would help a lot of us that run action sets in the future. It works perfectly as written.