Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Current »

ith our API you can interact through various channels so that your contact center is always connected.

Remember that to use the API you need

  1. Authenticate and get a token for the session

  2. Use the token in the Header Authorization

  3. End session

See more here…



SMS

Within this category we can perform the following actions

 Send SMS

Relative URL: Integra/resources/SMS/SendSMS
Method: POST
content-type:application/x-www-form-urlencoded; charset=UTF-8
Params: destination (Number of the sms destination)
        message     (Text message)
        campaign    (Outbound campaign)
        agent       (Sender Agent)
        source      (Callerid or Port Number)
Result: TEXT  OK
              ERROR
Relative URL: Integra/resources/SMS/SendSMSv2
Method: POST
content-type:application/x-www-form-urlencoded; charset=UTF-8
Params: destination (Number of the sms destination)
        message     (Text message)
        campaign    (Outbound campaign)
        agent       (Sender Agent)
        source      (Callerid or Port Number)
Result: TEXT(json)  {
                      id:"{smsId}"
                    }

via Proxy


<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/porthole/1.0.0/porthole.js"></script>
<script type="text/javascript">
 
   function SMS () {
       var windowProxy;
       windowProxy = new Porthole.WindowProxy(window.location.protocol + window.location.hostname);
       windowProxy.post({'action': 'sms', 'campaign' : '<CAMPAIGN>', 'message' : '<MESSAGE>', 'destination' : '<NUMBER>'});
   }
 
</script>
 Recive SMS

Relative URL: Integra/resources/InboundSMS/ReceiveURLSMS
Method: GET
content-type:application/x-www-form-urlencoded; charset=UTF-8
Params: phone 		(Número origen del sms)
        message     (Mensaje de texto)
Result: TEXTO  OK
              ERROR
 Schedule SMS

The dialer of SMS is for  scheduler SMS and the dialer will execute in the right moment, for this type exist a Web service REST schedule that allows them. And it is possible from Froms, Workflows or from external systems.

Basically the process is that there is a table where are the calls that are scheduled with all pertinent information.

sms_scheduler:

calldate

campaign

phone destiny

data

date and time when you have to run

test1

098344484

The message

The scheduler be placing on the sms_spool with priority 1 to the messages that have to run in that minute, which will make the dialer take it as soon as possible to send the message, is named based Schedule and Date to see which they are the sms that were scheduled and when they should be performed in order to compare with the sms_repo dateprocessed.

Post

Relative URL: Integra/resources/SMS/ScheduleDialerSMS
Method: POST
content-type:application/x-www-form-urlencoded; charset=UTF-8
Params:  sms   (JSON Object)
Result:  1

Json Object

{
  "calldate" : "2015-10-11 15:00:00",        // Sms date
  "campaign" : "Ventas->",                   // Sms dialer campaign
  "destination" : "098344484",               // Sms destination
  "data" :  "Message"                        // Sms text message
}
 Upload SMS Base

Relative URL: Integra/resources/SMS/uploadbase
Method: POST
content-type:application/x-www-form-urlencoded; charset=UTF-8
Params:  filename         (Name of the file)
         fileb64          (base64 content of the file)
         campaign         (Name of the campaign)
         
Result: 1 (Async Method)

File format

somecampaign;098344484;Hello World!;9999
campaign;number;text;priority

The dialer has to be Enable and On Date To process Schedule SMS if not this will be the first to go out when the Dialer starts again.



Email

For email we can load the dialers bases

 Upload Email Base

https://domain.ucontactcloud.com/IntegraChannels/resources/DialersResources/uploadDialerBase
Method: POST
content-type:application/x-www-form-urlencoded; charset=UTF-8
Parameters: filename         (File name)
            fileb64          (Csv file content in base 64)
            channel		     'email' (this value will always be the same)
            user			  username
         
Result: 1 (Async Method)

File format

CampName;ejemplo@gmail.com;This is an example mail body;;"Var1":"value","Var2":"value";9999

 Send an email

Relative URL: IntegraChannels/resources/Forms/sendEmail
Method: POST
content-type:application/json

Request

{
    "campaign": "Email",
    "to": "adress@ucontactcloud.com",
    "subject": "Subject",
    "body": "This is an email body can be HTML",
    "attachments": [
        "020212/file1.jpp", 
        "020212/file2.jpg"
    ],
    "schedule": {
        "title": "Date title",
        "organizer": "Myself",
        "from": "2018-08-24 00:00:00",
        "to": "2018-08-24 01:00:00"
    }
    "template": "templateName",
    "variables": {
        "var1":"value",
        "var2":"value2"
    }
}

Template, schedule and variables fields are optionally.

The variables in the template will be replaced before sending the email. Template only will be sent if the body is not specified.

Attachments are optional. Attachments will be a list of strings, each string represents the file location in the uContact server.

Response

200 successfully

{
  "guid":"23e5a082-adeb-4e51-9e39-9e8efee7aacc"
}

400 Wrong parameters

500 Server error


Postman collection with example calls to Send SMS

  • No labels