Overview

A Clear API is the central component of ClearProcess and represents a logical unit of work that can span many native APIs across many systems. There are currently more than 500 standard Clear APIs that span several thousand native APIs. In this relatively simple example, a customer is retrieved by making 9 API calls across 3 systems. The Clear API name is on the left and the native API name is on the right:

ClearAPI

Calling a Clear API

Calling a Clear API is a relatively simple and lightweight process. All calls are made using the POST HTTP method with appropriate headers. Content is transferred to and from systems using JavaScript Object Notation (JSON). JSON content is passed with the POST method and its associated headers.

Logging In

If you don’t already have a valid CSRF token, you first need to call https://your_subdomain.clearui.com/clearui/login/ and pass valid user credentials. Click below to see an example of the headers and content.

The returned token can be used until:

  1. The user logs out
  2. The token expires

Invoking a Simple Clear API

Once you have a valid CSRF token, you can use any Clear API available within your subdomain from the same endpoint: https://your_subdomain.clearui.com/clearui/rpc/. The content of the JSON passed determines the Clear API that will be called and the parameters that will be passed. For a simple example, calling the GetDelivery API would have the following headers and content:

POST /clearui/rpc/ HTTP/1.1
Content-Type: application/json
Accept: application/json
X-CSRFToken: wzsr4O09U3IfRsfazFpkVtmOt6hVWIWa
Referer: https://sbx.clearui.com/
Host: sbx.clearui.com
Connection: close
User-Agent: Paw/3.0.11 (Macintosh; OS X/10.10.5) GCDHTTPRequest
Content-Length: 60
{
     "api":"GetDelivery",
      "parameters": {
          "DELIVERY": "1700000013"
      }
}
HTTP/1.1 200 OK
Allow: POST, OPTIONS
Content-Type: application/json
Date: Mon, 01 May 2017 14:35:45 GMT
Server: nginx/1.10.1
Vary: Cookie
X-Frame-Options: SAMEORIGIN
transfer-encoding: chunked
Connection: Close

