Steps

Endpoint Parameters

Parameters

{
    "name" : "name of the step" 
    "params" : {
         "one" : "value",
         "two" : "value",
         "three" : "value" 
    }
}

Steps Configuration

Form Step

[
    {
        "type": "textbox",
        "label": "ingresa tu dni",
        "ref": "dni" 
    }, {
        "type": "textbox",
        "label": "ingresa tu patente",
        "ref": "patente" 
    }, {
        "type": "next_step",
        "value" : "ApiCallerStep" 
    }
]
  • type: Type of form input
  • label: Label of the input
  • ref: Name of the input

Note: the form needs to have an type next_step, to submit the data to another step in order to complete the action

Dynamic Form Step

{
    "url": "/v1/check-name",
    "nextStep": "OtherStep",
    "integrationUrl" : true
    "form": [{
        "type": "textbox",
        "label": "ingresa tu dni",
        "ref": "dni" 
    }, {
        "type": "textbox",
        "label": "ingresa tu patente",
        "ref": "patente" 
    }]
    "headers": {
        "Authorization": "authorization code",
        "X-Token": "thisIsTheXToken" 
    }
}
  • url: Url to get the form fields (in the formstep format)
  • integrationUrl: Use the integration base url, true by default (optional)
  • form: predefined form same as static form
  • nextStep: Step to submit the data (mandatory)
  • headers: Send headers (x-token for example)

ApiCall Step

{
    "url": "http://url-test.com/api/v1/check-name",
    "body": ["name", "age"],
    "method" : "GET",
    "bodyType": "json",
    "nextStep": "OtherStep" 
 }
  • url: The url to call (mandatory)
  • body: This is an array of fiels to retrieve from body (to filter unwanted params).
  • method: GET | POST | PUT | DELETE (default GET)
  • bodyType: json | form_params | multipart | query (default json)

ApiBot Step

{
    "url": "experta/accidentes/id",
    "body": ["cuil", "fecha_siniestro"],
    "method" : "POST",
    "bodyType": "json",
    "nextStep": "OtherStep" 
 }
  • url: The Apibot Integrations endpoint to call (mandatory)
  • body: This is an array of fiels to retrieve from body (to filter unwanted params).
  • method: GET | POST | PUT | DELETE (default GET)
  • bodyType: json | form_params | multipart | query (default json)

Button Step

[
    {
        "label": "Por Patente",
        "next_step": "InfraccionesPatenteForm" 
    },
    {
        "label": "Por Dni",
        "next_step": "InfraccionesDniForm" 
    }
]
  • label: Button label
  • next_step: Name of the step triggered by button

Email Step

{
    "to" : "to@example.com",
    "from" : "from@example.com",
    "subject" : "email subject",
    "body" : "body of the email" 
    "sentMessage" : "the email has been sent" 
}
  • to: The recipient email (override by body params)
  • from: The sender email (overrided by body params)
  • subject: The subject of the email (overrided by body params)
  • body: The body of the email (overrided by body params)
  • sentMessage: The message after send email

Body Params (override default configuration)

{
    "to" : "to@example.com",
    "from" : "from@example.com",
    "subject" : "email subject",
    "body" : "body of the email" 
}

CallBack Step

{
    "next_step : "ApiCallerStep",
    "form" : [
        {
            "type": "textbox",
            "label": "ingresa tu nombre",
            "ref": "nombre" 
        }, {
            "type": "textbox",
            "label": "ingresa tu apellido",
            "ref": "apellido" 
        }, {
            "type": "textbox",
            "label": "ingresa tu dni",
            "ref": "dni" 
        }
    ]
}