Voice flowのHTTP data dip2 / 4

具体例

CRMの例示domain https://crm.example.com に認証connectorを作り、GET /customers、query ANI={{NewContact.ANI}}、Accept application/jsonとする。自社CRMを想定したpathの例である。応答が次ならParse SettingsでString変数tierへJSONPath $.customer.tierをmappingする。

{"customer":{"id":"C104","tier":"gold"}}

Conditionの式{{HTTPRequest1.httpStatusCode == 200}}等でHTTP状態を読み、必要field/型と業務状態を確認してtierの分岐へ進む。HTTP200でもJSONの欠落・parse errorがあり得る。Path Expressionを必要なparsed行で空にするとvalidationに失敗する。

学習パスへ
参考資料