{
  "errors": [],
  "payload": {
    "GetDelivery": {
      "HEADER": {
        "VOLEH": "",
        "TPGRP": "",
        "AKPRZ": "0.00",
        "VKBUR": "",
        "SPE_GTS_RT_CDE": "",
        "XWOFF": "",
        "ERNAM": "JON",
        "NTGEW": "0.000",
        "SPE_TTYPE": "",
        "TDDAT": "00000000",
        "LFUHR": "000000",
        "CMWAE": "",
        "SPE_UNIT_SYSTEM": "",
        "VLSTK": "",
        "VOLUM": "0.000",
        "VBTYP": "J",
        "WAUHR": "000000",
        "LGTOR": "",
        "SPE_INV_BFR_GI": "",
        "TCODE": "VL01N",
        "VKORG": "GLOB",
        "AENAM": "JON",
        "KALSM": "V10000",
        "TSEGTP": "YMIGDLV",
        "KODAT": "00000000",
        "AKKUR": "0.00000",
        "TSEGFL": "X",
        "SPE_LIFEX_TYPE": "",
        "GRUPP": "",
        "ABSSC": "000002",
        "SPE_WAZONE_IST": "",
        "TERNR": "",
        "TRAID": "",
        "LIFSK": "",
        "KALSM_CH": "",
        "MANDT": "100",
        "LFART": "LF",
        "VBUND": "",
        "NETWR": "0.00",
        "STZKL": "0.00",
        "XABLN": "",
        "WERKS": "",
        "SPE_ACC_APP_STS": "",
        "AUTLF": "",
        "SPE_GTS_REL": "",
        "PRVBE": "",
        "STZZU": "0",
        "ANZPK": "00001",
        "TZONIS": "EST",
        "SPE_REV_VLSTK": "",
        "XBLNR": "",
        "FAKSK": "",
        "CONT_DG": "",
        "VSBED": "01",
        "AULWE": "",
        "KZAZU": "X",
        "TRSPG": "",
        "FKAIV": "IV",
        "TRMTYP": "",
        "STCUR": "0.00000",
        "KZWAB": "I",
        "LFDAT": "00000000",
        "TPSID": "",
        "PROLI": "",
        "PERFK": "US",
        "STAFO": "",
        "PIOIV": "",
        "SPE_WAUHR_IST": "000000",
        "SPE_CHNG_SYS": "",
        "KKBER": "",
        "ABLAD": "",
        "ROUTE": "000001",
        "VBELN": "1700000013",
        "ROUTA": "",
        "SAKES": "",
        "FKDAT": "20150630",
        "LDDAT": "00000000",
        "VERUR": "",
        "SPE_LOEKZ": "",
        "SPE_CARRIER_IND": "",
        "LGBZO": "",
        "TRATY": "",
        "SPE_GEOROUTEIND": "",
        "WADAT_IST": "20150630",
        "LGNUM": "",
        "EXPKZ": "",
        "LIFNR": "",
        "SDABW": "",
        "ERZET": "103726",
        "SPE_SHP_INF_STS": "",
        "WADAT": "20150630",
        "SPE_RET_CANC": "",
        "AKWAE": "",
        "SBGRP": "",
        "SPE_QI_STATUS": "",
        "CMNGV": "00000000",
        "LDUHR": "000000",
        "EXNUM": "",
        "WAERK": "USD",
        "LCNUM": "",
        "KNUMP": "",
        "KNUMV": "",
        "VSART": "",
        "SPE_LE_SCENARIO": "",
        "LPRIO": "01",
        "GRULG": "0010",
        "FOLAR": "",
        "FKDIV": "00000000",
        "SPE_RED_IND": "",
        "LSTEL": "",
        "VKOIV": "",
        "KLIEF": "",
        "STWAE": "USD",
        "KUNIV": "",
        "KNKLI": "",
        "AEDAT": "20150630",
        "HANDLE": "8W0B9HFO7kM7vh1jfO{DW0",
        "GEWEI": "KG",
        "ZUKRL": "DSSW",
        "CTLPC": "",
        "AMTBL": "0.00",
        "CMFRE": "00000000",
        "SPAIV": "",
        "KDGRP": "01",
        "TZONRC": "EST",
        "PODAT": "00000000",
        "VTWIV": "",
        "VGANZ": 0,
        "SPE_ORIG_SYS": "",
        "POTIM": "000000",
        "SPE_REL_TMSTMP": "0",
        "SPE_LOC_SEQ": "",
        "COMMN": "",
        "KUNNR": "IBM",
        "BZIRK": "",
        "BEROT": "",
        "INCO1": "",
        "INCO2": "",
        "IMWRK": "",
        "DIRTA": "",
        "LIFEX": "",
        "BTGEW": "1.000",
        "ERDAT": "20150630",
        "VSTEL": "CSHQ",
        "KALSP": "",
        "VBEAK": "0.00",
        "TRAGR": "",
        "KUNAG": "IBM",
        "KOUHR": "000000",
        "TDUHR": "000000",
        "SPE_GEOROUTE": "",
        "KNFAK": "",
        "LISPL": "",
        "BOLNR": "876435131313545",
        "FKARV": "F2",
        "VERURSYS": "",
        "TPQUA": "",
        "BLDAT": "20150630"
      },
      "PARTNERS": [
        {
          "LAND1": "US",
          "VBELN": "1700000013",
          "ADRNP": "",
          "ABLAD": "",
          "ADRNR": "0000026064",
          "KNREF": "",
          "HITYP": "",
          "STCEG": "",
          "POSNR": "000000",
          "KALE": "",
          "PARNR": "0000000000",
          "PARVW": "AG",
          "LIFNR": "",
          "HZUOR": "00",
          "KUNNR": "IBM",
          "MANDT": "100",
          "XCPDK": "",
          "PRFRE": "",
          "PARVW_FF": "",
          "BOKRE": "",
          "HISTUNR": "00",
          "PERNR": "00000000",
          "LZONE": "",
          "ADRDA": "D"
        },
        {
          "LAND1": "US",
          "VBELN": "1700000013",
          "ADRNP": "",
          "ABLAD": "",
          "ADRNR": "0000026064",
          "KNREF": "",
          "HITYP": "",
          "STCEG": "",
          "POSNR": "000000",
          "KALE": "",
          "PARNR": "0000000000",
          "PARVW": "WE",
          "LIFNR": "",
          "HZUOR": "00",
          "KUNNR": "IBM",
          "MANDT": "100",
          "XCPDK": "",
          "PRFRE": "",
          "PARVW_FF": "",
          "BOKRE": "",
          "HISTUNR": "00",
          "PERNR": "00000000",
          "LZONE": "",
          "ADRDA": "D"
        },
        {
          "LAND1": "US",
          "VBELN": "1700000013",
          "ADRNP": "",
          "ABLAD": "",
          "ADRNR": "",
          "KNREF": "",
          "HITYP": "",
          "STCEG": "",
          "POSNR": "000000",
          "KALE": "",
          "PARNR": "0000000000",
          "PARVW": "Z4",
          "LIFNR": "",
          "HZUOR": "00",
          "KUNNR": "",
          "MANDT": "100",
          "XCPDK": "",
          "PRFRE": "",
          "PARVW_FF": "",
          "BOKRE": "",
          "HISTUNR": "00",
          "PERNR": "00000002",
          "LZONE": "",
          "ADRDA": "D"
        },
        {
          "LAND1": "US",
          "VBELN": "1700000013",
          "ADRNP": "",
          "ABLAD": "",
          "ADRNR": "",
          "KNREF": "",
          "HITYP": "",
          "STCEG": "",
          "POSNR": "000000",
          "KALE": "",
          "PARNR": "0000000000",
          "PARVW": "Z5",
          "LIFNR": "",
          "HZUOR": "00",
          "KUNNR": "",
          "MANDT": "100",
          "XCPDK": "",
          "PRFRE": "",
          "PARVW_FF": "",
          "BOKRE": "",
          "HISTUNR": "00",
          "PERNR": "00000002",
          "LZONE": "",
          "ADRDA": "D"
        },
        {
          "LAND1": "US",
          "VBELN": "1700000013",
          "ADRNP": "",
          "ABLAD": "",
          "ADRNR": "",
          "KNREF": "",
          "HITYP": "",
          "STCEG": "",
          "POSNR": "000000",
          "KALE": "",
          "PARNR": "0000000000",
          "PARVW": "Z6",
          "LIFNR": "",
          "HZUOR": "00",
          "KUNNR": "",
          "MANDT": "100",
          "XCPDK": "",
          "PRFRE": "",
          "PARVW_FF": "",
          "BOKRE": "",
          "HISTUNR": "00",
          "PERNR": "00000001",
          "LZONE": "",
          "ADRDA": "D"
        }
      ],
      "ITEMS": [
        {
          "KOQUI": "X",
          "VOLEH": "",
          "PODREL": "",
          "NTGEW": "0.000",
          "LADGR": "",
          "NETPR": "0.00",
          "SPE_LIFEXPOS2": "",
          "BWTAR": "",
          "VKBUR": "",
          "SITUA": "",
          "FMENG": "",
          "PRE_VL_ETENS": "0000",
          "ERNAM": "JON",
          "ABFOR": "",
          "KCMENGVME": "0.000",
          "CMPNT": "",
          "UMCHA": "",
          "J_1BCFOP": "",
          "LFBNR": "",
          "HSDAT": "00000000",
          "KZUML": "",
          "FIPOS": "",
          "KZUMW": "",
          "VOLUM": "0.000",
          "XCHPF": "",
          "SPE_EXP_DATE_EXT_B": "0",
          "UEBTO": "0.0",
          "VBTYV": "",
          "UEBTK": "",
          "KDPOS": "000000",
          "PROSA": "",
          "SPE_GEN_ELIKZ": "",
          "UMBAR": "",
          "PREFE": "",
          "UMSOK": "",
          "BWTEX": "",
          "AUFNR": "",
          "AKKUR": "0.00000",
          "KNUMH_CH": "",
          "KOWRR": "",
          "SPE_EXP_DATE_INT": "0",
          "QTLOS": "000000",
          "MTART": "DIEN",
          "FKREL": "B",
          "ANZSN": 0,
          "GRKOR": "000",
          "ARKTX": "Software - Annual Service Renewal",
          "KZTLF": "",
          "SPE_LIEFFZ": "0.000",
          "VGBEL": "",
          "LGORT": "",
          "KCNTGEW": "0.000",
          "AESKD": "",
          "KZDLG": "",
          "NOWAB": "",
          "CHARG": "",
          "KZWI4": "0.00",
          "KZWI5": "0.00",
          "VBELN": "1700000013",
          "BPMNG": "0.000",
          "KZWI1": "0.00",
          "KZWI2": "0.00",
          "LICHN": "",
          "LGMNG_FLO": 1,
          "SPE_AUTH_NUMBER": "",
          "UMLGO": "",
          "INSMK": "",
          "PSTYV": "WODD",
          "VBELV": "",
          "NOPCK": "",
          "WAVWR": "0.00",
          "BWART": "",
          "SOBKZ": "",
          "RFVGTYP": "",
          "WERKS": "SOFT",
          "LGBZO": "",
          "RBLVS": "000",
          "SPE_IMWRK": "",
          "SPE_EXCEPT_CODE": "",
          "POSNR_PP": "0000",
          "VTWEG": "DS",
          "GRANT_NBR": "",
          "LGPLA": "",
          "KZVBR": "",
          "SHKZG": "",
          "KCMENGVMEF": 0,
          "UNTTO": "0.0",
          "RSNUM": "0000000000",
          "KZPOD": "",
          "ABGES": 0,
          "ABRVW": "",
          "KZEAR": "",
          "MANDT": "100",
          "NETWR": "0.00",
          "BDART": "",
          "OBJPO": "",
          "KCBRGEW": "0.000",
          "KCMENG": "0.000",
          "GSBER": "",
          "BERID": "",
          "LFIMG_FLO": 1,
          "WKTNR": "",
          "MBDAT": "20150630",
          "SHKZG_UM": "",
          "DLVTP": "",
          "KZWI6": "0.00",
          "FAKSP": "",
          "KANNR": "",
          "EXVKW": "0.00",
          "VPWRK": "",
          "VGPOS": "000000",
          "EAN11": "",
          "KDMAT": "",
          "PRCTR": "",
          "LFPOS": "0000",
          "KVGR1": "",
          "UMVKN": "1",
          "KVGR2": "",
          "KVGR5": "",
          "KVGR4": "",
          "MPROF": "",
          "PRODH": "",
          "VGSYS": "",
          "CUOBJ_CH": "000000000000000000",
          "PROFL": "",
          "STAFO": "",
          "XCHAR": "",
          "ANTLF": "0",
          "UMVKZ": "1",
          "J_1BTAXLW2": "",
          "J_1BTAXLW1": "",
          "SPE_FOLLOW_UP": "",
          "EMATN": "",
          "LISPL": "",
          "BRGEW": "0.000",
          "ABELP": "00000",
          "ABELN": "",
          "KZBEF": "",
          "SPE_STRUC": "000",
          "UEPVW": "",
          "BWLVS": "000",
          "RSART": "",
          "KZFME": "",
          "POSNR": "000010",
          "USONU": "",
          "POSNV": "000000",
          "EMPST": "",
          "SPART": "SW",
          "LGNUM": "",
          "UECHA": "000000",
          "KZWI3": "0.00",
          "KCVOLEH": "",
          "EANNR": "",
          "AUREL": "",
          "ERZET": "103750",
          "PSPNR": "00000000",
          "LIFEXPOS": "000000",
          "LGPBE": "",
          "KZBWS": "",
          "UMWRK": "",
          "VPMAT": "",
          "LFIMG": "1.000",
          "HANDLE": "8W0B9HFO7kM7vh1jfO{jW0",
          "CUOBJ": "000000000000000000",
          "KZBEW": "L",
          "SPE_EXP_DATE_EXT": "0",
          "KNTTP": "",
          "LFDEZ": "",
          "CMPRE_FLT": 0,
          "VGTYP": "",
          "OBJKO": "",
          "BERKZ": "",
          "MTVFP": "",
          "PAOBJNR": "0000000000",
          "UMREF": 0,
          "UMBSQ": "",
          "UM_PS_PSP_PNR": "00000000",
          "SPE_ALTERNATE": "",
          "MATKL": "01",
          "SERNR": "",
          "LGMNG": "1.000",
          "MBUHR": "093726",
          "AKMNG": "F",
          "PS_PSP_PNR": "00000000",
          "MFRGR": "FR_00001",
          "GEBER": "",
          "KCGEWEI": "",
          "VGREF": "",
          "POSAR": "A",
          "AKTNR": "",
          "KCVOLUM": "0.000",
          "VPZUO": "",
          "SONUM": "",
          "CLINT": "0000000000",
          "KVGR3": "",
          "CHHPV": "",
          "VKGRU": "",
          "GRUND": "0000",
          "KOMKZ": "A",
          "VKGRP": "",
          "FLGWM": "",
          "NOATP": "",
          "ORMNG": "1.000",
          "BESTQ": "",
          "KOSTL": "",
          "AEDAT": "20150630",
          "SPE_INSPOUT_GUID": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
          "STADAT": "00000000",
          "GEWEI": "KG",
          "BEDAR_LF": "",
          "KDAUF": "",
          "LGTYP": "",
          "MATNR": 9,
          "SPE_MAT_SUBST": "",
          "KOKRS": "",
          "EPRIO": "",
          "PCKPF": "",
          "WKTPS": "000000",
          "CHSPL": "",
          "MATWA": "000000000000000009",
          "J_1BTXSDC": "",
          "PICKED_UNITS": "ANZ",
          "UMREV": 0,
          "SPE_AUTH_COMPLET": "",
          "RULES": "",
          "SPE_ORIG_SYS": "",
          "ABTNR": "",
          "MAGRV": "PG01",
          "MVGR5": "",
          "MVGR4": "",
          "MVGR3": "",
          "MVGR2": "",
          "MVGR1": "",
          "LFGJA": "0000",
          "KONTO": "",
          "SPE_SCRAP_IND": "",
          "PLART": "",
          "GMCONTROL": "",
          "UMMAT": "",
          "UEPOS": "000000",
          "SUMBD": "",
          "EXART": "",
          "HUPOS": "",
          "FKBER": "",
          "KMPMG": "0.000",
          "ERDAT": "20150630",
          "KMEIN": "",
          "UPFLU": "X",
          "VFDAT": "00000000",
          "POSTING_CHANGE": "",
          "MEINS": "ANZ",
          "PICKED": "1.000",
          "KZECH": "",
          "CHMVS": "000",
          "PRBME": "",
          "TRAGR": "",
          "RSPOS": "0000",
          "EXBWR": "0.00",
          "SPE_ATP_TMSTMP": "0",
          "VBEAF": "0.00",
          "KPEIN": "0",
          "KCMENG_FLO": 0,
          "VERURPOS": "000000",
          "ABART": "",
          "ABRLI": "0000",
          "SPE_KEEP_QTY": "0.000",
          "VRKME": "ANZ",
          "QPLOS": "000000000000",
          "KZWSO": "",
          "VBEAV": "0.00",
          "SERAIL": "",
          "FOBWA": "",
          "NACHL": "",
          "FISTL": ""
        }
      ]
    }
  },
  "new_rpc": true
}

