Import Visit Plans

The trip_plans mode allows to import visit plans and create new employees.

Fields of the JSON object that are necessary to create a visit plan:

Name Type Description Example
create_users Integer Allowed (1) or not allowed (0) to create non-existent users 1
tp_id Integer Plan id
city_id Integer Existing city id
city_name String City name London
network_id Integer Existing network id
network_name String Network name Walmart
shop_id Integer Existing store id
shop_name String Shop address
shop_col1 String Unique identifier of the shop (from SAP or another client's system) sd233
tp_wday String Day of the week (mo, tu, we, th, fr, sa, su) mo
tp_time String Start time of the visit 12:00
tp_time_start String Start time of the working day (for automatic calculation of the visit in the shop) 09:00
tp_time_plus String Delta regarding the last visit 00:15
tp_time_route String
tp_weekno1 Integer Set "0", if the shop is visited every week, if it's not, you should set the frequency in weeks 0
tp_weekno2 Integer Displacement of visits, the calculation method: (number of week in the year)%tp_weekno1==tp_weekno_2 0
tp_plan_minutes Integer Minutes spent in the shop, according to plan 60
tp_route String Route name (every employee may have several routes) 38-722
tp_date_start Date Start date of the route relevance 01.07.2017
tp_date_end Date End date of the route relevance 31.09.2017
merch_* Employee
sv_* Supervisor assigned to the shop


  • If the structure allows to transfer both ID and name, it will be updated and the search by ID will be performed. Or the search by name will be performed and, if the record is not found, it will be created.
  • To find a shop, you should send [city_*+network_*+shop_name] or [shop_id] or [shop_col1].
  • The employee's data structure is described here.
  • If the employee is not in the database, a new record will be created (if create_users == "1") or an error will be returned.
  • The Supervisor field is optional.

Request returns the JSON object with the following fields:

Name Type Description
tp_id Integer Visit plan id