There are 5 parts to WhatsApp in engAIge

  1. Adding an external source
  2. Adding a WhatsApp configuration
  3. Create a WhatsApp template
  4. Set up an Automation
  5. Testing an Automation using Postman



Adding an external source

 

Login to your engAIge account

Click Settings

Click Data Sources > View All

A screenshot of a computer

Description automatically generated

Click Add External Source

 

Complete the name and description fields

  • No spaces allowed

Click Save


Add a WhatsApp configuration

 

Login to your engAIge account


Click Settings


Click WhatsApp


Complete fields


1
Name 
choose a name for the config
2
AppId 
Can be found on the meta development portal
3
Token 
permanent Meta access token
4
AccountId 
WhatsApp Business Account ID also referred to as WABA
5
PhoneId 
WhatsApp Number ID


A screenshot of a computer

Description automatically generated


Example

A screenshot of a whatsapp configuration

Description automatically generated

Click Add Configuration





Create a WhatsApp template

 

Click Channels

Click WhatsApp


Click Create

 


Complete the fields as set out in the image below


1: Name 

No Capitals or spaces allowed. Use underscores

2: Tag

Categorise templates using the Tag

3: Configuration

Dropdown, select configuration set up in settings

4: Header Type

Dropdown, select TEXT or IMAGE

5: Text

WhatsApp header for the message. This is not used when selecting IMAGE type

6: Body

WhatsApp message. You may copy and paste emojis or choose an emoji from a list by clicking the windows key and full stop buttons on the keyboard. Rich text can be added by using * for bold or – for italics

7: Add Variable (Header)

Adding a variable will add {{1}} in the space where the variable value will populate. The template will ask for a sample of the variable. The variable path will be added in the automation later. The header allows for 1 variable

8: Add Variable (Body)

Adding a variable will add {{1}} in the space where the variable value will populate. More than one (with no end limit) can be added to the body. The 2nd variable will be labelled {{2}} and so on. The template will ask for a sample of the variable. The variable path will be added in the automation later.

 

Click Save


By clicking save the template will be sent via the Meta Cloud API to Meta for approval. Once Meta approves this template, it can be used in an automation



Set up an automation


Click on Automator in the top menu

Click on Add Workflow

A close-up of a sign 
Description automatically generated

Create a name for the workflow

Click Save

Workflow/Automation will open on saving



Adding  your Trigger


Click Add Trigger

Click Details

 

A screenshot of a computer 
Description automatically generated

 

A screenshot of a computer 
Description automatically generated


Complete the details for the trigger

Name of Trigger: No spaces allowed

Source Type: External Source

Triggers: External Event Received

Source: Choose the source created earlier


Click Add


 

Clicking add on the trigger will close the details and allow you to add the leading action



Adding  your Action


Choose the Send WhatsApp Action from the Action list shown on the left

Drag and drop this action into the automation being created



Click on the Send WhatsApp Action

Click Details

 

Complete the Action details


Name: One word name

Count this action: No longer using this form of reporting (will be removed from begininning of April 2024)

WhatsApp Configuration: Choose the configuration set up earlier

Msisdn: This is a JS expression. InputData.msisdn.ToString(). the word msisdn will be swapped out for the field name in the payload specific to your source

WhatsApp Template: Only templates created using this WhatsApp Config and in approved status can be chosen here. Choose the WhatsApp Template created earlier


Click Save

 


Adding your Transition


Connect point a to point b by clicking point a and dragging the line to point b. This will create a transition between the trigger and the action.

 

 

A pop-up window willbe displayed allowing you to choose the transition type

Condition: Setting a condition will have the WhatsApp send to the customer should a particular condition be met in the payload

Bookmark: Bookmark transitions allow a workflow to be paused at a certain point and then resumed later

Delay: This will allow a time/date delay between the trigger received and the WhatsApp being sent to the customer

Default: Once the trigger is received, the WhatsApp will be sent to the customer immediately


Click OK

A close up of a box 
Description automatically generated


Activating your Automation


Save your workflow/Automation

A white grid with a black and white background 
Description automatically generated with medium confidence

Activate your automation

A grid of a graph 
Description automatically generated with medium confidence


A green and purple rectangles with white text 
Description automatically generated


 


Testing an Automation using Postman


Postman is an API parsing tool

Sign-up to Postman: https://www.postman.com/

Download the desktop app: https://www.postman.com/downloads/?utm_source=postman-home

Open Postman and sign-in


Click New


A screenshot of a computer

Description automatically generated

Click HTTP

A screenshot of a computer

Description automatically generated

Choose POST from this drop down


A screenshot of a computer

Description automatically generated A screenshot of a computer

Description automatically generated

 

Add the following URL to the URL field: 

PRODUCTIONhttps://marketicevent.webuildgreat.software/triggerexternalevent

TEST : https://marketicevent.webuildgreatsoftware.co.za/externalevent

 

A screenshot of a computer

Description automatically generated

Click on Params to add the following:

  • externalSourceID
  • eventID


We are going to go find out External Source and Event IDs in engAIge and come back to Postman to add the information



How to find the External Source ID and Event ID for your automation:

  • Login to engAIge
  • Click on Settings

A screenshot of a computer

Description automatically generated

  • Click on View All under Data Sources

A screenshot of a phone

Description automatically generated

  • Use the search functionality to find the external source

  • Click on more
  • Click on Analytics

A white square with black text and a pink marker

Description automatically generated

  • Click on Events

A white rectangular object with a black border

Description automatically generated

  • Click on the automation name you are wanting to test

A screenshot of a computer

Description automatically generated

When you have the view as shown below, click in the URL bar on the browser. 

Here you can find you externalSourceID and eventID

 

A screenshot of a computer

Description automatically generated

 

For example:

externalSourceID: 656731f17299530001e9bbad

eventID: 6677237d-2930-488e-9756-dc3bbba136af

https://marketic.webuildgreatsoftware.co.za/externalsource/656731f17299530001e9bbad/events/6677237d-2930-488e-9756-dc3bbba136af/kiraemoji/External_event_received/actions

Now you can add these to the parameters in your POST statement on Postman




Go back to Postman

Click on Body and ensure raw is selected

 

 

Add a payload like the example below.

{

    "customerName": "Kira",

        "emailAddress": "silversurfer@mailinator.com",

        "msisdn": "0825633259",

        "toEmail": "kira.francis@ignitiongroup.co.za",

        "fromEmail": "info@ignitiongroup.co.za",

    "sms":"kira SMS11231",

    "head1":"Head1",

    "body1":"body1",

    "body2":"body2",

        "body3":"body3",

        "body4":"body4",

    "date":"23-01-24",

    "amount":"299"

    }

 

The important part of this payload is the msisdn as this is where the test WhatsApp message will be sent.

Save the POST statement

A screenshot of a computer

Description automatically generated

 Click Send

200 OK response will show and the number provided in the msisdn field will receive the test WhatsApp message


A screenshot of a computer

Description automatically generated

Author: Kira Francis