Accelerator B2B Orders Process API - Implementation Template
home
This asset is a component of MuleSoft Accelerator for Salesforce OMS, which enables customers to extend and integrate OMS with external business partners and application ecosystems leveraging Anypoint platforms application and B2B Integration capabilities. The solution provides customers with an accelerated jump start to implement EDI messaging and other application integrations around Salesforce OMS.
The solution includes pre-built APIs, connectors, and integration templates that help unlock business-critical data from external systems and guide you in adopting best practices synthesized from thousands of customer implementations. Use these assets as is or extend them to meet your company’s unique needs.
Overview
This integration template implements the Accelerator B2B Orders Process API specification. It supports the following functionalities:
- Create purchase orders in downstream systems
- Create payments for a sales order in downstream systems
- Handles OrderAllocatedEvent, OrderShippedEvent and OrderInvoicedEvent messages
- Publishes order event messages to Slack channel
Getting started
The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications. |
Once your workstation has been set up and the application template imported into Anypoint Studio, proceed with the Prerequisites section.
Prerequisites
This implementation template has the following requirements:
- Accelerator Salesforce OMS System API
- Accelerator B2B Simulator Process API
- Accelerator Slack System API
- Message flows in Partner Manager
- Slack channel to receive order events
Please review the use cases described on the MuleSoft Accelerators solution pages for more information about dependencies on other APIs and services.
API dependencies
The following table lists all endpoints used by this API.
API name | Endpoint | Action |
---|---|---|
Accelerator Salesforce OMS System API | post:/purchaseOrders | Create purchase orders in Salesforce OMS |
Accelerator Salesforce OMS System API | post:/shipments | Create shipments for a sales order in Salesforce OMS |
Accelerator Salesforce OMS System API | post:/payments | Create payments for a sales order in Salesforce OMS |
Accelerator Slack System API | post:/messages | Send messages to a Slack channel |
Accelerator B2B Simulator Process API | post:/notices | Send an outbound Order notice |
B2B Partner Manager Inbound API | post:/messages/out-src-purchase-order-ack-cim | Send Purchase Order Acknowledgement to Partner Manager |
B2B Partner Manager Inbound API | post:/messages/out-src-shipment-notice-cim | Send Shipment Notice to Partner Manager |
B2B Partner Manager Inbound API | post:/messages/out-src-invoice-cim | Send Invoice Notice to Partner Manager |
Anypoint MQ destinations
In addition to the Anypoint MQ client application credentials, the following destinations must be created and made accessible to this API:
- accel-b2b-orders-update-queue
The Accelerator B2B Common Resources asset contains a Postman collection, which can be used to create the destinations and client application required for use by accelerator applications.
Deployment
Each Accelerator implementation template in Exchange includes Bash and Windows scripts for building and deploying the APIs to CloudHub. These scripts depend on repositories, global settings, deployment profiles, and associated properties configured in the Maven settings.xml
file.
For additional details, please refer to the Application Deployment section of the Getting Started Guide.
Preparation
Ensure the Maven profile CloudHub-DEV
has been properly configured in your settings.xml
file. In particular, make sure the common properties for your environment have been provided (e.g., Anypoint Platform client ID and secret).
Required property overrides
Many templates can also be run from Anypoint Studio without having to customize the Run/Debug profiles. However, some templates make use of hidden deployment properties to protect sensitive information (e.g., passwords and secret keys). These properties must be supplied to the runtime by updating the configuration profile and adding them as VM arguments. At a minimum, the following properties must be customized to reflect the target deployment environment.
Property Name | Description |
---|---|
api.autodiscoveryID | Required if using API Manager to secure this API |
anypoint-mq.server-url | Anypoint MQ Server Url |
anypoint-mq.client-id | Anypoint MQ Client Id |
anypoint-mq.client-secret | Anypoint MQ Client Secret |
oms-sys-api.host | Host name of the Salesforce OMS System APIs |
slack-sys.host | Host name of the Slack System API |
b2b-simulator-prc-api.host | Host name of the B2B Simulator Process API |
b2b-partner-manager-inbound-api.host | Hostname of the Partner Manager Inbound API |
b2b-partner-manager-inbound-api.supplier-id | The Identifier of the Supplier. This is set as "MYTHICAL" |
notifications.slack-channel-name | The name of the slack channel to which the order event messages will be delivered |
notifications.b2b-org-host-name | Hostname of the Salesforce OMS Org |
Testing
Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a Postman collection in the src/test/resources
folder. Update the collection variable(s) after successful import.
Additional resources
- The Data mappings tab describes how the request and response data structures are mapped between the API interfaces.
- Refer to the Accelerators documentation home for more information about the MuleSoft Accelerators.