The returned token can be used until:

  1. The user logs out
  2. The token expires

Invoking a Complex Clear API

Complex Clear APIs are simply those that have many parameters passed and many payload keys returned. Perhaps the most complex API is CreateCustomer. If a user or system wanted to create a customer in SAP with a name, address, sales areas, company codes, phone numbers, and any other available data, the request headers and content would be quite large:

POST /clearui/rpc/ HTTP/1.1
                        Content-Type: application/json
                        Accept: application/json
                        X-CSRFToken: Sp0uyhxTHfX0v7ZLsyydI3lvRrpZsqMY
                        Referer: https://dev.clearui.com/
                        Cookie: csrftoken=Sp0uyhxTHfX0v7ZLsyydI3lvRrpZsqMY; sessionid=rjbz9mpgw2raftdzi4dg8uh1pqc2wtdr
                        Host: dev.clearui.com
                        Connection: close
                        User-Agent: Paw/3.0.14 (Macintosh; OS X/10.10.5) GCDHTTPRequest
                        Content-Length: 675
                        
                        {
                          "api": "CreateCustomer",
                          "parameters": {
                            "HEADER": {
                              "STRAS": "123 MAIN ST",
                              "NAME1": "VANDELAY INDUSTRIES",
                              "LAND1": "US",
                              "SPRAS": "E",
                              "ORT01": "CARMEL",
                              "REGIO": "IN",
                              "KTOKD": "CUST",
                              "PSTLZ": "46033"
                            },
                            "SALES_AREAS": [
                              {
                                "SPART": "SW",
                                "ZTERM": "",
                                "KONDA": "",
                                "BEGRU": "",
                                "VKORG": "GLOB",
                                "CRUD_TYPE": "I",
                                "VTWEG": "DS",
                                "WAERS": "",
                                "VWERK": "",
                                "KALKS": ""
                              }
                            ],
                            "PARTNERS": [],
                            "COMPANIES": [
                              {
                                "BUKRS": "P&C",
                                "AKONT": "20100",
                                "ZWELS": "",
                                "VZSKZ": "",
                                "CRUD_TYPE": "I"
                              }
                            ],
                            "CONTACTS": [],
                            "PHONES": [
                              {
                                "CONSNUMBER": "",
                                "TELEPHONE": "317-678-9586",
                                "EXTENSION": "",
                                "COUNTRY": "US",
                                "STD_NO": "",
                                "CRUD_TYPE": "I"
                              }
                            ],
                            "EMAILS": [
                              {
                                "CONSNUMBER": "",
                                "E_MAIL": "VANDELAY@YAHOO.COM",
                                "STD_NO": "",
                                "CRUD_TYPE": "I"
                              }
                            ],
                            "FAXES": [],
                            "BANKS": [],
                            "CARDS": []
                          }
                        }
