ACC: Inbound SMS Activity

johanna_m

13-05-2019

I've been going through the inbound sms activity documentation but there isnt much insight on how to actually query or iterate through the insms table, not sure if I understand the activity's purpose, can someone shed some light on how to configure it? what actually goes in the script section? do I have to write a querydef on the inbound sms table and then process the results?

Event activities

Accepted Solutions (1)

Accepted Solutions (1)

wodnicki

MVP

13-05-2019

With the activity you shouldn't have to query the table, it would be covered by global mailMessage var. Alongside scheduling and some actions on return value, that's about all this activity appears to do. As I wrote in your other thread, for implementing non-trivial behavior such as response deliveries and multiple keywords, you'll be better served using ordinary activities instead.

Answers (2)

Answers (2)

johanna_m

13-05-2019

Thanks for replying, WoodNick have you got a sample script that processes inbound keywords? I mean I can write a custom js script that queries the insms table and does post-processing, but In this case, I am not sure how this script is expecting us to do the processing? whats the first step?

Script

The script lets you process the message and perform various operations that depend on the content of the message. The script is executed for each message and can determine the operation to be performed on messages (leave or delete the message) and activation of the outbound transition.

The return code must be one of the following values:

  • 1 - Deletes the message from the server and activates the outbound transition.
  • 2 - Leaves the message on the server and activates the outbound transition.
  • 3 - Deletes the message from the server.
  • 4 - Leaves the message on the server.

The content of the message is accessible from the global mailMessage variable.

wodnicki

MVP

13-05-2019

Hi,

The documentation states there is a global mailMessage variable and that you have to return a status code from nms:workflow:workflow:inMailAction enum. In the past we used to cobble together query/split/etc to process messages in nms:inSMS, looks like this activity tidies up the process a bit.

Thanks,

-Jon