Publish Stamps to Dynamics 365
publish_to_dataverseMicrosoft Copilot (Entra sign-in): writes stamped point-layer columns back to Dynamics 365 accounts keyed by accountid (1:1 Account PATCH). Needs map_session_id or ts_handle. territory_id / territory_label are computed at publish for one alignment (tal_id, default the active TAL; result stamped_tal_id). Points also carry part_id, calculate_route (route_id, route_label, stop_sequence), schedule_visits (schedule_id, visit_count, schedule_days, schedule_dates, contractor_id, contractor_label), isochrone_build (isochrone_tal_id, isochrone_ids, isochrone_labels, isochrone_count), and cluster_points (group_id, group_label). A <point_layer>_visits layer resolves to its 1:1 parent account layer and maps schedule_day/date to schedule_days/dates. field_map maps point columns to Dynamics account logical attributes (primitive columns or territoryid / ownerid lookups by name or GUID). confirm=false (default) or no field_map is a read-only preflight: status=confirmation_required, stamped_columns, candidate_target_attributes, preview_updates, ask_user. confirm=true queues the batch PATCH task.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "publish_to_dataverse"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tal_id | No | Alignment whose territory_id / territory_label are published. Defaults to the active TAL. | |
| confirm | No | False (default) runs the read-only preflight to preview matched accounts and validate attributes/lookups. True dispatches the batch PATCH job after user confirmation. | |
| field_map | No | Map of stamped point column -> Dynamics 365 account logical attribute name (e.g. {'territory_label': 'territoryid', 'route_label': 'new_routename'}). When absent, the preflight lists stamped_columns and candidate_target_attributes. | |
| ts_handle | No | Territory Solution reference (tsh_...) from a build, ingest_accounts, import_geojson, import_designer_project, or get_map_visualization; Territory Solutions are not accepted inline. | |
| point_layer | No | Source point layer in the Territory Solution (default 'accounts'). A <point_layer>_visits layer resolves to its 1:1 parent account layer. | accounts |
| map_session_id | No | Open map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set. | |
| environment_url | No | Dynamics 365 environment (e.g. https://contoso.crm.dynamics.com). Defaults to the environment the point layer was imported from, or the user's sole environment. | |
| include_unassigned | No | When true, accounts with an empty/unassigned stamp clear the target Dynamics attribute to null. Default false updates accounts with non-empty stamped values. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | Present when ok is false. | |
| result | No | Present when ok is true. A submission returns the task reference (task_id, next_action, sleep_ms); the completed task result carries the remaining fields. | |
| warnings | No |