Add an RCS API

Lemnisk provides the convenience of adding an RCS vendor on your own on the platform itself. This will help marketers configure the External API-led RCS vendor just by providing the authorization keys and mapping the essential fields of the vendor API to Lemnisk external API.

Pre-requisites

  • The vendor's API that works with:

    • HTTP POST Method

    • JSON payload.

  • The authentication mechanism is a static key and not a refresh key.

Configuration procedures

  • To set up an RCS vendor, it is mandatory to map two configuration values: “To” and “Template ID”. These two fields are variable at the engagement level.

  • Ensure you assign the authorisation keys, senderID (if present), sender number and other essential global constants in the respective places in the API. Usually, these are configured in the URL parameters or header parameters.

  • To configure a field at an engagement level, enter the variable name in curly braces {{variable_name}}, later you can also provide an alias as the display name as well.

  • A default value is not mandatory, but recommended when the value does not change frequently. This value will be displayed again those parameters when creating engagements. You can also assign a Macro value to fields by type.

  • RCS APIs also work with optional section of personalization parameters. These are also configurable on Lemnisk as engagement level key:value pairs setting that will be discussed below.

Setup new RCS client

Step 1: Go to > Campaigns > Channels > RCS

Step 2: Click on the Edit icon

Configure your RCS client

Step 1: Basic details

Name of configuration: The name you entered in the previous step will be displayed here

Description: Add a description for your new RCS client.

Step 2: API Details

You can set up the Vendor API in the same way as you set up an External API with a global payload.

HTTP Method: Select the HTTP method as POST

API URL: Provide the API URL.

Also, You can simply import the cURL of the API and skip to the next step! Let's understand how "Detect from cURL" works.

Clicking the +detect from URL button will pop up the following window.

Once you enter the curl, it will automatically fetch the Headers and Payload from the API and populate in the relevant fields and the tree view will occur based on the values in the payload.

Now, select the RCS Configuration value and map the mandatory values TO* and "Template ID*with this sample API

Custom Field: You can add custom values to the Configuration by assigning variables and mapping it to the Curl.

In this example, the user expects the Recipient ID also to be passed in the API request. This shall be a mandatory field, configured with the 'Custom Field' mapping.

Define Key for Personalisation Parameters

Engagement level key: Value configuration allows you to configure the relevant key with the capability to consume "variable name": "variable value" at engagement level.

  • Click on the edit icon against the appropriate key that has an object type value.

  • In the popup, define the display name, and mandatory/optional setting. Defining it mandatory will make adding atleast 1 key:value pair in the engagement mandatory.

  • When assigning it to be optional (since some RCS template would not have any personalisation), select "Pass Empty" as the drop index. This ensures the personalisation key is not passed when there are no personalisatin key:values added.

Test API

  • Navigate to > Test API

  • Assign values to the payload and click "test"

  • If engagement level key:value pairs are assigne to any key of the payload, you can add Parameters using the "+ Add Params" button as well.

  • You will receive the confirmation as shown below once your API is validated

This is the same functionality we implemented in External API. Click here to know in detail.

Response and Webhooks

The response and Webhooks screen is where you will map the relevant path of the response body to the internal MessageID identifier which supports Lemnisk to identify every message trigger and map its delivery report.

  • Navigate to > Response and Webhooks

  • Enter values to the payload and Click " Test Configuration"

  • You will receive the confirmation once your API is validated.

  • Select the mapping value to map the Unique message ID.

Last updated