Skip to main content

Estimación de tiempo

Call Integration Procedures and Confirm the Update

Add Integration Procedure Actions

Now that you have configured the screens to show and collect data from users, it’s time to invoke Integration Procedures to perform specific data operations.

To do this, you use an Integration Procedure action to call the Process Customer Order Integration Procedure you built in the Order and Country Data Processing with Omnistudio Integration Procedures badge.

The input data from the set values element in the Omniscript is shared with the Integration Procedure. The Integration Procedure updates the shipping details for the specific order and sends the OrderId back to the Omniscript.

Here’s how you add it.

  1. In the Omniscript designer, drag an Integration Procedure element from the Standard Actions category and drop it after the Set Order Data step.
  2. In the Integration Procedure Action Properties panel, enter these details.
    • Name: SaveOrderData
    • Field Label: Save Order Data
    • Integration Procedure: Order_ProcessOrder

You need another Integration Procedure action to call the Fetch External Country Details Integration Procedure you built in the Order and Country Data Processing with Omnistudio Integration Procedures badge. This Integration Procedure uses the OrderId shared by the previous Integration Procedure to fetch the updated external country details.

Let’s add it.

  1. In the Omniscript designer, drag an Integration Procedure element from the Standard Actions category and drop it after the Save Order Data step.
  2. In the Integration Procedure Action Properties panel, enter these details.
    • Name: GetUpdatedCountryData
    • Field Label: Get Updated Country Data
    • Integration Procedure: Order_GetCountryDetails

The integration procedures are in place. You’ve two more elements to set up: a confirmation step and a Navigate action.

Add a Confirmation Step

You want to confirm that the order is successfully updated and to show the updated country details on a screen. Let’s add a step for that.

  1. In the Omniscript designer, drag a Step element from the Groups category and drop it after the Get Updated Country Data action.
  2. In the Step Properties panel, enter these details.
    • Name: Confirmation
    • Field Label: Confirmation
  3. Drag a Text element from the Input category and drop it at the beginning of the step.
  4. In the Text Properties panel, enter these details.
    • Name: UpdateStatus
    • Field Label: Update Status
  5. Select the Read-only checkbox.
  6. For Default Value, enter %GetUpdatedCountryData:status%.
  7. Drag a Text element from the Input category and drop it after the UpdateStatus text element.
  8. In the Text Properties panel, enter these details.
    • Name: UpdateMessage
    • Field Label: Update Message
  9. Select the Read-only checkbox.
  10. For Default Value, enter %message%.
  11. Similarly, add these Text elements and configure them in the order as given here.

Name

Field Label

Read-only Checkbox

Default Value

NewCountry New Country

Selected

%UpdatedCountryName%
NewCapital New Capital

Selected

%UpdatedCapital%
NewRegion New Region

Selected

%UpdatedRegion%
Timezones Timezones

Selected

%UpdatedTimezones%

Add a Navigate Action

A Navigate action ends the Omniscript and directs users back to the order record page from where the Omniscript was launched. It also refreshes the order record page and Flexcards to show the updated details.

Here’s how you add one.

  1. In the Omniscript designer, drag a Navigate element from the Standard Actions category and drop it after the Confirmation step.
  2. In the Navigate Action Properties panel, enter these details.
    • Name: NavigateToOrderPage
    • Field Label: Navigate To Order Page
  3. For Page Reference Type, select Web Page.
  4. Select the Replace entry checkbox.
  5. For URL, enter /lightning/r/Order/%ContextId%/view.
  6. Click Activate.
  7. In the Activate Omniscript? window, click Ok.

You did great! This is how the Update Customer Order Omniscript structure looks after you complete the configuration.

The Update Customer Order Omniscript.

With the Omniscript in place, it’s time to find out how it works.

Test Your Omniscript

Are you excited to see how your Omniscript works? Let’s test it out now (we won’t check this).

  1. In the Omniscript designer, click Preview.
  2. For Context Id, enter the record Id of the order with Order Number 00000101. To get the record Id, perform these steps.
    • Switch to the tab where the Omnistudio app is open or open it in a new tab.
    • Click App Launcher, then find and select Orders.
    • In the Orders list view page, click Dropdown menu beside Recently Viewed and select All Orders.
    • Click 00000101.
    • Copy the record Id from the URL. For example, 801ak00001RLKGiAAP is the record Id in this sample URL. The record Id in your Developer Edition org will be different. The View Current Order Details step fields are empty in the Preview mode.

The URL of an Order with the record Id highlighted.

3. Click Next on the Omniscript preview screen. The Edit Order step fields are also empty during preview.

4. Enter these details in the Edit Order step. You’ll use the existing information for preview as you just want to see if the Omniscript is working as expected.

    • New Order Status: Draft
    • New Shipping Method: Standard
    • New Shipping Street: 312 Constitution Place
    • New Shipping City: Austin
    • New Shipping State: Texas
    • New Shipping Postal Code: 78767
    • New Shipping Country: United States

5. Click Next on the Omniscript preview screen.

The Confirmation step gets updated with the status and country information.

The Omniscript preview screen showing the Confirmation step with the country information.

Remember, a record is updated if you change the information and submit it in ‌preview mode. Be careful when testing any Omniscript that updates a record.

Click the Action Debugger tab on the Debug panel to check how your Integration Procedure actions request and receive data.

The Action Debugger tab showing the Integration Procedure run time tasks.

Don’t click the Next button on the Confirmation page in preview mode as it will redirect you to the order record page, which is not ready yet. Click Design to go back to the Omniscript Designer. You can then close the Omniscript Designer browser tab.

Your Omniscript is now ready for use in the Flexcard that you create in the next badge in this badge series.

Wrap Up

In this badge, you learned how to build and configure an Omniscript to update order shipping details. And tested the Omniscript in preview mode.

You now have the Data Mappers, Integration Procedures, and Omniscript you need to view and update order data.

Next, complete the Order and Country Details Visualization with Omnistudio Flexcards badge to complete your badge series. In that badge, you build and configure the Flexcards and add them to a custom order record page to show the order and external country details.

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios