in the above code i want to handle if there is any error dure csv file does not have write format or any erros records not found in .csv file etcc. How to handle this.
Thanks for your reply. 1. IF .csv file has 5 numbers to schedule, out of 5 numbers 2 numbers are incorrot format. How to handle this. 2. What message do you return if there are no errors returned. 3. Also is it good idea to check only sucess message and in else part handle logic for error prcoessing. do you reccomond this. ex: if check "results" variable for sucess else // logic for handling errors etcc
1) We will automatically scrub out most bad numbers from your CSV file. You will not receive any immediate response when numbers are scrubbed. We simply will not attempt to call that user.
2) We return back "X Voice Broadcast(s) scheduled. Broadcast ID: XX" Where X is the number of calls we will be calling and XX is the broadcast ID associated with the broadcast.
3) Yes I would recommend to check for the success message. If you dont receive the success message, assume the broadcast has not been scheduled.
"1) We will automatically scrub out most bad numbers from your CSV file. You will not receive any immediate response when numbers are scrubbed. We simply will not attempt to call that user."
in .csv file, 2 out of 5 numbers are not in correct format. as per my understanding from you reply above case(2 out of 5 numbers are not in correct format), i still receive sucess message saying "5 Voice Broadcast(s) scheduled. Broadcast ID: XX".
actaully, 3 broadcasts only schduled right. Do you log anywhere 2 incrrect format numbers. Please help,
Currently there is no log you can access by the API to give you the incorrect format numbers. We will show you in the broadcast report which calls did go through however.
Thanks a lot for the help!. One last question, How to check the sucess message as success message is "X Voice Broadcast(s) scheduled. Broadcast ID: XX". here "X, XX" will change evry time. if i want to compare ,
if result = '"X Voice Broadcast(s) scheduled. Broadcast ID: XX". " like this. { // sucess logic }
how can i make above condition equal. so that control goes to success logic. Please help.
I am not sure I understand your question. If you are checking if any error, then you can check if string contains 'Voice Broadcast(s) scheduled' . If you see that, then there was no error in scheduling the broadcast.