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
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES |
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
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
Description¶
Node Name | Description | Default Value | Data Type | Mandatory |
[call/sms/email]Flow | The Flow you want to create. | STRING | YES | |
[call/sms/email]Flow > name | The identifier of the original Flow. | STRING | YES | |
[call/sms/email]Flow > newName | The new Name for this Flow | STRING | NO | |
[call/sms/email]Flow > notes | Notes for your Flow. | STRING | NO |
Result¶
Error Result¶
HTTP Code | Error String | Resolution | ||
400 | API Version Empty | Add a value for the v parameter in the query string | ||
400 | API Version Invalid | Correct v parameter | ||
400 | Request Method must be PUT. x attempted | Switch request method x to PUT | ||
400 | XML Empty | Add xml to the request body | ||
400 | XML parse error. x at line y, column z | Correct XML at point x on line y, column z | ||
400 | Request Empty | Add one Call Flow to the request | ||
400 | There are no Rules in this Template | Add at least one Call Flow Rule to the Call Flow | ||
400 | CallFlow Name does not exist | Change the name of the Call Flow | ||
400 | New CallFlow Name already exists | Change the new Call Flow name | ||
400 | New CallFlow Name too long | Shorten the name of the Call Flow | ||
500 | Internal Server Error | Retry later |