Sunday, September 29, 2024

Recurring Integrations Import through postman

 Scenario:-Today in this blog we will see import a file through recurring integrations through postman.

Step1:-Go to D365fo Data management workspace and create  a Import Data Project as shown in below

Click on create Recurring jobs

Step2:-Then give name ,description, Application Id which created in Azure, enable all option as shown in below

Step3:-Click on set processing recurrence and choose time ,count.

Step4:-Then click on monitoring recurrence and choose time and count.

Step5:-Then click ok you will see a popup continue click on yes


Now All setup is done in D365fo for importing through recurring integrations

Step6:-Go to postman and generate bearer token as it is mandatory for OData or Package Api for Authorization

Get :-https://login.microsoftonline.com/tenantid/oauth2/token 

 

Body:- formdata 

 

a) tenant_id  

b) client_id –  

c) client_secret –  
d) grant_type – client_credentials 
e) resource – enter D365FO environment URL (note it should not end with /) 

 

Output:- 

{ 

    "token_type""Bearer", 

    "expires_in""3599", 

    "ext_expires_in""3599", 

    "expires_on""1723463000", 

    "not_before""1723459100", 

    "access_token""eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IktRMnRBY3JFN2xCYVZWR0JtYzVGb2JnZEpvNCIsImtpZCI6IktRMnRBY3JFN2xCYVZWR0JtYzVGb2JnZEpvNCJ9.eyJhdWQiOiJodHRwczovL3RyaWFsLXpwZ3l2ay50cmlhbC5vcGVyYXRpb25zLmR5bmFtaWNzLmNvbS8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9jYTA2YTExMC1mYzMwLTQ3ZTUtOWRkNC03MThkNWQ0YzQyNDQvIiwiaWF0IjoxNzIzNDU5MTAwLCJuYmYiOjE3MjM0NTkxMDAsImV4cCI6MTcyMzQ2MzAwMCwiYWlvIjoiRTJkZ1lEaW5WelN6T2o1LzZaSHN2Y212UHA0eEFnQT0iLCJhcHBpZCI6IjQ5ZjAxNWI5LWQ1MzMtNDdlNi1iYTI2LTc3MGZlMTU3Y2NjMyIsImFwcGlkYWNyIjoiMSIsImlkcCI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2NhMDZhMTEwLWZjMzAtNDdlNS05ZGQ0LTcxOGQ1ZDRjNDI0NC8iLCJpZHR5cCI6ImFwcCIsIm9pZCI6IjYyNGE1MDBiLTk3ODItNDk1ZC1hMWQ1LTc4YTNkYTg2MTg2OSIsInJoIjoiMC5BU29BRUtFR3lqRDg1VWVkMUhHTlhVeENSQlVBQUFBQUFBQUF3QUFBQUFBQUFBQXFBQUEuIiwic3ViIjoiNjI0YTUwMGItOTc4Mi00OTVkLWExZDUtNzhhM2RhODYxODY5IiwidGlkIjoiY2EwNmExMTAtZmMzMC00N2U1LTlkZDQtNzE4ZDVkNGM0MjQ0IiwidXRpIjoiZXdQWWU3S2hoVXllS0dURGgtS1VBQSIsInZlciI6IjEuMCIsInhtc19pZHJlbCI6IjcgMiJ9.kNDAndZRZgwN-78gPl3aSHW-A7am5hSALHrqDJpwJBITgXePf2BtbqkyMYV6H_T_vlCp2nCymEFrSbJJFihGQ1f5xiuth9vjLasSm1sH5mK2Gr8t7Y78YEdjYnABI0NIIrHBug__aEGdB-eAd7zBmI_rZ9f1ca4UBHxlrjskZCB6hoEjO44v0_eisWTwU5o6no6GI8ZrpAbDiNkqpiZMwwfh6JJfm9SQwq1k_rTFhyGQ8lg19zofxy4l29IMw4-kwTqQYN5_JeEiZCxVbsJ2WjUJpLzKNpabyDe859Vr9HQe1MwSAZHfgvvPF3020po9hrhznewHkOGmKKOGZyzrNQ" 

} 

 


Step7:-Choose next request for importing package into D365fo and in authorization choose bearer token and paste token generated in before step

POST :- https://trial-rh4cr1.trial.operations.dynamics.com/api/connector/enqueue/{59B7CEE6-71C3-4DB6-8101-415E5CF11C00}?entity=Customer groups

Note :-In body section in binary upload file you want to import into D365fo

After sending request you can see message id below.

Step8:-Go back to D365fo Import Data project and click on manage under three dots as you cant see it default then click on mange recurring data jobs

Step9:-Click on manage messages and filter by message id you got in post man before step 

You can see status processed 

Step10:-You can go to Account receivable>Customer Groups and check for new entry's

Note:-If you have previous Customer group that exists in D365fo then record gets update if its new it will inserted

 You can see new record inserted in Customer Groups

Step11:-If you want to check status in postman itself you can send  a new post request

Post:- https://trial-rh4cr1.trial.operations.dynamics.com/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetMessageStatus

In body :-

{
    "messageId":"b71aae14-6023-4bff-8f21-a7040d780d6d"
}

Once you send request you can status below



Thank you 

Keep Daxing!!


No comments:

Post a Comment

To align controls in horizontal in form

 Scenario:- To align controls in horizontal in form  To do this Please take a group control and add all controls and change property  for gr...