HTTP/1.1 200 OK
Allow: POST, OPTIONS
Content-Type: application/json
Date: Mon, 01 May 2017 14:41:43 GMT
Server: nginx/1.10.1
Vary: Cookie
X-Frame-Options: SAMEORIGIN
transfer-encoding: chunked
Connection: Close

{
  "errors": [],
  "payload": {
    "CreateCustomer": {
      "E1KNB1M": {
        "INT_EDIDD": [
          {
            "PSGNUM": "000001",
            "MANDT": "100",
            "SDATA": "001P&C          20100                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ",
            "SEGNAM": "E1KNB1M",
            "SEGNUM": "",
            "TABNAM": "E1KNB1M"
          }
        ]
      },
      "CUSTOMER_CREATE": {
        "ERROR_BEFORE_CALL_APPLICATION": "",
        "INT_EDIDD": [
          {
            "PSGNUM": "",
            "MANDT": "100",
            "DOCNUM": "",
            "SDATA": "001                                                                                                                                                CUST  US                        VANDELAY INDUSTRIES                                                                                                                           CARMEL                                                                                    46033     IN                        E                             123 MAIN ST                                       ///",
            "SEGNAM": "E1KNA1M",
            "DTINT2": "",
            "SEGNUM": "000001",
            "HLEVEL": "",
            "TABNAM": "E1KNA1M"
          },
          {
            "PSGNUM": "000001",
            "MANDT": "100",
            "DOCNUM": "",
            "SDATA": "001GLOBDSSW",
            "SEGNAM": "E1KNVVM",
            "DTINT2": "",
            "SEGNUM": "000002",
            "HLEVEL": "",
            "TABNAM": "E1KNVVM"
          },
          {
            "PSGNUM": "000001",
            "MANDT": "100",
            "DOCNUM": "",
            "SDATA": "001P&C          20100",
            "SEGNAM": "E1KNB1M",
            "DTINT2": "",
            "SEGNUM": "",
            "HLEVEL": "",
            "TABNAM": "E1KNB1M"
          }
        ],
        "DOCNUM": "0000000000013298",
        "INT_EDIDC": {
          "STATUS": "30",
          "MANDT": "100",
          "DOCTYP": "DEBMAS05",
          "SNDPRN": "DINCLNT100",
          "RCVPRT": "LS",
          "DIRECT": "2",
          "RCVPRN": "DINCLNT100",
          "SNDPRT": "LS",
          "SNDPOR": "DIN",
          "SNDPFC": "LS",
          "TABNAM": "EDI_DC",
          "MESTYP": "DEBMAS",
          "IDOCTYP": "DEBMAS05"
        },
        "ONLINE": "O"
      },
      "ADDRESS_COMMIT": {
        "RETURN": {
          "FIELD": "",
          "TYPE": "",
          "PARAMETER": "",
          "MESSAGE_V2": "",
          "NUMBER": "000",
          "SYSTEM": "",
          "MESSAGE_V1": "",
          "LOG_NO": "",
          "MESSAGE_V3": "",
          "MESSAGE_V4": "",
          "MESSAGE": "",
          "LOG_MSG_NO": "000000",
          "ID": "",
          "ROW": 0
        },
        "WAIT": "X"
      },
      "CUSTOMER_COMMIT": {
        "RETURN": {
          "FIELD": "",
          "TYPE": "",
          "PARAMETER": "",
          "MESSAGE_V2": "",
          "NUMBER": "000",
          "SYSTEM": "",
          "MESSAGE_V1": "",
          "LOG_NO": "",
          "MESSAGE_V3": "",
          "MESSAGE_V4": "",
          "MESSAGE": "",
          "LOG_MSG_NO": "000000",
          "ID": "",
          "ROW": 0
        },
        "WAIT": "X"
      },
      "MESSAGES": [],
      "RAW_MESSAGES": [
        {
          "STAPA3": "",
          "STAPA2": "",
          "STAPA1": "",
          "STAPA4": "",
          "STAMNO": "000",
          "STATYP": "",
          "STAMID": ""
        },
        {
          "STAPA3": "No conversion",
          "STAPA2": "No filters",
          "STAPA1": "",
          "STAPA4": "No version change",
          "STAMNO": "005",
          "STATYP": "S",
          "STAMID": "B1"
        },
        {
          "STAPA3": "",
          "STAPA2": "",
          "STAPA1": "",
          "STAPA4": "",
          "STAMNO": "042",
          "STATYP": "I",
          "STAMID": "B1"
        },
        {
          "STAPA3": "GLOB DS SW",
          "STAPA2": "P&C",
          "STAPA1": "0000000200",
          "STAPA4": "",
          "STAMNO": "174",
          "STATYP": "S",
          "STAMID": "F2"
        }
      ],
      "E1KNA1M": {
        "INT_EDIDD": {
          "MANDT": "100",
          "SEGNUM": "000001",
          "TABNAM": "E1KNA1M",
          "SDATA": "001                                                                                                                                                CUST  US                        VANDELAY INDUSTRIES                                                                                                                           CARMEL                                                                                    46033     IN                        E                             123 MAIN ST                                       ///                                                                                                                                                                                                                                                                                                                                                              ",
          "SEGNAM": "E1KNA1M"
        },
        "COUNTER": 3
      },
      "E1KNVVM": {
        "INT_EDIDD": [
          {
            "PSGNUM": "000001",
            "MANDT": "100",
            "SDATA": "001GLOBDSSW                                                                                                                                                                                      ",
            "SEGNAM": "E1KNVVM",
            "SEGNUM": "000002",
            "TABNAM": "E1KNVVM"
          }
        ]
      },
      "ADDRESS": {
        "BAPIADTTX": [],
        "RETURN": [],
        "BAPIADTEL_X": [
          {
            "FLG_NOUSE": "",
            "EXTENSION": "X",
            "HOME_FLAG": "",
            "VALID_TO": "",
            "COUNTRY": "X",
            "CONSNUMBER": "X",
            "COUNTRYISO": "",
            "STD_NO": "X",
            "STD_RECIP": "",
            "TELEPHONE": "X",
            "UPDATEFLAG": "I",
            "CALLER_NO": "",
            "R_3_USER": "",
            "TEL_NO": "",
            "VALID_FROM": ""
          }
        ],
        "BAPIAD1VL": [],
        "IV_TIME_DEPENDENT_COMM_DATA": null,
        "BAPIADFAX_X": [],
        "CONTEXT": "0001",
        "BAPIADSSF_X": [],
        "IV_CHECK_ADDRESS": null,
        "BAPIADURI": [],
        "BAPIADPRT_X": [],
        "BAPIADRML": [],
        "ADDRESS_NUMBER": "0000047402",
        "BAPIADFAX": [],
        "BAPIADURI_X": [],
        "BAPIADRFC_X": [],
        "BAPIADTLX_X": [],
        "BAPIADSMTP": [
          {
            "TNEF": "",
            "HOME_FLAG": "X",
            "VALID_TO": "99991231235959",
            "CONSNUMBER": "001",
            "E_MAIL": "VANDELAY@YAHOO.COM",
            "STD_NO": "X",
            "R_3_USER": "",
            "ERRORFLAG": "",
            "FLG_NOUSE": "",
            "STD_RECIP": "",
            "ENCODE": "",
            "EMAIL_SRCH": "VANDELAY@YAHOO.COM",
            "VALID_FROM": "00010101000000"
          }
        ],
        "BAPIADTEL": [
          {
            "FLG_NOUSE": "",
            "EXTENSION": "",
            "HOME_FLAG": "X",
            "VALID_TO": "99991231235959",
            "COUNTRY": "US",
            "CONSNUMBER": "001",
            "COUNTRYISO": "US",
            "STD_NO": "X",
            "STD_RECIP": "",
            "TELEPHONE": "317-678-9586",
            "ERRORFLAG": "",
            "VALID_FROM": "00010101000000",
            "CALLER_NO": "3176789586",
            "R_3_USER": "1",
            "TEL_NO": "+13176789586"
          }
        ],
        "OBJ_TYPE": "KNA1",
        "OBJ_ID": "0000000200",
        "BAPICOMREM": [],
        "BAPIADPAG": [],
        "BAPIADUSE": [
          {
            "VALID_FROM": "00010101000000",
            "CONSNUMBER": "001",
            "VALID_TO": "99991231235959",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_DEFAULT",
            "COMM_TYPE": "TEL"
          },
          {
            "VALID_FROM": "00010101000000",
            "CONSNUMBER": "001",
            "VALID_TO": "99991231235959",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_HOME",
            "COMM_TYPE": "TEL"
          },
          {
            "VALID_FROM": "00010101000000",
            "CONSNUMBER": "001",
            "VALID_TO": "99991231235959",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_NMBDEFA",
            "COMM_TYPE": "TEL"
          },
          {
            "VALID_FROM": "00010101000000",
            "CONSNUMBER": "001",
            "VALID_TO": "99991231235959",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_DEFAULT",
            "COMM_TYPE": "INT"
          },
          {
            "VALID_FROM": "00010101000000",
            "CONSNUMBER": "001",
            "VALID_TO": "99991231235959",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_HOME",
            "COMM_TYPE": "INT"
          }
        ],
        "BAPIAD1VL_X": [],
        "BAPIADPAG_X": [],
        "OBJ_ID_EXT": null,
        "BAPIADUSE_X": [],
        "BAPIADTTX_X": [],
        "SAVE_ADDRESS": "X",
        "ACCEPT_ERROR": null,
        "BAPIADPRT": [],
        "BAPIADX400": [],
        "BAPICOMRE_X": [],
        "BAPIADRML_X": [],
        "BAPIADRFC": [],
        "BAPIADSSF": [],
        "BAPIAD_RE_X": [],
        "BAPIAD_REM": [],
        "BAPIADX40_X": [],
        "BAPIADSMT_X": [
          {
            "TNEF": "",
            "HOME_FLAG": "",
            "VALID_TO": "",
            "CONSNUMBER": "X",
            "E_MAIL": "X",
            "STD_NO": "X",
            "R_3_USER": "",
            "FLG_NOUSE": "",
            "UPDATEFLAG": "I",
            "STD_RECIP": "",
            "ENCODE": "",
            "EMAIL_SRCH": "",
            "VALID_FROM": ""
          }
        ],
        "BAPIADTLX": []
      }
    },
    "GetCustomer": {
      "CUSTOMER": 200,
      "PARTNERS": [
        {
          "CUSTOMER": 200,
          "SPART": "SW",
          "VKORG": "GLOB",
          "VTWEG": "DS",
          "PARVW": "AG",
          "DEFPA": "",
          "DESCRIPTION": "Sold-to party (KU)",
          "KUNN2": 200
        },
        {
          "CUSTOMER": 200,
          "SPART": "SW",
          "VKORG": "GLOB",
          "VTWEG": "DS",
          "PARVW": "RE",
          "DEFPA": "",
          "DESCRIPTION": "Bill-to party (KU)",
          "KUNN2": 200
        },
        {
          "CUSTOMER": 200,
          "SPART": "SW",
          "VKORG": "GLOB",
          "VTWEG": "DS",
          "PARVW": "RG",
          "DEFPA": "",
          "DESCRIPTION": "Payer (KU)",
          "KUNN2": 200
        },
        {
          "CUSTOMER": 200,
          "SPART": "SW",
          "VKORG": "GLOB",
          "VTWEG": "DS",
          "PARVW": "WE",
          "DEFPA": "",
          "DESCRIPTION": "Ship-to party (KU)",
          "KUNN2": 200
        }
      ],
      "FUNCTIONS": [
        {
          "value": "AA",
          "label": "SP Contract rel. ord (KU)"
        },
        {
          "value": "AG",
          "label": "Sold-to party (KU)"
        },
        {
          "value": "AP",
          "label": "Contact person (AP)"
        },
        {
          "value": "AW",
          "label": "SH Contract rel. ord (KU)"
        },
        {
          "value": "ED",
          "label": "EDI mail recipient (PE)"
        },
        {
          "value": "EK",
          "label": "Buyer (AP)"
        },
        {
          "value": "EN",
          "label": "Enduser for F.Trade (KU)"
        },
        {
          "value": "LF",
          "label": "Vendor (LI)"
        },
        {
          "value": "Q1",
          "label": "QtyCertRec/shpTo pt (AP)"
        },
        {
          "value": "Q2",
          "label": "QtyCertRec/soldTo pt (AP)"
        },
        {
          "value": "RE",
          "label": "Bill-to party (KU)"
        },
        {
          "value": "RG",
          "label": "Payer (KU)"
        },
        {
          "value": "SB",
          "label": "Spec.stock partner (KU)"
        },
        {
          "value": "SP",
          "label": "Forwarding Agent (LI)"
        },
        {
          "value": "VE",
          "label": "Sales employee (PE)"
        },
        {
          "value": "WE",
          "label": "Ship-to party (KU)"
        },
        {
          "value": "ZM",
          "label": "Employee respons. (PE)"
        }
      ],
      "FAXES": [],
      "CONTACTS": [],
      "PHONES": [
        {
          "FLG_NOUSE": "",
          "EXTENSION": "",
          "HOME_FLAG": "X",
          "VALID_TO": "",
          "COUNTRY": "US",
          "CONSNUMBER": "001",
          "COUNTRYISO": "US",
          "STD_NO": "X",
          "STD_RECIP": "",
          "TELEPHONE": "317-678-9586",
          "ERRORFLAG": "",
          "VALID_FROM": "",
          "CALLER_NO": "3176789586",
          "R_3_USER": "1",
          "TEL_NO": "+13176789586"
        }
      ],
      "COMPANIES": [
        {
          "AKONT": 20100,
          "VZSKZ": "",
          "BUKRS": "P&C",
          "ZWELS": ""
        }
      ],
      "HEADER": {
        "LAND1": "US",
        "ADRNR": "0000047402",
        "XCPDK": "",
        "KNRZA": "",
        "VBUND": "",
        "DTAMS": "",
        "ORT01": "CARMEL",
        "KTOKD": "CUST",
        "STRAS": "123 MAIN ST",
        "LIFNR": "",
        "REGIO": "IN",
        "BEGRU": "",
        "KUNNR": "0000000200",
        "SPRAS": "E",
        "KONZS": "",
        "NAME1": "VANDELAY INDUSTRIES",
        "XZEMP": "",
        "PSTLZ": "46033",
        "DTAWS": "",
        "MCOD1": "VANDELAY INDUSTRIES",
        "XKNZA": "",
        "NAME2": ""
      },
      "ADDRESS": {
        "RETURN": [],
        "BAPIAD1VL": [
          {
            "NAME_2": "",
            "NAME_3": "",
            "LANGU_ISO": "EN",
            "COUNTRYISO": "US",
            "NAME_4": "",
            "TITLE": "",
            "COUNTRY": "US",
            "HOUSE_NO3": "",
            "PO_CTRYISO": "",
            "STREET": "123 MAIN ST",
            "COUNTY_CODE": "",
            "TO_DATE": "99991231",
            "DONT_USE_S": "",
            "DISTRCT_NO": "",
            "HOUSE_NO": "",
            "CHCKSTATUS": "",
            "DONT_USE_P": "",
            "ADDRESS_ID": "",
            "LANGU_CR": "E",
            "POBOX_CTRY": "",
            "PCODE1_EXT": "",
            "ADDR_VERS": "",
            "TIME_ZONE": "EST",
            "DELI_SERV_NUMBER": "",
            "PCODE3_EXT": "",
            "LOCATION": "",
            "EXTENS_1": "",
            "PO_BOX_REG": "",
            "CONV_NAME": "",
            "PO_W_O_NO": "",
            "EXTENS_2": "",
            "LANGU": "E",
            "COMM_TYPE": "",
            "STR_SUPPL2": "",
            "STR_SUPPL3": "",
            "STR_SUPPL1": "",
            "HOME_CITY": "",
            "ADDR_GROUP": "BP",
            "FLOOR": "",
            "HOMECITYNO": "",
            "STREET_NO": "",
            "HOUSE_NO2": "",
            "COUNTY": "",
            "DELIV_DIS": "",
            "CITY_NO": "",
            "PCODE2_EXT": "",
            "STR_ABBR": "",
            "DELI_SERV_TYPE": "",
            "TRANSPZONE": "",
            "TOWNSHIP_CODE": "",
            "BUILDING": "",
            "CITY": "CARMEL",
            "TOWNSHIP": "",
            "NAME": "VANDELAY INDUSTRIES",
            "DISTRICT": "",
            "LANGUCRISO": "EN",
            "ROOM_NO": "",
            "REGION": "IN",
            "PBOXCIT_NO": "",
            "POSTL_COD1": "46033",
            "REGIOGROUP": "",
            "POSTL_COD3": "",
            "POSTL_COD2": "",
            "PO_BOX_LOBBY": "",
            "C_O_NAME": "",
            "FROM_DATE": "00010101",
            "TAXJURCODE": "IN0000000",
            "PO_BOX": "",
            "SORT1": "",
            "SORT2": "",
            "PO_BOX_CIT": ""
          }
        ],
        "CONTEXT": "0001",
        "BAPIADURI": [],
        "IV_CURRENT_COMM_DATA": "X",
        "BAPIADRML": [],
        "ADDRESS_NUMBER": "0000047402",
        "BAPIADFAX": [],
        "BAPIADSMTP": [
          {
            "TNEF": "",
            "HOME_FLAG": "X",
            "VALID_TO": "",
            "CONSNUMBER": "001",
            "E_MAIL": "VANDELAY@YAHOO.COM",
            "STD_NO": "X",
            "R_3_USER": "",
            "ERRORFLAG": "",
            "FLG_NOUSE": "",
            "STD_RECIP": "",
            "ENCODE": "",
            "EMAIL_SRCH": "VANDELAY@YAHOO.COM",
            "VALID_FROM": ""
          }
        ],
        "BAPIADTEL": [
          {
            "FLG_NOUSE": "",
            "EXTENSION": "",
            "HOME_FLAG": "X",
            "VALID_TO": "",
            "COUNTRY": "US",
            "CONSNUMBER": "001",
            "COUNTRYISO": "US",
            "STD_NO": "X",
            "STD_RECIP": "",
            "TELEPHONE": "317-678-9586",
            "ERRORFLAG": "",
            "VALID_FROM": "",
            "CALLER_NO": "3176789586",
            "R_3_USER": "1",
            "TEL_NO": "+13176789586"
          }
        ],
        "OBJ_TYPE": "KNA1",
        "OBJ_ID": "0000000200",
        "BAPICOMREM": [],
        "BAPIADPAG": [],
        "BAPIADUSE": [
          {
            "VALID_FROM": "",
            "CONSNUMBER": "001",
            "VALID_TO": "",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_DEFAULT",
            "COMM_TYPE": "INT"
          },
          {
            "VALID_FROM": "",
            "CONSNUMBER": "001",
            "VALID_TO": "",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_HOME",
            "COMM_TYPE": "INT"
          },
          {
            "VALID_FROM": "",
            "CONSNUMBER": "001",
            "VALID_TO": "",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_DEFAULT",
            "COMM_TYPE": "TEL"
          },
          {
            "VALID_FROM": "",
            "CONSNUMBER": "001",
            "VALID_TO": "",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_HOME",
            "COMM_TYPE": "TEL"
          },
          {
            "VALID_FROM": "",
            "CONSNUMBER": "001",
            "VALID_TO": "",
            "ERRORFLAG": "",
            "DEF_USAGE": "X",
            "COMM_USAGE": "AD_NMBDEFA",
            "COMM_TYPE": "TEL"
          }
        ],
        "OBJ_ID_EXT": null,
        "BAPIADTTX": [],
        "BAPIADPRT": [],
        "BAPIADX400": [],
        "BAPIADRFC": [],
        "BAPIADSSF": [],
        "BAPIAD_REM": [],
        "BAPIADTLX": []
      },
      "BANKS": [],
      "CARDS": [],
      "SALES_AREAS": [
        {
          "SPART": "SW",
          "VKORG": "GLOB",
          "VTWEG": "DS",
          "WAERS": "",
          "ZTERM": "",
          "BEGRU": "",
          "VWERK": "",
          "KALKS": "",
          "KONDA": ""
        }
      ],
      "EMAILS": [
        {
          "TNEF": "",
          "HOME_FLAG": "X",
          "VALID_TO": "",
          "CONSNUMBER": "001",
          "E_MAIL": "VANDELAY@YAHOO.COM",
          "STD_NO": "X",
          "R_3_USER": "",
          "ERRORFLAG": "",
          "FLG_NOUSE": "",
          "STD_RECIP": "",
          "ENCODE": "",
          "EMAIL_SRCH": "VANDELAY@YAHOO.COM",
          "VALID_FROM": ""
        }
      ]
    }
  },
  "new_rpc": true
}

