{"id":2671,"date":"2025-02-12T15:25:10","date_gmt":"2025-02-12T14:25:10","guid":{"rendered":"https:\/\/france.magicsoftware.com\/blog\/?p=2671"},"modified":"2025-03-21T17:30:21","modified_gmt":"2025-03-21T16:30:21","slug":"copilot-agent-magic-xpi","status":"publish","type":"post","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/copilot-agent-magic-xpi\/","title":{"rendered":"Copilot Conversational Agent &#8211; Magic xpi"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Goal  <\/strong>: Process user requests, fetch or update data and provide real-time responses using conversational interface via a specialized declarative agent and your Magic xpi Platform<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG45-1024x576.png\" alt=\"\" class=\"wp-image-2898\" style=\"width:665px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG45-1024x576.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG45-300x169.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG45-768x432.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG45.png 1446w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Prerequisites <\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Microsoft tenant with your admin user or user that have enough rights to publish and allow custom upload apps<\/li>\n\n\n\n<li>Copilot For Microsoft 365 License (1 user for test)<\/li>\n\n\n\n<li>Microsoft 365 Business Basic License (1 user for test)<\/li>\n\n\n\n<li>Visual Code with Teams Toolkit plugin installed<\/li>\n<\/ul>\n\n\n\n<p>1\/ Open your Magic xpi Studio<\/p>\n\n\n\n<p>Create an HTTP trigger with 1 method (GetOrderDetail) with 1 argument (OrderNum)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"277\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG6-1024x277.png\" alt=\"\" class=\"wp-image-2697\" style=\"width:693px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG6-1024x277.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG6-300x81.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG6-768x208.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG6.png 1204w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>2\/ Design a Flow that retrieves the detail of the order according to OrderNum parameter and answers a JSON message with the related information<\/p>\n\n\n\n<p>(*) In my case, i&rsquo;m retrieving the detail of the order from a <strong>Prestashop system<\/strong> via MySQL Database<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"850\" height=\"597\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG7.png\" alt=\"\" class=\"wp-image-2699\" style=\"width:458px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG7.png 850w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG7-300x211.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG7-768x539.png 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/figure>\n\n\n\n<p>My step mapper (get Order det. from Prestashop) should be like this (for my case)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"996\" height=\"309\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG8.png\" alt=\"\" class=\"wp-image-2701\" style=\"width:652px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG8.png 996w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG8-300x93.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG8-768x238.png 768w\" sizes=\"auto, (max-width: 996px) 100vw, 996px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"290\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG9-1024x290.png\" alt=\"\" class=\"wp-image-2703\" style=\"width:844px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG9-1024x290.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG9-300x85.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG9-768x218.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG9-1536x435.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG9.png 1871w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>3\/ Build the Json response<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"652\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG10.png\" alt=\"\" class=\"wp-image-2706\" style=\"width:457px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG10.png 969w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG10-300x202.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG10-768x517.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/figure>\n\n\n\n<p>4\/ Build and start your project.<\/p>\n\n\n\n<p>5\/ Check with Postman that you can trigger the Magic xpi Flow by passing the orderNum<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"480\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG11-1024x480.png\" alt=\"\" class=\"wp-image-2708\" style=\"width:545px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG11-1024x480.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG11-300x141.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG11-768x360.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG11.png 1290w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>5\/ Start your Visual Code and install the Teams Toolkit plugin<\/p>\n\n\n\n<p>Menu: View=&gt;Extensions =&gt;enter <strong>Teams Toolkit<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"524\" height=\"545\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG3-1.png\" alt=\"\" class=\"wp-image-2817\" style=\"width:319px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG3-1.png 524w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG3-1-288x300.png 288w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/figure>\n\n\n\n<p>6\/ After installation, sign on <a href=\"https:\/\/admin.teams.microsoft.com\" title=\"\">https:\/\/admin.teams.microsoft.com<\/a><\/p>\n\n\n\n<p><strong>Allow Upload Custom App<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"823\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG4-1.png\" alt=\"\" class=\"wp-image-2820\" style=\"width:405px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG4-1.png 898w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG4-1-300x275.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG4-1-768x704.png 768w\" sizes=\"auto, (max-width: 898px) 100vw, 898px\" \/><\/figure>\n\n\n\n<p>Go back to Visual Code, choose on the left menu Teams Toolkit<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"663\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG5-2.png\" alt=\"\" class=\"wp-image-2822\" style=\"width:490px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG5-2.png 622w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG5-2-281x300.png 281w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/figure>\n\n\n\n<p>Sign in with your admin user on the menu Accounts.<\/p>\n\n\n\n<p><strong>!! You should check that these 2 options below are enabled:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Custom App Upload Enabled<\/li>\n\n\n\n<li>Copilot Access Enabled<\/li>\n<\/ul>\n\n\n\n<p>(*) Copilot Access Enabled can be delayed to be activated (24h)<\/p>\n\n\n\n<p>7\/ At this point, you need to get a Magic xpi Yaml file from your endpoints<\/p>\n\n\n\n<p>You can use Postman for that.<\/p>\n\n\n\n<p>8\/ Go Back to your visual code<\/p>\n\n\n\n<p>Choose TeamsToolkit menu and create a Declarative Agent<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"305\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG16-1-1024x305.png\" alt=\"\" class=\"wp-image-2832\" style=\"width:724px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG16-1-1024x305.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG16-1-300x89.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG16-1-768x229.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG16-1.png 1255w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Choose Addplugin=&gt;Start With OpenApi Description Document&gt;browser and give your yaml file<\/p>\n\n\n\n<p>Make your changes in the project.<\/p>\n\n\n\n<p>You can use snippet UI (<a href=\"http:\/\/adaptivecards.io\" title=\"\">adaptivecards.io<\/a>) to handle the Magic xpi JSON response.<\/p>\n\n\n\n<p>9\/ Provision the project and if it&rsquo;s ok then Publish your agent (apps)<\/p>\n\n\n\n<p>Menu LIFECYCLE =&gt; Provision<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"498\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG21-1024x498.png\" alt=\"\" class=\"wp-image-2836\" style=\"width:756px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG21-1024x498.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG21-300x146.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG21-768x373.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG21.png 1237w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"422\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG22-1-1024x422.png\" alt=\"\" class=\"wp-image-2838\" style=\"width:764px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG22-1-1024x422.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG22-1-300x124.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG22-1-768x317.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG22-1-1536x633.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG22-1.png 1804w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"388\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG23-1-1024x388.png\" alt=\"\" class=\"wp-image-2841\" style=\"width:931px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG23-1-1024x388.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG23-1-300x114.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG23-1-768x291.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG23-1-1536x582.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG23-1.png 1872w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>10\/ Go to your teams admin portal<\/p>\n\n\n\n<p>You must approve the pending custom apps (if it&rsquo;s newly created you should see 1 in Submitted custom apps)<\/p>\n\n\n\n<p>The first time, App Status should be \u00ab\u00a0Blocked\u00a0\u00bb, you must have \u00ab\u00a0Allowed\u00a0\u00bb<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"127\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG30-1024x127.png\" alt=\"\" class=\"wp-image-2765\" style=\"width:793px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG30-1024x127.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG30-300x37.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG30-768x96.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG30.png 1174w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"171\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG40-1024x171.png\" alt=\"\" class=\"wp-image-2844\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG40-1024x171.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG40-300x50.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG40-768x128.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG40.png 1450w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Choose Publish by clicking on the agent below<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"599\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG25-1024x599.png\" alt=\"\" class=\"wp-image-2746\" style=\"width:515px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG25-1024x599.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG25-300x176.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG25-768x450.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG25.png 1242w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>7\/ Go to your Copilot prompt<\/p>\n\n\n\n<p>Select You agent on the Right pane<\/p>\n\n\n\n<p>On the prompt: you can ask your question in french or english to get the order total and more<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"567\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG26-1-1024x567.png\" alt=\"\" class=\"wp-image-2752\" style=\"width:796px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG26-1-1024x567.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG26-1-300x166.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG26-1-768x425.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG26-1.png 1165w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"454\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG29-1024x454.png\" alt=\"\" class=\"wp-image-2754\" style=\"width:802px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG29-1024x454.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG29-300x133.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG29-768x340.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG29.png 1230w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The first time you ask your question, you should receive this message related to your agent and you have to authorize (\u00ab\u00a0Always allow\u00a0\u00bb or \u00ab\u00a0Allow Once\u00a0\u00bb)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"464\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG28-1024x464.png\" alt=\"\" class=\"wp-image-2756\" style=\"width:641px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG28-1024x464.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG28-300x136.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG28-768x348.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG28.png 1205w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>15\/ You can handle exception in the Magic process if the order is not found <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"430\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG32.png\" alt=\"\" class=\"wp-image-2777\" style=\"width:625px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG32.png 920w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG32-300x140.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG32-768x359.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p>or if there is no delivery date then, you can get :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"835\" height=\"431\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG33.png\" alt=\"\" class=\"wp-image-2779\" style=\"width:627px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG33.png 835w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG33-300x155.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG33-768x396.png 768w\" sizes=\"auto, (max-width: 835px) 100vw, 835px\" \/><\/figure>\n\n\n\n<p>8\/ If you enter a sentence without giving the Order Number then Copilot will ask you to pass it<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"662\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG34-1024x662.png\" alt=\"\" class=\"wp-image-2781\" style=\"width:680px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG34-1024x662.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG34-300x194.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG34-768x496.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG34.png 1168w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>9\/ You can ask for the order detail as well<\/p>\n\n\n\n<p>Ask for the total first<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG38-1024x461.png\" alt=\"\" class=\"wp-image-2808\" style=\"width:863px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG38-1024x461.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG38-300x135.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG38-768x346.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG38.png 1095w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>then ask for the detail (you don&rsquo;t need to enter the order number) as we are in the same context<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"767\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG39.png\" alt=\"\" class=\"wp-image-2809\" style=\"width:539px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG39.png 652w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG39-255x300.png 255w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/figure>\n\n\n\n<p>(*) You can bind the magic xpi json array to a ColumnSet in the adaptivecard. <\/p>\n\n\n\n<p>10\/ Each time you ask a question on the prompt, a Magic xpi flow is triggered receiving the order num<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"445\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG35-1024x445.png\" alt=\"\" class=\"wp-image-2784\" style=\"width:876px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG35-1024x445.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG35-300x130.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG35-768x334.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG35-1536x667.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG35.png 1685w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>10\/ With this architecture, you can design as many flows as you want in Magic xpi (with any Business rules), expose them in the copilot agent (via yaml file) and interact in a natural language via copilot prompt.<\/p>\n\n\n\n<p>You can retrieve accurate information from your back end system. But you can update it as well, if you have designed a Post Endpoint in Magic xpi.<\/p>\n\n\n\n<p>For example, assume i want to add a Note to an order, then the copilot prompt could be :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG41-1024x588.png\" alt=\"\" class=\"wp-image-2870\" style=\"width:759px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG41-1024x588.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG41-300x172.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG41-768x441.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG41.png 1527w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Because of a POST operation behind, you need to confirm<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"244\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG42-1024x244.png\" alt=\"\" class=\"wp-image-2871\" style=\"width:1011px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG42-1024x244.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG42-300x71.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG42-768x183.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG42-1536x366.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG42.png 1752w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>then you get the response message.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"324\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG43-1024x324.png\" alt=\"\" class=\"wp-image-2872\" style=\"width:995px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG43-1024x324.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG43-300x95.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG43-768x243.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG43-1536x487.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG43.png 1799w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can control the operation on your back end system.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"815\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG44.png\" alt=\"\" class=\"wp-image-2874\" style=\"width:589px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG44.png 1019w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG44-300x240.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG44-768x614.png 768w\" sizes=\"auto, (max-width: 1019px) 100vw, 1019px\" \/><\/figure>\n\n\n\n<p>Don&rsquo;t hesitate to contact me if you are interested to discuss it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal : Process user requests, fetch or update data and provide real-time responses using conversational interface via a specialized declarative agent and your Magic xpi Platform Prerequisites : 1\/ Open your Magic xpi Studio Create an HTTP trigger with 1 method (GetOrderDetail) with 1 argument (OrderNum) 2\/ Design a Flow that retrieves the detail of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2673,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[76,77,4],"tags":[79,78],"class_list":["post-2671","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-copilot","category-magic-xpi","tag-ai","tag-copilot"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/02\/COP_MG1.png","_links":{"self":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=2671"}],"version-history":[{"count":129,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2671\/revisions"}],"predecessor-version":[{"id":2905,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2671\/revisions\/2905"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media\/2673"}],"wp:attachment":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=2671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=2671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=2671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}