Table of Contents

Send What's App Message

General

This page contains the JSON of the function-set applicable on creating a Device Activity Log on a trip to send a What's App Message to the driver.

JSON code snippet : TMS_TRIP_WHATSAPP


{
  "FunctionSet": {
    "TableNo": 11172786,
    "Entries": [
      {
        "EntryNo": "10000",
        "CodeunitID": "11172846",
        "FunctionCode": "IF",
        "Description": "IF Driver has phoneNo. THEN create: Device Outbound Task ",
        "TableFilter": "TMS Document Header: Execution=Self",
        "Parameters": [
          {
            "ParameterName": "CONDITION",
            "ResultFunctionSetID": {
              "FunctionSet": {
                "TableNo": 11154660,
                "DataType": "34047",
                "Entries": [
                  {
                    "EntryNo": "10000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "COMPARE",
                    "Description": "Driver Phone No not empty",
                    "Parameters": [
                      {
                        "ParameterName": "VALUE1",
                        "DataType": "0",
                        "ResultFunctionSetID": {
                          "FunctionSet": {
                            "TableNo": 11172786,
                            "DataType": "34047",
                            "Entries": [
                              {
                                "EntryNo": "10000",
                                "CodeunitID": "11172846",
                                "FunctionCode": "GET",
                                "Description": "Get Phone No. of Driver",
                                "Parameters": [
                                  {
                                    "ParameterName": "TABLENO",
                                    "Value": "11172721"
                                  },
                                  {
                                    "ParameterName": "FIELDNO",
                                    "Value": "160"
                                  },
                                  {
                                    "ParameterName": "FIELD 1",
                                    "Value": "1"
                                  },
                                  {
                                    "ParameterName": "FILTER 1",
                                    "Value": "driver"
                                  },
                                  {
                                    "ParameterName": "FIELD 2",
                                    "Value": "2"
                                  },
                                  {
                                    "ParameterName": "FILTER 2",
                                    "ResultFunctionSetID": {
                                      "FunctionSet": {
                                        "TableNo": 11172786,
                                        "DataType": "31488",
                                        "Entries": [
                                          {
                                            "EntryNo": "10000",
                                            "CodeunitID": "11172846",
                                            "FunctionCode": "FIELD",
                                            "Description": "Get Field: Driver",
                                            "Parameters": [
                                              {
                                                "ParameterName": "FIELDNO",
                                                "Value": "607"
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "ParameterName": "FINDWHAT",
                                    "Value": "1"
                                  },
                                  {
                                    "ParameterName": "READ ISOLATION",
                                    "Value": "1"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      {
                        "ParameterName": "OPERATOR",
                        "Value": "<>"
                      },
                      {
                        "ParameterName": "VALUE2",
                        "Value": "''",
                        "DataType": "31488"
                      }
                    ]
                  }
                ]
              }
            }
          },
          {
            "ParameterName": "ON TRUE",
            "Value": "583",
            "ValueFunctionSet": {
              "FunctionSet": {
                "TableNo": 11172786,
                "DataType": "34047",
                "Entries": [
                  {
                    "EntryNo": "10000",
                    "CodeunitID": "11172853",
                    "FunctionCode": "NEW TASK DOC HDR",
                    "Description": "Create new Device Task Outbound Log ",
                    "Parameters": [
                      {
                        "ParameterName": "DEVICE-CODE",
                        "Value": "META001"
                      }
                    ]
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  }
}