Generally a Create API is configured to immediately call its corresponding Get API. See more in Chaining APIs.

Configuring a Clear API

The API Builder is the central location in ClearProcess where you can maintain the ClearAPIs that integrate with your ClearUI pages and external systems. Generally a person with a software development background is best suited for this configuration. You must be a Clear administrator to be able to launch the API Builder:

Launching API Builder

Pre-Processing Rules

ClearProcess Get Delivery
SAP Get Delivery

Pre-Processing Conditional

This property prevents the step from executing if certain criteria are met. A returned value of True tells ClearProcess to stop processing the step. For more details on the operators contained in between the {% %} symbols, see the Template Tags section:

Pre-Processing Conditional

Post-Processing Conditional

When processing an individual step of a Clear API, ClearProcess allows you to manipulate the JSON data from a system’s response before sending back the overall payload response. This is particularly important because source systems often return unnecessary or cryptic data. Sticking with the prior example, BAPI_DELIVERY_GETLIST returns a huge amount of data with very confusing parameter names. In the following example, some basic error handling is performed on the response from SAP, and then the response is reformatted to only pass back back the keys of HEADER, PARTNERS, and ITEMS. For more details on the operators contained in between the {% %} symbols, see the Template Tags section:

Post-Processing Rules

Arranging Steps in the Same Clear API

