createFlow

Request Method: POST

Description: Creates a Call/SMS/Email Flow according to the set of Call/SMS/Email Flow Rules.

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

The following parameters can be sent in the querystring

Parameter Description Default Value Data Type Mandatory
v API version to use INTEGER YES

Request Example

Payload Call Flow

<?xml version="1.0" encoding="utf-8"?>
<request>
    <callFlow name="Call Agent" 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" />
    </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" notes="Will forward the SMS to the agent.">
        <sendSms id="1" label="Send SMS" from="$_smsOrigin" smsTemplateName="Default SMS Forward" destinationContactId="?" destinationPhoneNumber="?" />
    </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 title you want to use for your Flow. This must be unique throughout your whole account.
STRINGYES
[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 POST. x attemptedSwitch request method x to POST
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 already existsChange the name of the Call Flow
400CallFlow Name EmptyAdd name field for CallFlow
400CallFlow Name too longShorten the name of the Call Flow
400Rule Label EmptyAdd name for Rule label
400Rule ID EmptyAdd id for Rule
400Message emptyAdd message for Rule
400destinationPhoneNumber EmptyAdd phone number for destinationPhoneNumber
400destinationContactId EmptyAdd id for destinationContactId
400destinationContactName EmptyAdd name for destinationContactName
400Contact cannot have Variable and Fix details at the same timeSet all details to either fixed or variable
400Destination Contact does not existFix destinationContactId
400You need to select a ContactAdd destinationContactId
400destinationContactName and destinationContactId are not allowed together in CallRemove either destinationContactName or destinationContactId
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 201 Created