Skip to content

Commit 7f16f29

Browse files
committed
Update content and art
1 parent 35b2d3f commit 7f16f29

File tree

4 files changed

+38
-31
lines changed

4 files changed

+38
-31
lines changed

articles/logic-apps/logic-apps-enterprise-integration-flatfile.md

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,67 +7,74 @@ author: divyaswarnkar
77
ms.author: divswa
88
ms.reviewer: jonfan, estfan, logicappspm
99
ms.topic: article
10-
ms.date: 04/28/2020
10+
ms.date: 05/12/2020
1111
---
1212

1313
# Encode and decode flat files in Azure Logic Apps by using the Enterprise Integration Pack
1414

15-
Before you send XML content to a business partner in a business-to-business (B2B) scenario, you might want to encode that content first. By building a logic app, you can use the **Flat File** connector to encode and decode flat files. Your logic app can get this XML content from various sources, such as an HTTP request trigger, another app, or other [connectors supported by Azure Logic Apps](../connectors/apis-list.md). For more information, see [What is Azure Logic Apps](logic-apps-overview.md)?
15+
Before you send XML content to a business partner in a business-to-business (B2B) scenario, you might want to encode that content first. By building a logic app, you can encode and decode flat files by using the **Flat File** connector. Your logic app can get this XML content from various sources, such as the Request trigger, another app, or other [connectors supported by Azure Logic Apps](../connectors/apis-list.md). For more information, see [What is Azure Logic Apps](logic-apps-overview.md)?
1616

1717
## Prerequisites
1818

19-
* An Azure subscription. If you don't have an Azure subscription yet, [sign up for a free Azure account](https://azure.microsoft.com/free/).
19+
* An Azure subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/).
2020

2121
* The logic app where you want to use the **Flat File** connector and a trigger that starts your logic app's workflow. The **Flat File** connector provides only actions, not triggers. You can use either the trigger or another action to feed the XML content into your logic app for encoding or decoding. If you're new to logic apps, review [Quickstart: Create your first logic app](../logic-apps/quickstart-create-first-logic-app-workflow.md).
2222

23-
* An [integration account](../logic-apps/logic-apps-enterprise-integration-create-integration-account.md) that's associated with your Azure subscription and linked to the logic app where you plan to use the **Flat File** connector. Both your logic app and integration account must exist in the same location or Azure region.
23+
* An [integration account](../logic-apps/logic-apps-enterprise-integration-create-integration-account.md) that's associated with your Azure subscription and [linked to the logic app](logic-apps-enterprise-integration-accounts.md#link-account) where you plan to use the **Flat File** connector. Both your logic app and integration account must exist in the same location or Azure region.
2424

25-
* A flat file [schema]() that you use for encoding or decoding the XML content
25+
* A flat file [schema](logic-apps-enterprise-integration-schemas.md) that you've uploaded to your integration account for encoding or decoding the XML content
2626

27-
* At least two [trading partners](../logic-apps/logic-apps-enterprise-integration-partners.md) that you've already defined in your integration account.
27+
* At least two [trading partners](logic-apps-enterprise-integration-partners.md) that you've already defined in your integration account
2828

2929
## Add flat file encode action
3030

