{"id":38547,"date":"2026-05-14T22:47:02","date_gmt":"2026-05-14T20:47:02","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=38547"},"modified":"2026-05-14T22:47:02","modified_gmt":"2026-05-14T20:47:02","slug":"prompt-per-la-creazione-di-action-link-per-limportazione-di-una-anagrafica-cliente-fornitore","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/prompt-per-la-creazione-di-action-link-per-limportazione-di-una-anagrafica-cliente-fornitore\/","title":{"rendered":"Prompt per la creazione di Action Link per l&#8217;importazione di una anagrafica cliente\/fornitore"},"content":{"rendered":"<p>Il seguente prompt crea un action link che viene chiamato da un servizio esterno che nel payload passa un JSON contente un cliente o fornitore.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\">Crea un action link che prende questo payload e assegna i seguenti campi della tabella CLIFOR\r\n\r\nCODICE --&gt; CardCode \r\nRAGSOC --&gt; CardName\r\nCLIENTE --&gt; True se  \"CardType\" \u00e8 \"cCustomer\"\r\nFORNITORE --&gt; True se  \"CardType\":\u00e8 \"cSupplier\",\r\ndell'array \"BPAddresses prendi quello che ha AddressName uguale al codice inserito in \"BilltoDefault\": e assegna:\r\nVIA --&gt; \"Street\":\r\nCAP --&gt; StreetCode \r\nCITTA --&gt;  \"City\"\r\nNAZIONE --&gt; \"Country\"\r\nPIVA --&gt; \"FederalTaxID\"\r\n\r\nQuesto \u00e8 il payload\r\n{\r\n        \"CardCode\": \"V70010\",\r\n        \"CardName\": \"Pulizie Splendid\",\r\n        \"CardType\": \"cSupplier\", \/\/ \"cCustomer\"\r\n        \"FederalTaxID\": \"IT03231260161\",\r\n        \"Valid\": \"tYES\",\r\n        \"Frozen\": \"tNO\",\r\n        \"ShipToDefault\": \"SPLENDID\",\r\n        \"BilltoDefault\": \"SPLENDID\",\r\n        \"BPAddresses\": [\r\n          {\r\n            \"AddressName\": \"SPLENDID\",\r\n            \"Street\": \"PIAVE\",\r\n            \"Block\": null,\r\n            \"ZipCode\": null,\r\n            \"City\": \"BIELLA\",\r\n            \"County\": null,\r\n            \"Country\": \"IT\",\r\n            \"BuildingFloorRoom\": \"\",\r\n            \"AddressType\": \"bo_BillTo\",\r\n            \"AddressName2\": null,\r\n            \"AddressName3\": null,\r\n            \"StreetNo\": null,\r\n            \"TaxOffice\": null\r\n          },\r\n          {\r\n            \"AddressName\": \"SPLENDID\",\r\n            \"Street\": \"PIAVE\",\r\n            \"Block\": null,\r\n            \"ZipCode\": null,\r\n            \"City\": \"BIELLA\",\r\n            \"County\": null,\r\n            \"Country\": \"IT\",\r\n            \"BuildingFloorRoom\": \"\",\r\n            \"AddressType\": \"bo_ShipTo\",\r\n            \"AddressName2\": null,\r\n            \"AddressName3\": null,\r\n            \"StreetNo\": null,\r\n            \"TaxOffice\": null\r\n          }\r\n        ],\r\n      },.<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Il seguente prompt crea un action link che viene chiamato da un servizio esterno che nel payload passa un JSON contente un cliente o fornitore. Crea un action link che prende questo payload e assegna i seguenti campi della tabella CLIFOR CODICE &#8211;&gt; CardCode RAGSOC &#8211;&gt; CardName CLIENTE &#8211;&gt; True se &#8220;CardType&#8221; \u00e8 &#8220;cCustomer&#8221; FORNITORE&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[86],"tags":[284],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/38547"}],"collection":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=38547"}],"version-history":[{"count":1,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/38547\/revisions"}],"predecessor-version":[{"id":38548,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/38547\/revisions\/38548"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=38547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=38547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=38547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}