There is no limit to the number of steps in a Clear API. The steps can be in series, nested, or a combination of both. The following example shows both series and nested steps in a single Clear API. The following general rules of thumb apply when deciding between arranging your steps in series or nesting them:

  • Series – the more common method, this should be used when nesting is not necessary
  • Nesting – use this method when additional steps need to be performed but you don’t these steps to hold up subsequent processing

The example below shows a combination of nested steps and series:

Clear API Nesting

Additional Properties of Clear APIs

In addition to the properties in the prior sections, these properties are also available on a single step in a Clear API:

  • Execution Order – if the step is one of several children, this property drives sequence of calls
  • Payload Key – a unique key that will identify the single step’s results in the overall response’s payload
  • Is Repeat Enabled – indicates whether the step should be executed in a loop
  • Repeat on Structure – the payload key that should be iterated over during a repeat enabled step
  • Chained Clear API – indicates the Clear API that should be called immediately after the step is done processing. This is particularly helpful in Create and Change scenarios

SAP Integration

Configuring a Clear API within ClearProcess requires some knowledge of the native APIs that are being called in the source system and some working knowledge of JSON. The basic SAP-to-JSON translation when dealing with API parameters is:

  • SAP Table = JSON Array. The notation for a JSON array is []. IT_VBELN is an example in the screenshots below. Since an SAP table contains rows of a specific structure, the JSON version will contain an array with child objects.
  • SAP Structure = JSON Object. The notation for a JSON object is {}. A JSON object contains one or more key-value pairs. IS_DLV_DATA_CONTROL is an example in the screenshots below.
  • SAP Value = JSON Key-Value Pair. The notation for a JSON key-value pair is “key”:”value”. Since an SAP structure contains column names with values, JSON will contain a key-value pair for each column in an SAP structure. Within IS_DLV_DATA_CONTROL in the screenshots below, any of the key-value pairs are examples, including “ITEM_STATUS”: “X”.