31-
1. Create a logic app and [link it to your integration account](logic-apps-enterprise-integration-accounts.md "Learn to link an integration account to a Logic app"). This account contains the schema you will use to encode the XML data.
31+
1. In the [Azure portal](https://portal.azure.com), open your logic app in the Logic App Designer.
3232

33-
1. In the Logic App Designer, add the **When an HTTP request is received** trigger to your logic app.
33+
1. Under the trigger or action in your logic app, select **New step** > **Add an action**. This example uses the Request trigger, which is named **When a HTTP request is received**, and handles inbound requests from outside the logic app.
3434

35-
1. Add the flat file encoding action, as follows:
35+
This example uses the following JSON schema that describes the payload from the inbound request:
3636

37-
a. Select the **plus** sign.
37+
```json
38+
{
39+
"type": "object",
40+
"properties": {
41+
"member": {
42+
"type": "string"
43+
}
44+
}
45+
}
46+
```
3847

39-
b. Select the **Add an action** link (appears after you have selected the plus sign).
40-
41-
c. In the search box, enter *Flat* to filter all the actions to the one that you want to use.
48+
```xml
49+
{
50+
"member": "<member><firstName>Sophia</firstName><lastName>Owen</lastName><address><street>123456 Any Street</street><city>Any Town</city><state>Any State</state><postalCode>10000</postalCode></address></member>"
51+
}
4252

43-
d. Select the **Flat File Encoding** option from the list.
53+
1. Under **Choose an action**, enter `flat file`. From the actions list, select this action: **Flat File Encoding**
4454

45-
![Screenshot of Flat File Encoding option](media/logic-apps-enterprise-integration-flatfile/flatfile-2.png)
55+
![Select "Flat File Encoding" action](./media/logic-apps-enterprise-integration-flatfile/select-flat-file-encoding.png)
4656

47-
1. On the **Flat File Encoding** dialog box, select the **Content** text box.
57+
1. Click inside the **Content** box so that the dynamic content list appears. From the list, in the **When a HTTP request is received** section, select the **Body** property, which contains the request body output from the trigger and the content to encode.
4858

49-
![Screenshot of Content text box](media/logic-apps-enterprise-integration-flatfile/flatfile-3.png)
59+
![Select content to encode from dynamic content list](./media/logic-apps-enterprise-integration-flatfile/select-content-to-encode.png)
5060

51-
1. Select the body tag as the content that you want to encode. The body tag will populate the content field.
61+
> [!TIP]
62+
> If you don't see the **Body** property in the dynamic content list,
63+
> select **See more** next to the **When a HTTP request is received** section label.
5264

53-
![Screenshot of body tag](media/logic-apps-enterprise-integration-flatfile/flatfile-4.png)
54-
55-
1. Select the **Schema Name** list box, and choose the schema you want to use to encode the input content.
56-
57-
![Screenshot of Schema Name list box](media/logic-apps-enterprise-integration-flatfile/flatfile-5.png)
58-
59-
1. Save your work.
65+
1. From the **Schema Name** list, select the schema that's in your linked integration account to use for encoding.
6066

61-
![Screenshot of Save icon](media/logic-apps-enterprise-integration-flatfile/flatfile-6.png)
67+
![Select schema to use for encoding](./media/logic-apps-enterprise-integration-flatfile/select-schema-for-encoding.png)
6268

63-
At this point, you are finished setting up your flat file encoding connector. In a real world application, you may want to store the encoded data in a line-of-business application, such as Salesforce. Or you can send that encoded data to a trading partner. You can easily add an action to send the output of the encoding action to Salesforce, or to your trading partner, by using any one of the other connectors provided.
69+
> [!NOTE]
70+
> If no schema appears in the list, your integration account doesn't contain any schema files to use for encoding.
71+
> Upload the schema that you want to use to your integration account.
6472

65-
You can now test your connector by making a request to the HTTP endpoint, and including the XML content in the body of the request.
73+
1. Save your logic app. To test your connector, make a request to the HTTPS endpoint, which appears in the Request trigger's **HTTP POST URL** property, and include XML content in the body of the request.
6674

67-
## Create the flat file decoding connector
75+
You're now done with setting up your flat file encoding action. In a real world app, you might want to store the encoded data in a line-of-business (LOB) app, such as Salesforce. Or, you can send the encoded data to a trading partner. To send the output from the encoding action to Salesforce or to your trading partner, use the other [connectors available in Azure Logic Apps](../connectors/apis-list.md).
6876

69-
> [!NOTE]
70-
> To complete these steps, you need to have a schema file already uploaded into you integration account.
77+
## Add flat file decode action
7178

7279
1. In the Logic App Designer, add the **When an HTTP request is received** trigger to your logic app.
7380

34.8 KB
Loading
60.4 KB
Loading
17.1 KB
Loading

0 commit comments

Comments
 (0)