MMP SMS Interface

MMP SMS Interface

This page explains an SMS Integration Interface when integrating your mobile operator with the Dengage MMP Engine.

using System;
using System.Collections.Generic;

namespace MMP.MTA.SmsInterface
{
public interface ISmsMessage
{
// SecretKey is a key. Login function must check it and set it as logged in if the secret is ok.
// Returns: "OK" - logged in, "NOK": wrong secret and no other functions can be called.
// NOTICE: You can return "OK" for onpremise environments that connect to the mobile operator directly.
string Login(string secretKey);

// Send (Request)
//{
// "messages":
// [
// {
// "mobileNumber":"905332141354", REQUIRED
// "text":"message to send", REQUIRED
// "sender": "sender_name", OPTIONAL
// "startTime": "datetime", OPTIONAL
// "expireTime":"datetime" OPTIONAL
// "priority": "yes/no" OPTIONAL
// "smsType": string OPTIONAL -> Is used to understand the type of the sending: // default:BULK, OTP, TCKN, TAXNO
// "smsOperator: string OPTIONAL -> The sublayer may fill this field in order to understand which operator we have relayed the message.
// },
// {
// "mobileNumber":"905330000000", -- mobile number
// "text":"message to send" -- text to send.
// },
// {
// "mobileNumber":"905330000000",
// "text":"message to send"
// },
// {
// "mobileNumber":"905330000000",
// "text":"message to send"
// }
// ]
//}
// Send Response
//{
// "results":
// [
// {
// "partnerMessageId":"message_id", -- message id assigned by sms provider
// "partnerStatus":"status coming from partner", -- partner status of message
// "partnerDetail":"detail coming from partner", -- partner detail of message
// "apiStatus":"status mta core expects" OK, FAIL -- OK: we have delivered and we will wait for the report, FAIL: This is a final state for this item. No need to wait for the report, output the item.
// },
// {
// "partnerMessageId":"message_id",
// "partnerStatus":"status coming from partner",
// "partnerDetail":"detail coming from partner",
// "apiStatus":"status mta core expects", OK, FAIL
// },
// {
// "partnerMessageId":"message_id",
// "partnerStatus":"status coming from partner",
// "partnerDetail":"detail coming from partner",
// "apiStatus":"status mta core expects"
// }
// ]
//}
string Send(string request);

//
// Report Request:
// {"messages":["message_id_1", "message_id_2", ...]}
//
// Report Response:
//{
// "results":
// [
// {
// "partnerStatus":"status coming from partner",
// "partnerDetail":"detail coming from partner",
// "sendAt":"time to send",
// "apiStatus":"status mta core expects" -- Final States: DELIVERED, FAIL, TIMEOUT Other State: WAITING
// },
// {
// "partnerStatus":"status coming from partner",
// "partnerDetail":"detail coming from partner",
// "sendAt":"time to send",
// "apiStatus":"status mta core expects", OK, FAIL
// }
// ]
//}
//
//
//
//
string Report(string request);

// Destroy object
void Destroy();
}

// This class is used to pass the send request from mmp core to dll
public class SmsSendRequest
{
public IList<SmsMessage> messages { get; set; }
public class SmsMessage
{
public string mobileNumber { get; set; }
public string text { get; set; }
public string sender { get; set; }
public string startTime { get; set; } // yyyyMMddHHmm
public string expireTime { get; set; } // yyyyMMddHHmm
/// <summary>
/// Format: $"BULK|{accId}-{sendId}-{contactId}-{msgId}"
/// BULK, OTP, TCKN, TAXNO
/// </summary>
public string smsType { get; set; } // BULK, OTP, TCKN, TAXNO
public string brandCode { get; set; }
public string recipientType { get; set; }
public string messageType { get; set; }
// The accountId value is used to identify the sending account in environments with multiple accounts.
public int accountId { get; set; } = 0;
// senderId is used to identify sender definitions that have the same sender name but belong to different mobile operators.
public int senderId { get; set; } = 0;
}
}

public class SmsReportRequest
{
public string partnerPacketId { get; set; } = string.Empty;
public IList<string> messages { get; set; } = new List<string>();
}


// This class is used to pass the response to a send request from dll to mmp core
public class SmsResponse
{
public string partnerPacketId { get; set; } = string.Empty;
public IList<ReportResponse> results { get; set; } = new List<ReportResponse>();

public class ReportResponse
{
public string partnerMessageId { get; set; } = string.Empty;
public string partnerStatus { get; set; } = string.Empty;
public string partnerDetail { get; set; } = string.Empty;
public string apiStatus { get; set; } = string.Empty;
public string sendAt { get; set; } = ""; // yyyyMMddHHmm
public string smsOperator { get; set; } = "";
public int smsMessageCount { get; set; }
}
}
}

Please download the interface dll from here: https://xfer.dengage.com/mmp/mmp.abstract.zip

    • Related Articles

    • MMP Core

      Multi-Channel Messaging Platform MMP Core is purely designed to relay high volume messages and report results back in a high-scale manner. Clients' applications that will be integrated with MMP Core must prepare their own messages in their final ...
    • Overview

      D·engage Multi-Channel Messaging Platform (MMP) is one of the most powerful features of D·engage CDMP which is a built-in, integrated module but can also be deployed standalone. It offers central management for your digital engagement level with your ...
    • Configuration

      Configuring MMP Enterprise Configuring MMP Enterprise introduces several variables like From Address, Reply Addresses, LDAP Integration(optional), RabbitMQ Configuration, Send Pools, Users, Accounts, and lots of permissions. In the initial phase of ...
    • CXDP in a Nutshell

      The D·engage CXDP API provides programmatic access to D·engage Platform, providing the required tools to exploit and trigger system functionality remotely, enabling our customers to integrate their IT applications swiftly. API aims to provide you ...
    • Integration Methods

      MMP Core is an enterprise-grade Message Transfer Agent (MTA) for sending high-volume and mission critical messages. The platform provides unsurpassed reliability in message delivery in a stable SMTP environment with granular connection controls like ...