GetDelivery
SAP Get Delivery

Template Tags

Template tags are open-source functions that allow you to manipulate data in the pre-processing and post-processing rules. The following open source tags are supported by Clear Software:

  • Publisher: Open Source
  • Usage: To process conditionals
  • Example:
    {% if order_flow_out.DOC_CAT_SD == “C” and order_flow_out.DOCCATEGOR == “M” and order_flow_out.PREDITDOC == order_item_out.ITM_NUMBER %}{% dictionary_add_key_value order_item_out “INVOICE” order_flow_out.SUBSSDDOC as invoice %}{% endif %}
  • Publisher: Open Source
  • Usage: To iterate through data
  • Example:
    {% for order_partner_out in response.payload.GetSalesOrder.HEADER.ORDER_PARTNERS_OUT %}{% for order_address_out in response.payload.GetSalesOrder.HEADER.ORDER_ADDRESS_OUT %}{% if order_partner_out.ADDRESS == order_address_out.ADDRESS %}{% merge_dicts order_partner_out order_address_out as merged %}{% endif %}{% endfor %}{% endfor %}
  • Publisher: Open Source
  • Usage: To print data to the request or response
  • Example:
    {{ response.payload.GetDelivery.HEADER.ET_DELIVERY_HEADER.0 }}
  • Publisher: Open Source
  • Usage: To escape special characters in the request and response
  • Example:
    {% autoescape on %}{{ body }}{% endautoescape %}
  • Publisher: Open Source
  • Usage: Adds the argument to a value
  • Example: This is widely used for many scenarios:
    • Strip Leading Zeroes:
      item.MATNR|add:0
    • Add Leading Zeroes:
      “VBELN”:”{{ user_parameters.ORDER|add:0|stringformat:”010d” }}”
    • Concatenate Strings:
      “Delivery “|add:user_parameters.DELIVERY|add:” does not exist.”
  • Publisher: Open Source
  • Usage: Formats a string based on print-f style formatting
  • Example:
    user_parameters.ORDER|add:0|stringformat:”010d”
  • Publisher: Open Source
  • Usage: Calculates the length of a string or an array
  • Example:
    {% if response.errors|length > 0 %}
  • Publisher: Open Source
  • Usage: Left aligns a value to a fixed width string
  • Example:
    {{ “Junk”|ljust:10 }} = “Junk “
  • Publisher: Open Source
  • Usage: Return a piece of a string or array
  • Example:
    {{ “Words”|slice:”0:2” }} = “Wo”
  • Publisher: Open Source
  • Usage: Converts a string to upper case
  • Example:
    user_parameters.LASTNAME|upper

