updateFlow

Request Method: PUT

Description: Updates a Call/SMS/Email Flow

URL: https://api.iovox.com:444/Flow?v=3&method=updateFlow

The following parameters can be sent in the querystring

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use
INTEGERYES

After updating a Flow, we apply this new Flow to all the links which had the previous version. We match the Variable Values on the Rule ID.

For example: If you have a Call Flow with two Call Rules, and update it to a Call Flow with three Call Rules, we will be able to only match 2 of the Call Rules of the previous version to the new version.

Or the other way around from three Call Rules to two Call Rules: We decide which Call Rules to match according to the Rule ID.

Request Example

Payload Call Flow

<?xml version="1.0" encoding="utf-8"?>
<request>
    <callFlow name="Call Agent" newName="Call Agent + Whisper Called" notes="Will Call the agent, can be used for every agent in my account.">
        <call id="call_1" label="Call" destinationPhoneNumber="?" destinationContactId="?" record="true" sendCallAlert="NONE">
            <calledMessage>
                <soundFile soundLabel="Lead brought by IOVOX"/>
            </calledMessage>
        </call>
    </callFlow>
</request>

Please refer to the Callflow XML documentation  for the details.

Payload SMS Flow

<?xml version="1.0" encoding="utf-8"?>
<request>
    <smsFlow name="SMS Agent" newName="SMS Agent + HTTP Request notes="Will forward the SMS to the agent, information will also be posted to our API.">
        <sendSms id="1" label="Send SMS" from="$_smsOrigin" smsTemplateName="Default SMS Forward" destinationContactId="?" destinationPhoneNumber="?" />
        <httpRequest id="2" label="HTTP Request" url="https://example.com" requestMethod="POST">
            <params>
                <param name="origin" value="$_smsOrigin" />
                <param name="destination" value="$_smsDestination" />
                <param name="content" value="$_smsMessage" />
            </params>
        </httpRequest>
    </smsFlow>
</request>

Please refer to the SMS Flow XML documentation for the details.

Description

Node NameDescriptionDefault ValueData TypeMandatory
[call/sms/email]FlowThe Flow you want to create.
STRINGYES
[call/sms/email]Flow > nameThe identifier of the original Flow.
STRINGYES
[call/sms/email]Flow > newNameThe new Name for this Flow
STRINGNO
[call/sms/email]Flow > notesNotes for your Flow.
STRINGNO

Result

Error Result

HTTP CodeError StringResolution
400API Version EmptyAdd a value for the v parameter in the query string
400API Version InvalidCorrect v parameter
400Request Method must be PUT. x attemptedSwitch request method x to PUT
400XML EmptyAdd xml to the request body
400XML parse error. x at line y, column zCorrect XML at point x on line y, column z
400Request EmptyAdd one Call Flow to the request
400There are no Rules in this TemplateAdd at least one Call Flow Rule to the Call Flow
400CallFlow Name does not existChange the name of the Call Flow
400New CallFlow Name already existsChange the new Call Flow name
400New CallFlow Name too longShorten the name of the Call Flow
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 204 No Content