|
| 1 | += Using Anypoint Code Builder to Configure Agentforce Connector 1.2 |
| 2 | + |
| 3 | +include::connectors::partial$configure-acb-connectors-partial.adoc[tag="acb-connector-config-intro"] |
| 4 | + |
| 5 | +[[create-new-integration-project]] |
| 6 | +== Create a New Integration Project |
| 7 | + |
| 8 | +include::connectors::partial$configure-acb-connectors-partial.adoc[tag="acb-create-integration-project"] |
| 9 | + |
| 10 | +[[add-components-to-project]] |
| 11 | +== Add Components to Your Project |
| 12 | + |
| 13 | +include::connectors::partial$configure-acb-connectors-partial.adoc[tag="acb-add-components-to-project"] |
| 14 | + |
| 15 | +[[configure-http-trigger]] |
| 16 | +== Configure the Trigger For the Flow |
| 17 | + |
| 18 | +include::connectors::partial$configure-acb-connectors-partial.adoc[tag="acb-configure-source"] |
| 19 | + |
| 20 | +[[add-connector-to-project]] |
| 21 | +== Add the Connector to Your Integration Project |
| 22 | + |
| 23 | +. In the Explorer view, open the configuration XML file for your project, such as `my-project-name.xml`. |
| 24 | +. Click the image:anypoint-code-builder::icon-tree-view.png["Show Mule graphical mode icon",15,15] (*Show Mule graphical mode*) icon in the activity bar to open the canvas UI if it doesn't open automatically. |
| 25 | +. Add the connector the same way you added other components from the canvas UI: |
| 26 | +.. In the canvas UI, click the image:anypoint-code-builder::icon-plus.png["Add component icon",15,15] (*Add component*) icon. |
| 27 | +.. In the *Add Component* panel, click *Connectors*. |
| 28 | +. Click the image:anypoint-code-builder::icon-search-exchange.png["Search in Exchange icon",15,15] (*Search in Exchange*) toggle: |
| 29 | ++ |
| 30 | +image:anypoint-code-builder::int-connector-search-exchange.png["Search in Exchange toggle"] |
| 31 | +. Enter `agentforce` in the search box. |
| 32 | +. Select the connector to add it to your project. |
| 33 | + |
| 34 | +Adding a connector to an integration project doesn't make that connector available to other projects in your Anypoint Code Builder workspace. |
| 35 | + |
| 36 | +[[add-global-config]] |
| 37 | +== Add a Global Configuration |
| 38 | + |
| 39 | +. In the configuration XML, place your cursor before the `<flow/>` element and type `agentforce`. |
| 40 | ++ |
| 41 | +Ensure that the cursor is not inside the `<flow/>` element. |
| 42 | +. Select the `ms-agentforce:config` snippet: |
| 43 | ++ |
| 44 | +The snippet adds the following code: |
| 45 | ++ |
| 46 | +[source,xml] |
| 47 | +---- |
| 48 | +<ms-agentforce:config clientId="#[]" clientSecret="#[]" /> |
| 49 | +---- |
| 50 | +. Add the attributes to complete the configuration, for example: |
| 51 | ++ |
| 52 | +[source,xml] |
| 53 | +---- |
| 54 | +<ms-agentforce:config name="Agentforce_Config" doc:name="Agentforce Config" doc:id="e3428ee2-d4ee-47dc-ba7e-30073f69165e" > |
| 55 | + <ms-agentforce:oauth-client-credentials-connection > |
| 56 | + <ms-agentforce:oauth-client-credentials clientId="clientid" clientSecret="supersecret" /> |
| 57 | + </ms-agentforce:oauth-client-credentials-connection> |
| 58 | +</ms-agentforce:config> |
| 59 | +---- |
| 60 | ++ |
| 61 | +This example shows a flow named "Define_Prompt" with two global elements defined (`http:listener-config` and `ms-agentforce:config`) |
| 62 | ++ |
| 63 | +[source,xml] |
| 64 | +---- |
| 65 | + <http:listener-config basePath="/path" name="HTTP-Listener-config"> |
| 66 | + <http:listener-connection host="0.0.0.0" port="8081"> |
| 67 | + </http:listener-connection> |
| 68 | + </http:listener-config> |
| 69 | + <ms-agentforce:config name="Agentforce_Config" doc:name="Agentforce Config" doc:id="e3428ee2-d4ee-47dc-ba7e-30073f69165e" > |
| 70 | + <ms-agentforce:oauth-client-credentials-connection > |
| 71 | + <ms-agentforce:oauth-client-credentials clientId="clientid" clientSecret="supersecret" /> |
| 72 | + </ms-agentforce:oauth-client-credentials-connection> |
| 73 | + </ms-agentforce:config> |
| 74 | + <flow name="Define_Prompt"> |
| 75 | +---- |
| 76 | + |
| 77 | +== Configure Additional Connector Fields |
| 78 | + |
| 79 | +After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector actions you use. |
| 80 | + |
| 81 | +For more information about configuring Agentforce Connector actions, see xref:configuring-agent-operations.adoc[]. |
| 82 | + |
| 83 | +== See Also |
| 84 | + |
| 85 | +* xref:connectors::introduction/introduction-to-anypoint-connectors.adoc[] |
| 86 | +* xref:agentforce-connector-reference.adoc[Agentforce Connector Reference] |
| 87 | +* xref:configuring-agent-operations.adoc[] |
| 88 | +* https://help.mulesoft.com[MuleSoft Help Center] |
0 commit comments