The following additional tags were developed and are supported by Clear Software:

  • Publisher: Clear Software
  • Usage: Gets the value of a key in an object
  • Example:
    {% get_dictionary_value field “LENG” as field_length %}
  • Publisher: Clear Software
  • Usage: Converts the bizarre SAP data format into JSON
  • Example:
    {% parse_rfc_read_table response.payload.SearchDocuments.LIST.DATA response.payload.SearchDocuments.LIST.FIELDS %}
  • Publisher: Clear Software
  • Usage: Adds an error message to the payload response
  • Example:
    {% add_payload_error response “GetDelivery” “Delivery “|add:user_parameters.DELIVERY|add:” does not exist.” %}
  • Publisher: Clear Software
  • Usage: Adds an success message to the payload response
  • Example:
    {% add_payload_message response “CreateVendor” “Vendor “|add:user_parameters.VENDOR|add:” was created.” %}
  • Publisher: Clear Software
  • Usage: Merges 2 JSON objects together
  • Example:
    {% if order_partner_out.ADDRESS == order_address_out.ADDRESS %}{% merge_dicts order_partner_out order_address_out as merged %}{% endif %}
  • Publisher: Clear Software
  • Usage: Replace all instances of a value in an object with a new value
  • Example:
    {% dictionary_value_replace item “1234” “5678” as new_value %}
  • Publisher: Clear Software
  • Usage: Creates or overwrites a key with a new value
  • Example:
    {% dictionary_add_key_value item “MATNR” item.MATNR|add:0 as material %}
  • Publisher: Clear Software
  • Usage: Converts an SAP data string to an object
  • Example:
    {% string_to_dictionary parsed_data as parsed_array %}
  • Publisher: Clear Software
  • Usage: Replace a portion of a value
  • Example:
    {% replace item.LASTNAME “JOLIE-PITT” “JOLIE” as new_value %}
  • Publisher: Clear Software
  • Usage: Replace a portion of a value
  • Example:
    {% replace item.LASTNAME “JOLIE-PITT” “JOLIE” as new_value %}
  • Publisher: Clear Software
  • Usage: Adds a new array to the payload response
  • Example:
    {% dictionary_add_list response.payload.CreateCustomer “MESSAGES” as messages %}
  • Publisher: Clear Software
  • Usage: Adds a new row to an array
  • Example:
    {% list_add_value response.payload.CreateCustomer.MESSAGES message as new_message %}
  • Publisher: Clear Software
  • Usage: Adds an object as a key on another object
  • Example:
    {% dictionary_add_dictionary response.GetCustomer.HEADER “ADDRESS” as address_object %}
  • Publisher: Clear Software
  • Usage: Receives a CSV file uploaded from ClearUI and converts it to an array
  • Example:
    {% csv_to_list user_parameters.data as csv_items %}
  • Publisher: Clear Software
  • Usage: Encodes data in base64 format
  • Example:
    {% dictionary_add_key_value response.payload.OfficeDepotCheckout “JSON_STRING” json_data|encode %}
  • Publisher: Clear Software
  • Usage: Decodes base64 data into its original format
  • Example:
    {% dictionary_add_key_value response.payload.ReprocessRequisition “STRING” response.payload.ReprocessRequisition.STRING|decode %}
  • Publisher: Clear Software
  • Usage: Specifically for SAP, occasionally PDF files are returned as a compressed list of a single file. This tag retrieves and unzips the file prior to download to ClearUI.
  • Example:
    {% list_add_value response.download response.payload.PrintPreviewPurchaseOrder.PDF.E_PDF|decode|unzip_first %}
  • Publisher: Clear Software
  • Usage: Allows a string containing a decimal to be mathematically added to another string containing a decimal.
  • Example:
    {% dictionary_add_key_value response.payload.GetRequisition.DETAILS.PRHEADER “TOTAL” response.payload.GetRequisition.DETAILS.PRHEADER.TOTAL|string_add_float:item.VALUE_ITEM %}
  • Publisher: Clear Software
  • Usage: Pauses code execution for a specified number of seconds. This is useful for slow database commits.
  • Example:
    {% sleep_use_at_your_own_peril 1 %}
  • Publisher: Clear Software
  • Usage: Converts an object or array to JSON.
  • Example:
    {% toJson response.GetCustomer.ADDRESS as address_json %}
  • Publisher: Clear Software
  • Usage: Converts JSON to an object or array.
  • Example:
    {% evalJson response.GetCustomer.ADDRESS as address_object %}
  • Publisher: Clear Software
  • Usage: Performs subtraction.
  • Example:
    {% dictionary_add_key_value response.GetSalesOrder.HEADER “TOTAL” item.QUANTITY|subtract:item.AMOUNT %}
  • Publisher: Clear Software
  • Usage: Performs division.
  • Example:
    {{ item.COND_VALUE|divide:10 }}
  • Publisher: Clear Software
  • Usage: Concatenates two strings together. This is similar to add, except that no attempt is made to convert the string to an integer.
  • Example:
    {% dictionary_add_key_value order_item_out “PO_TEXT” order_item_out.PO_TEXT|concatenate:text.LINE as data %}
  • Publisher: Clear Software
  • Usage: Splits a string at a specified character into an array of strings.
  • Example:
    {% dictionary_add_key_value item “VEND_MAT1″ item.VEND_MAT|split:”_” %}
  • Publisher: Clear Software
  • Usage: Splits a string into an array of strings that are a specific length.
  • Example:
    {% split_string_into_chunks user_parameters.data 255 as file_content %}
  • Publisher: Clear Software
  • Usage: Converts the results of an SAP database table read to an array or object.
  • Example:
    {% parse_rfc_read_table response.payload.ApprovePOClear.USR21.DATA response.payload.ApprovePOClear.USR21.FIELDS as parsed_data %}
    {% string_to_dictionary parsed_data as usr21 %}
  • Publisher: Clear Software
  • Usage: Converts the values in an object or array to upper case.
  • Example:
    {% dictionary_capitalize user_parameters.HEADER as upper_case_header %}
  • Publisher: Clear Software
  • Usage: Calculates a new datetime based the datetime passed and the desired offset in the format desired. Offset options include days, seconds, microseconds, milliseconds, minutes, hours, weeks
  • Example:
    {% now “Ymd” as current_date %}
    {% timedelta current_date “%Y%m%d” days=-90 as NinetyDaysAgo %}
  • Publisher: Clear Software
  • Usage: Converts a datetime passed from ClearUI into any desired format that might be need by a target system.
  • Example:
    “DOC_DATE”: “{{ user_parameters.HEADER.DOC_DATE|as_date:”%Y%m%d” }}”