Order to Cash Experience API | SAP and Salesforce Implementation Template
home
This API allows to create order in SAP, obtain all products and product availability by product code from SAP.
POST /orders
This endpoint triggers subflow createOrdersSubFlow which creates the Sales Order to the SAP.
GET /products
This endpoint triggers subflow getProductsSubFlow which obtains all products to the SAP.
GET /availability/{productCode}
This endpoint triggers subflow getProductAvailabilitySubFlow which obtains product availability by product code.
PUT /opportunities/invoices
This endpoint triggers subflow updateOpportunityInvoiceSubFlow which updates invoice number in Salesforce Opportunity based on defined order number.
Look at the included self-descriptive RAML definition and the corresponding flows to learn more about the flows.
SAP iDOC Invoice Flow
This flow automatically updates invoice number in Salesforce Opportunity based on defined order number using by SAP iDOC listener. More details in sapIdoc-invoice.xml file.
License Agreement
Note that using this template is subject to the conditions of this License Agreement.
Please review the terms of the license before downloading and using this template. In short, you are allowed to use the template for free with Mule ESB Enterprise Edition, CloudHub, or as a trial in Anypoint Studio.
Considerations
To make this Anypoint Template run, there are certain preconditions that must be considered. Failing to do so could lead to unexpected behaviour of the template.
APIs security considerations
This Experience API is meant to be deployed to CloudHub and managed using the API Platform Manager.
Run it!
Simple steps to get Order2Cash Order Experience API running.
See below.
Running on premise
In this section we detail the way you should run your Anypoint Template on your computer.
Where to Download Anypoint Studio and Mule ESB
First thing to know if you are a newcomer to Mule is where to get the tools.
Importing an Anypoint Template into Studio
Anypoint Studio offers several ways to import a project into the workspace, for instance:
- Anypoint Studio generated Deployable Archive (.jar)
- Anypoint Studio Project from External Location
You can find a detailed description on how to do so in this Documentation Page.
Running on Studio
Once you have imported you Anypoint Template into Anypoint Studio you need to follow these steps to run it:
- Locate the properties file
mule.dev.properties
, in src/main/resources - Complete all the properties required as per the examples in the section Properties to be configured
- Once that is done, right click on you Anypoint Template project folder
- Hover your mouse over
"Run as"
- Click on
"Mule Application"
Running on Mule ESB stand alone
Complete all properties in one of the property files, for example in mule.prod.properties and run your app with the corresponding environment variable to use it. To follow the example, this will be mule.env=prod
.
Running on CloudHub
While creating your application on CloudHub (Or you can do it later as a next step), you need to go to "Manage Application"
> "Properties"
to set all environment variables detailed in Properties to be configured.
Follow other steps defined here and once your app is all set and started, there is no need to do anything else.
Deploying your Anypoint Template on CloudHub
Anypoint Studio provides you with really easy way to deploy your Template directly to CloudHub, for the specific steps to do so please check this link
Properties to be configured (With examples)
In order to use this Mule Anypoint Template you need to configure properties (Credentials, configurations, etc.) either in properties file or in CloudHub as Environment Variables.
Detailed list with examples:
Application Configuration
- http.port
8081
- api.basePath
/api/*
- console.basePath
/console/*
Order Process API
- order.process.api.host
order.process.api.host.com
- order.process.api.port
80
- order.process.api.base.path
/api
- order.process.api.protocol
HTTP
Order System API
- order.system.api.host
order.system.api.host.com
- order.system.api.port
80
- order.system.api.base.path
/api
- order.system.api.protocol
HTTP
SAP configuration
- sap.jco.ashost
your.sap.address.com
- sap.jco.user
SAP_USER
- sap.jco.passwd
SAP_PASSWORD
- sap.jco.client
600
- sap.jco.sysnr
11
- sap.jco.lang
EN
SAP IDoc Configuration
- sap.jco.operationtimeout
10000
- sap.jco.connectioncount
2
- sap.jco.gwhost
your.sap.address.com
- sap.jco.gwservice
gwService
- sap.jco.idoc.programid
PROGRAM_ID